Hacker News new | past | comments | ask | show | jobs | submit login
Aves Engine: HTML/JavaScript Game Engine (youtube.com)
78 points by mcantelon on Apr 26, 2010 | hide | past | web | favorite | 26 comments



Seeing this pains me, because I was working on something similar in 2002, and gave up because I wasn't smart enough to stick with it.

I had a realtime, multiplayer, persistent world, in NES-style 2D (think Zelda 1). Keyboard-based controls, monsters that moved around, etc. All done in cross-browser compatible javascript.

It used a hidden iframe to poll the map data asynchronously (this was way before AJAX) and update the tiles (a 32x32 grid) in real time. I posted it on a popular forum one day, and had a whole bunch of people moving around on the map together. It was so awesome to see my little world come to life. People hadn't seen anything like it.

Then the server admin killed my account. Shared hosting was all I could afford back then.

I kept working on it for a while on my local machine, but without a place to host it, I lost motivation. It really needed a dedicated server, and that was way beyond my just-out-of-highschool budget.

Anyway, I ended up going to college and never really got back to it. 8 years later, I no longer have the source, or even a screenshot.


Having built it once, you could probably write it again in half the time. Even if you don't have the code, you have the experience.

Writing code changes you.


That's true. I've been thinking about doing a version for Android.

The hardest part was actually doing the artwork. I spent weeks doing dozens of little 16x16 pixel sprites. Even walking animations for the characters.


ugh, I feel for you, 16x16 sprites look really cool no matter how far in the future we go. FWIW I've lost all my old work too. I wish Dropbox was around back then.


It's been said before and it will be said again: It's impressive how JavaScript has gone all grown-up on us and what people are creating with it. This is really nifty, a lot of work has gone into it and they have obviously paid attention to detail. Small things like trees not appearing out of nowhere, but with a visual feedback in the form of bouncing when they land and such. I like small touches like that.

The last punch-line of the video with "but does it scale?" did not really impress me, though. I see roughly 30 clients and to be honest, sending off new position of your avatar and a chat of some 60 bytes + headers a couple of times per second does not say anything about scaling. Even if you pass over tiles and map to the clients on-demand.

A lot of work goes into the server in a game like this (more than most people think) due to the fact that you want the server to make all the decisions and calculations of what is going on in the world (to know state and to prevent cheating). Add to that verification of all data to see if what you just received from a client is reasonable.

I have always had a huge interest in multiplayer roleplaying games (massive or not), it goes back to before I started playing MUDs in the beginning/mid 90's. One thing these guys might want to investigate to use for the server-side code is a project called DGD (Dworkin's Generic Driver). It was originally written for MUDs, but its capabilities stretch way beyond that since a server really only serve bits and bytes (graphics not needed). It was always open-source but under a rather restrictive "not for commercial use" license, and there were few companies that could afford buying it. (edit: But it is since a few months back FOSS (AFL)).

The project: http://dgd-osr.sourceforge.net/

I'd love to see this project being used for something like this and I have been tempted beyond belief to start something like this myself.

I am not affiliated with the project in any way except that I've been writing LPC on and off for some 15 years. The project is not very good at selling itself, but rest assured that the codebase is very stable.


hey there, the punchline 'does it scale' in this particular case was more referring to the client side of scaling rather than the backend. That being said, we are doing some pretty crazy stuff in the backend involving server-side JS to get things up to speed, but still need to collect actual numbers.


Neat! I hope we get to hear some details on this in the future! I was impressed with the video, can I ask what kind of machine the demo was recorded on? :)


Yeah, new details are definitely coming up! This was the first public demoing, so watch for more.

For recording, we used a 27" iMac (slow version of it), but really, it runs almost flawlessly on an iPhone and crappy netbooks.


So you're using node.js on the server? How do you store the model of the world: Redis?


Yes we're using node.js on the server-side with a combination of long-polling and normal polling (for slower devices like iPhone). I can't talk about any other server components as much of it may change. We'll post details when we think it's good to go!


Check out the video on the wall playing at 2m35s; it's an HTML5 <video> transformed with CSS3!

http://www.youtube.com/watch?v=Ol3qQ4CEUTo#t=2m32s



Dare I ask if this will work in any version of IE?


We are indeed working on bringing this to IE as well, but we're waiting until at a later stage. Keep in mind that this is all still alpha code.

As jeresig pointed out, Canvas is really only used for calculating click-through maps on objects which can be ignored / done server-side. It should be relatively easy to fix remaining bugs in IE.


Edit (on second thought): They are probably using canvas and not other trickery, then yeah, current versions of IE are pretty screwed.

Original post:

Since I am not involved in the project, I can't know for sure. But it is presented at a jQuery conference and, really, the main reason why anyone would use jQuery (or any similar intermediate layer written in JavaScript) is to get around cross-platform issues easily. That said, I'm pretty sure that at this stage it probably does not work in IE but I did not see any functionality in the video that suggests that it would not work in IE with a bit of effort put into it before launch.

It probably performs like a dog, though. :-)

On the flipside (and another cool project): FreeCiv (http://www.freeciv.net/) did not seem to be bothered with getting native IE functionality in place (it requires Chrome Frame).


This was demoed at today's jQuery Conference: There is no canvas used to render the tiles (it's all images). There is some canvas used to compute out the hit detection logic - but I suspect that that's something that could be generated server-side, rather than dynamically.


Well if they're using RaphaelJS or at least duplicating some of its functionality, then it should default back to VML for IE. I have no idea what VML is really capable of though.


good thing is if you are making an browser MMO game you can much just require users use a specific browser. Unless it's dead simple to get it to work in IE, I would not even bother.


Impressive looking demo, looks to be for-pay. All the best to their team!


Bummer. Doesn't look like open source.


Maybe not Open Source but you can always View Source.


why open source? it seems like the developer deserves to make some money out of it.


You can still charge for licenses to open source code.

The reason for Open Source is so that YOU, the developer can control your destiny. What if the company tanks, or they decide they want to take the library in a direction that's incompatible with my game? Unless I have the source I'm screwed.

If I have the source, the worst case scenario is I have to hire another developer or two to keep improving the engine.


Unless I have the source I'm screwed.

But even having the source doesn't mean you aren't screwed. Even if you have the source, you still need a license that allows you to do something with the source. It's possible for the upstream team to give you the source, e.g., for viewing, but not grant you any rights to do anything with it. This is why the free software and open source licenses go on about things like guaranteeing redistributability and derived works, rather than just "Hey, you know. You can see the source code." Consider this: you have unfettered access to the "source" of a book in your library. That doesn't mean you have rights to do any of the stuff in the vein of what open source, free software, or most Creative Commons licensing allows you to do.

(It's possible that the "have" in your "have the source" was shorthand for having these rights.)


Anyway, I'm pretty sure most game engines are open source. You license the engine and they give you the source code.


This is the most mind blowing thing I've seen done in Javascript yet. Yes, I realize Google's NaCl and V8 are far more mind blowing on a technical level, but this impresses from the user point of view—it doesn't look anything like "the web" but it is all web. Great magic trick!

Can anyone think of a more disgusting, perverted use of the web stack than this? There's a reason nobody uses html and Javascript to represent an MMO game engine. But they did it and it look incredible!

Everyone betting long html5 right now is going to win in the end, because the browser will eventual become the universal UI and slurp in all other "micro-platforms". Yes Apple, this means Cocoa Touch too...

If the folks making Aves wanted to really blow everyone's minds, they would make Aves output Objective-C code. Then you write your iPhone/iPad game in html/javascript, port it to Objective-C, and you're done. Since Apple has publicly blessed PhoneGap, we know html/javascript will never fall under the exclusionary rule 3.1.1. This means Apple just setup html/javascript to be the victor on mobile and gaming platforms.




Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact

Search: