Our JS game engine

For discussions about game development that does not fit in any of the other topics.
Post Reply
User avatar
VZdemon
Posts: 93
Joined: Thu Nov 25, 2010 1:55 pm

Our JS game engine

Post by VZdemon »

I've heared alot of noise and exitment revolving around HTML5 and decided to try make a game with it myself. so i started fiddling around with canvas element and it turned out some pretty owesome resaults, I even managed to run at a top speed of 60 FPS (mesured using chrome's FPS counter). any way i told myself that i'm going to furthur develop it but i just kinda got lazy and cought up with all the other things i've been doing i though you guys on the forum mite like it and may even make something nice of it. so if any1 wants the to continue the project it's up for grabs.
here's a little demo.

http://vzforumz.herobo.com/EternalQuest/

if you want to make your own map just click here

http://vzforumz.herobo.com/EternalQuest/MapEditor.html

private message me if you want the project.

*Edit: please use google chrome to view it. it also works on IE 9 but only from localhost idk why.
feedback is appreaciated
it's VZdaemon on xbox live
dbest
Posts: 109
Joined: Sun Nov 20, 2011 12:24 pm

Re: Our JS game engine

Post by dbest »

That's some decent effort there.
User avatar
OldRod
Posts: 1320
Joined: Sun Sep 20, 2009 4:26 pm

Re: Our JS game engine

Post by OldRod »

Nice work! How long did it take you to get to that stage?

I'm still fine-tuning some Codeigniter stuff, but my plans are to implement a map like that in my game, so that was next on the list to research :)
User avatar
hallsofvallhalla
Site Admin
Posts: 12026
Joined: Wed Apr 22, 2009 11:29 pm

Re: Our JS game engine

Post by hallsofvallhalla »

nice work!
User avatar
Jackolantern
Posts: 10891
Joined: Wed Jul 01, 2009 11:00 pm

Re: Our JS game engine

Post by Jackolantern »

Very cool! :)
The indelible lord of tl;dr
User avatar
VZdemon
Posts: 93
Joined: Thu Nov 25, 2010 1:55 pm

Re: Our JS game engine

Post by VZdemon »

Thanks, i used php and converted Rect objects to values in mysql, each map is a new table and each Rect is a value in that table. to read the map i simply retrieved the map as 1 string via php and then decoded it to an array of Rect objects.
it's VZdaemon on xbox live
User avatar
Jackolantern
Posts: 10891
Joined: Wed Jul 01, 2009 11:00 pm

Re: Our JS game engine

Post by Jackolantern »

That is basically how tilemaps are often handled in game engines, where the maps will look like:

Code: Select all

[0,0,0,0,1,1,
 0,0,0,0,1,0,
 1,0,0,0,1,0,
 2,0,0,0,3,0,
 1,0,4,0,1,0,
 1,0,0,0,1,1,
 1,1,1,5,1,1]
Of course, you would usually use a map editor to form that so you aren't building that by hand (a 64x64 map could take hours to make like that by hand). You could make a simple map editor in .NET due to its simple GUI creator.
The indelible lord of tl;dr
User avatar
VZdemon
Posts: 93
Joined: Thu Nov 25, 2010 1:55 pm

Re: Our JS game engine

Post by VZdemon »

no no thats not how my map looks like. mein looks more like this

Code: Select all

|   x   |   y   |   w   |   h   |
--------------------------------
|   0   |   0   |  100 |  20  |
| 100  |   35 |   40 |  300 |
| 240  |  657|  700|  30   |
| 45    |   35 |   40|  300 |
| 123  |   252| 410|  300 |
| 10    |   15 |   30 |  60  |
and when i retirive it, it comes as 1 string that looks like this

Code: Select all

{0,0,100,20},{100,35,40,300},{240,657,700,30},{45,35,40,300},{123,252,410,300},{10,15,30,60}
btw nice avatar
it's VZdaemon on xbox live
User avatar
Jackolantern
Posts: 10891
Joined: Wed Jul 01, 2009 11:00 pm

Re: Our JS game engine

Post by Jackolantern »

Haha, thank you :)

Well, that is basically the same thing. I just made up those numbers, and you can break it down and store it any way you want. Some engines may store them as JSON, some as a single array, 2D array, etc. But the important thing is making sure it is in a format you can easily modify, and hopefully a format that can easily be duplicated on other platforms in case you want to create an ecosystem of tools and editors to ease content creation.
The indelible lord of tl;dr
User avatar
SpiritWebb
Posts: 3107
Joined: Sun Jul 12, 2009 11:25 pm

Re: Our JS game engine

Post by SpiritWebb »

Awesome work!!
Image

Image
Post Reply

Return to “General Development”