Omnimaga

General Discussion => Technology and Development => Computer Projects and Ideas => Topic started by: JL235 on October 02, 2011, 10:17:00 pm

Title: My browser based game building platform
Post by: JL235 on October 02, 2011, 10:17:00 pm
This is something I've been building for about a year now, and it's really starting to come together. It's called Play My Code (http://www.playmycode.com), and it allows you to create, and write games directly within the browser, with all of the tools and hosting provided for free.

The main focus for the site was to streamline the process of building a browser game. Today if you want to make a game using HTML5 and JavaScript, then first you have to find tools to use to write it, documentation to get you going, and write lots of boilerplate to setup the page. Next you need to find a way to get it online, and available for others to play. Finally it's very easy to write code which only works in one browser, requiring lots of testing. The site aims to streamline all of that, making the whole process of building a game in the browser as simple as possible. We also work around, or fix, many cross platform bugs, with the aim that our games will run in any HTML5 compliant browser (which is a lot more work then you think).

We have our own IDE, where you can write games and upload assets (so far images and sounds). We also use our own language, Quby, which is heavily influenced by Ruby. When it runs this is compiled to JavaScript, and again uses the HTML5 canvas for graphics. We have a 'sandbox' that you play in without signing up here (http://www.playmycode.com/build/sandbox), so you can get a look at the IDE, but you can also sign up to create and save projects online.

There are a bunch of games written so far, including a breakout clone (http://www.playmycode.com/play/game/badlydrawnrod/life-just-bounces), a rhythm action game (http://www.playmycode.com/play/game/lgshort/jazzhands), and lots more (http://www.playmycode.com/play). You can also view the code and edit any of the published games (read only), allowing you to learn from examples, again without having to sign up.

But we still have a long way to go for making this more mature, so I'd be open to any feedback people can give!
Title: Re: My browser based game building platform
Post by: LincolnB on October 02, 2011, 10:20:12 pm
 O.O O.O O.O O.O O.O
 O.O O.O O.O O.O O.O
 O.O O.O O.O O.O O.O

My eyes just popped out of my head, like this:  O.O

You, sir, are a genius. Seriously, this is very cool. Ah, the possibilities...

/me wonders if he's going to have to pay any money for this...or is it all payed for by ads?
Title: Re: My browser based game building platform
Post by: JL235 on October 02, 2011, 10:48:56 pm
O.O O.O O.O O.O O.O
 O.O O.O O.O O.O O.O
 O.O O.O O.O O.O O.O

My eyes just popped out of my head, like this:  O.O

You, sir, are a genius. Seriously, this is very cool. Ah, the possibilities...

/me wonders if he's going to have to pay any money for this...or is it all payed for by ads?
Thanks for the praise!

We haven't actually decided on a way to monetize it yet, as we are still finishing the core platform. But we do want to keep it as free and open as possible, to help encourage developers to use it and build games.
Title: Re: My browser based game building platform
Post by: Deep Toaster on October 02, 2011, 11:02:52 pm
That is awesome. Where'd you get that awesome in-browser code editor? For a long time I've wanted to make a complete online IDE for Z80 assembly, and one of the things at the top of the to-do list was a code-highlighting editor in JavaScript.
Title: Re: My browser based game building platform
Post by: JL235 on October 02, 2011, 11:24:06 pm
That is awesome. Where'd you get that awesome in-browser code editor? For a long time I've wanted to make a complete online IDE for Z80 assembly, and one of the things at the top of the to-do list was a code-highlighting editor in JavaScript.
In my opinion, the best browser editor available is Ace (http://ace.ajax.org), and we use a customized version of that.

We originally used Code Mirror, which is another very complete editor, and it's used on Google Code (but it's not by Google). However we switched because we had issues with it getting very slow after a couple of thousand lines (which I've found on other sites that use Code Mirror), and the Ace editor is really damn easy to work with; I had most of the editor moved over in just an afternoon.
Title: Re: My browser based game building platform
Post by: Deep Toaster on October 02, 2011, 11:26:09 pm
We originally used Code Mirror, which is another very complete editor, and it's used on Google Code (but it's not by Google). However we switched because we had issues with it getting very slow after a couple of thousand lines (which I've found on other sites that use Code Mirror), and the Ace editor is really damn easy to work with; I had most of the editor moved over in just an afternoon.
I noticed that issue with large files in Code Mirror too. Thanks for the tip!

EDIT: Those games are fun O.O
Title: Re: My browser based game building platform
Post by: JL235 on October 03, 2011, 12:03:44 am
I noticed that issue with large files in Code Mirror too. Thanks for the tip!
Np. There is also a list of editors on Wikipedia (http://en.wikipedia.org/wiki/Comparison_of_JavaScript-based_source_code_editors). Bespin/Project Skywriter is mentioned, but I'd skip it, as it's been merged into Ace.
Title: Re: My browser based game building platform
Post by: Hayleia on October 03, 2011, 01:11:25 am
Hahahaha haahaahahaha !!! :crazy:
/me took too much awesomeness in the eyes and is becoming crazy
No, seriously, great work :thumbsup:

We haven't actually decided on a way to monetize it yet, as we are still finishing the core platform. But we do want to keep it as free and open as possible, to help encourage developers to use it and build games.
If you put ads, please, put them everywhere but don't put pop-ups. It is so annoying. And avoid questionnable ones so we can use your tool even when our parents are behind us ;)
Title: Re: My browser based game building platform
Post by: willrandship on October 03, 2011, 03:51:34 am
Nice! I hope it doesn't get blocked in my School x.x I actually have a way to make HTML5 games on the go! :w00t:
Title: Re: My browser based game building platform
Post by: Levak on October 03, 2011, 05:48:08 am
Even if the concept was cool I wasn't as excited as before I played the game (you all lost) and imagine all the possibilities. Really ... congrats !
Title: Re: My browser based game building platform
Post by: Broseph Radson on October 03, 2011, 09:23:58 am
Wow thats cool :O
Title: Re: My browser based game building platform
Post by: LincolnB on October 03, 2011, 09:50:40 am
O.O O.O O.O O.O O.O
 O.O O.O O.O O.O O.O
 O.O O.O O.O O.O O.O

My eyes just popped out of my head, like this:  O.O

You, sir, are a genius. Seriously, this is very cool. Ah, the possibilities...

/me wonders if he's going to have to pay any money for this...or is it all payed for by ads?
Thanks for the praise!

We haven't actually decided on a way to monetize it yet, as we are still finishing the core platform. But we do want to keep it as free and open as possible, to help encourage developers to use it and build games.

Great! I agree with Hayleia, no questionable ads or pop ups plz. :)
Title: Re: My browser based game building platform
Post by: JL235 on October 03, 2011, 10:42:34 am
If we ever added ads, they definitely won't be popups. I don't like them either (and I don't believe anyone does).

Thanks for all the positive feedback!
Title: Re: My browser based game building platform
Post by: willrandship on October 06, 2011, 12:57:28 am
I would recommend making money, perhaps, through in-game advertising. However, I think it would be best to let the user decide if they want it in there, and give them some of the money (maybe 10%-30%) that you gain in profits. Then, there's a motivation to make better games, they could specify areas to have ads in (think like gemcraft 0 did, after each level, not like those annoying random time-based popups) that wouldn't be counterintuitive or very annoying.
Title: Re: My browser based game building platform
Post by: JL235 on October 06, 2011, 10:54:06 am
A profit share would be a great idea for helping developers get involved with using PMC, and it's something we are already considering.
Title: Re: My browser based game building platform
Post by: Binder News on October 14, 2011, 11:38:47 pm
Another idea that you could add would be to add support for Silverlight games. I know for a fact they would work on Windows and Windows Phone, it works for me in Linux (Ubuntu 11.4, Firefox, Moonlight). And I know Mono works on Mac as well. I'm not sure if it would work on iPhones, I don't think it will, and I'm also not sure about Android. But I'm not really sure if they are very good for browser games in the first place.

Besides, C# is a really cool language (except that it's made by MS, brining its cool rating down by about 20).

Also, semi-necropost.
Title: Re: My browser based game building platform
Post by: JL235 on October 15, 2011, 06:36:44 am
Another idea that you could add would be to add support for Silverlight games...
I am actually already thinking of doing this. I really want to add support for 3D, and in non-IE browsers I can just use WebGL. Adding Silverlight support would allow us to have 3D that works for IE too, but it would still exclude IE 10 Metro : ( .
Title: Re: My browser based game building platform
Post by: willrandship on October 16, 2011, 03:15:49 pm
What about using Java? Then it would work on arm.

It's Ok to exclude IE, in my opinion, providing you tell people to use something else on the site, so they know why it's not working. IE only comprises 38% of browser usage on desktops, and most of those are going to be the technology-uninitiated, and far less likely to be using your site to make/play games.

Title: Re: My browser based game building platform
Post by: JL235 on October 17, 2011, 12:21:54 pm
What about using Java? Then it would work on arm.
If they are using a modern browser on arm, then it should also work ok.

But I wouldn't want to target Java due to how awful the Java applet experience is. Slow start up times, caching bugs, Chrome has a 'click to unblock', and it looks like Firefox is going that way too.
Title: Re: My browser based game building platform
Post by: willrandship on October 17, 2011, 01:47:04 pm
So are you leaning towards webGL then? Because Silverlight will likely never run on arm. I haven't even heard any news from ms saying they will port it to Win8 Arm edition....
Title: Re: My browser based game building platform
Post by: Spyro543 on October 17, 2011, 04:59:29 pm
Wow...this is amazing. Chain Reaction is my favorite game on there :P I don't know if I'll ever learn the language though.
Title: Re: My browser based game building platform
Post by: Deep Toaster on October 17, 2011, 05:26:46 pm
Same, and for once I actually won a game :D
Title: Re: My browser based game building platform
Post by: JL235 on October 18, 2011, 10:58:17 am
So are you leaning towards webGL then? Because Silverlight will likely never run on arm. I haven't even heard any news from ms saying they will port it to Win8 Arm edition....
Hmmmmm, it's tricky, because Win8 tablets will probably be quite popular. However users would also use IE 10 Metro over the proper IE, which doesn't support any plugins. I might have a look at seeing if VML or SVG could do 3D (and at a reasonable speed).

But for 3D, or hardware accelerated 2D, yes, WebGL is what I'd be leaning towards. I would only use Silverlight/Java/whatever as a backup.
Title: Re: My browser based game building platform
Post by: DJ Omnimaga on October 18, 2011, 03:04:50 pm
This is interesting JL235, but for some reasons most games gives me an error at one point in Opera. :(
Title: Re: My browser based game building platform
Post by: JL235 on October 19, 2011, 09:21:20 am
This is interesting JL235, but for some reasons most games gives me an error at one point in Opera. :(
I've just tracked this down. I don't know why, but the error is caused by...
Code: [Select]
if ( _this.img instanceof Image ) {
... checking if an internal value is an Image. Testing in JS Fiddle, it works fine, but I've had other errors related to dynamically creating JS scripts and the Image function. I've just built a workaround, which works fine in all browsers. This will be uploaded soon.
Title: Re: My browser based game building platform
Post by: flyingfisch on October 19, 2011, 09:36:32 am
very nice ;)

Great program.
Title: Re: My browser based game building platform
Post by: JL235 on October 19, 2011, 10:52:57 am
Thanks!

Currently were adding forking, so you can copy other people's projects (with a link back to credit the original author). I'm also adding a long list of other small improvements, new bits to the API, and some more documentation.
Title: Re: My browser based game building platform
Post by: LincolnB on October 19, 2011, 02:37:00 pm
hey, that sounds great.
Title: Re: My browser based game building platform
Post by: DJ Omnimaga on October 19, 2011, 02:51:53 pm
Sounds nice. Also I assume games have to be hosted on your site, right, to be ran?
Title: Re: My browser based game building platform
Post by: JL235 on October 20, 2011, 10:20:37 am
Sounds nice. Also I assume games have to be hosted on your site, right, to be ran?
Yes, right now they have to be run via our site, but we might add export features as the site expands.
Title: Re: My browser based game building platform
Post by: Jonius7 on October 20, 2011, 10:22:27 am
These are actually good games! Nice spinoffs on classic titles. I like the balloon jump game the best because im good at it i guess.
Title: Re: My browser based game building platform
Post by: JL235 on October 27, 2011, 06:54:05 pm
and today we got out the latest release! (update post (http://www.playmycode.com/blog/2011/10/updates-forking-copying-experiments-section-language-improvements-and-more/)).
Title: Re: My browser based game building platform
Post by: parserp on October 27, 2011, 06:58:35 pm
Joinus7 is evil!!!! >:D
Title: Re: My browser based game building platform
Post by: annoyingcalc on October 27, 2011, 08:23:12 pm
Joinus7 is evil!!!! >:D
:trollface: O.O

 anyways this is looking great
Title: Re: My browser based game building platform
Post by: Juju on October 28, 2011, 02:01:47 am
Yeah, it looks pretty awesome :D
Title: Re: My browser based game building platform
Post by: Jonius7 on November 20, 2011, 01:55:54 pm
Joinus7 is evil!!!! >:D
Oh lol when I used to have 666 posts. I'll check out this new release right now
BTW: Nice use of the right sidebar making us get addicted by switching and trying all the other games.
I like TimeSLOW. HIghscore: 40
Title: Re: My browser based game building platform
Post by: JL235 on December 13, 2011, 05:54:33 am
Just had a new update! (http://www.playmycode.com/blog/2011/12/huge-update-painter-full-screen-ide-optimisations-and-more/)

It includes some improvements to the IDE (now fullscreen), some API additions, some really big performance improvements, and one of the biggest additions is a browser based painting app for editing and creating graphics.
(http://www.playmycode.com/blog/wp-content/uploads/2011/12/painter_screen.png)
Title: Re: My browser based game building platform
Post by: Spyro543 on December 13, 2011, 04:35:25 pm
This is pretty cool! I'm trying it out now but I'm getting weird errors :/
Title: Re: My browser based game building platform
Post by: JL235 on December 14, 2011, 05:47:24 am
Are they errors with using it, or just bad debugging errors?

If have some examples then I can definitely work on them.
Title: Re: My browser based game building platform
Post by: Spyro543 on December 14, 2011, 06:48:04 am
Ok, I got my problem fixed. I was forgetting an "end" in a nested If command. :P
Title: Re: My browser based game building platform
Post by: JL235 on December 14, 2011, 07:36:38 am
Good to know you got it fixed, although I take the feedback on board. It would have been better to have had a warning pointing it out (or at least suggesting it as a possibility).
Title: Re: My browser based game building platform
Post by: Spyro543 on December 14, 2011, 07:39:02 am
Quby is a very powerful programming language. Ever think about making a port of it for local use? (As in, ran on computer, not in internet browser.)
Title: Re: My browser based game building platform
Post by: aeTIos on December 14, 2011, 07:50:17 am
Great!
Title: Re: My browser based game building platform
Post by: JL235 on December 14, 2011, 08:26:07 am
Quby is a very powerful programming language. Ever think about making a port of it for local use? (As in, ran on computer, not in internet browser.)
Yes, and I really want to re-write a huge chunk of the parser too (which will make pointing out syntax errors much easier). The problem is just a matter of finding the time.
Title: Re: My browser based game building platform
Post by: Spyro543 on December 14, 2011, 08:30:30 am
I could write the parser for computer in Python, using Tkinter's Canvas widget for the drawing.
Title: Re: My browser based game building platform
Post by: JL235 on December 14, 2011, 10:31:09 am
The problem with writing a new parser in Python, is that the implementations would probably end up drifting. New features and bug fixes would need to be built twice, and you would also find bugs in one implementation that are not present in the other.

I'd be more interested in re-writing in JS, as then it could be used for both desktop (using say V8 or Java/Rhino) and for the web. The compiler is also about 10,000 lines, which excludes the Quby libraries (String, Array, Hash, Function, Image, Controlls, Sound, etc), and I'd rather re-use as much as that as I could for any desktop port. The only bit that really needs re-building is the grammar, where the structure is formed.
Title: Re: My browser based game building platform
Post by: Spyro543 on December 23, 2011, 09:46:23 am
Is there a command for checking the color of a certian pixel? That would be useful, if there isn't one already.
Title: Re: My browser based game building platform
Post by: JL235 on December 23, 2011, 08:32:59 pm
Is there a command for checking the color of a certian pixel? That would be useful, if there isn't one already.
There is, although indirectly. You can call the 'getScreenshot' function to get a copy of the screen as an image. On the Image object you can then call the 'getPixel' methods, or similar ones such as 'getPixelRed', to get specific pixels from the canvas.
Title: Re: My browser based game building platform
Post by: JL235 on January 06, 2012, 01:07:29 pm
and the paint editor I built for the site, has just been made a Chrome Experiment (http://www.chromeexperiments.com/detail/skybrush/). Yay!
Title: Re: My browser based game building platform
Post by: flyingfisch on January 06, 2012, 01:18:53 pm
and the paint editor I built for the site, has just been made a Chrome Experiment (http://www.chromeexperiments.com/detail/skybrush/). Yay!
Nice paint program :)