29

Repl.it GFX: Native graphics development in the browser

 5 years ago
source link: https://www.tuicool.com/articles/hit/aAjqiyq
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

At Repl.it we live and breathe making software creation easier. With our programming environment , you could start coding in your favorite language in seconds. Withlive deployments, we made web hosting a breeze. WithMultiplayer, we've removed the drudgery from coding with friends. And today, we're excited to bring native GUI applications and game development to the browser.

Before we go on, you have to see this in action: Just run the repl below, wait a few seconds for it to load, focus on the output window and start playing Tetris in Pygame (by@theohalpern):

Let's take it up a notch and boot up this nifty desktop app we all love (might take up to a minute to load but then can be done recursively):

Why

We believe in the plurality and diversity of developer communities. That's why we spend countless days, weeks, and months working on features that can work cross language. We want programmers from all backgrounds, regardless of their language, to be able to code games and apps with ease. Plus, supporting native graphics opens us up to a wealth of frameworks, games, and educational material! We're particularly excited about supporting Pygame and Java Swing.

Game Jam

We wanted to give you a reason to try out our new GUI capabilities, so we kicked off our very firstgame jam on March 18th. It closes on April 18th, so there’s still plenty of time to show us what you can do. As for the winner? The grand prize is 1BTC ($4,031 at the time of writing).

bling-robot.png

Technology

We like to release early and often. So while this works, and we're proud of what we've done, there's still a long way to go. Right now, we're piping the X Window system through VNC through WebSockets to your browser, which is not the most efficient way to do this — we have a lot of ideas on how we could improve it.

To stay true to ouradaptive IDE principle — the IDE should "do the right thing" when you need it — we useLD_PRELOAD to figure out when an application is trying to open a window and then we start X in the background and reveal the screen in the environment. This has the effect of delighting our users:

Awesome! Plotting on https://t.co/DcPy3gZFUO using GR and #JuliaLang . pic.twitter.com/K4GPBjOZgR

— Josef Heinen (@josef_heinen) March 9, 2019

Finally, depending on how far you are from our data center (US-central) you might feel a delay, which we're also working on making better by replicating our data center (watch out Google Stadia ).

Please leave usfeedback so we can improve. Or comework with us so we can make it better together.

Get started

Early reception has been tremendous, and replers have been building amazing things. Take a look at some of the submissions in ourgame jam or give it a spin yourself:

We're supporting these frameworks out of the box, but very soon, we'll roll this out to all of our languages. If you're impatient, then you can use our base image to Install (pkg-install) and run your framework.

Happy game development!


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK