ID:109703
 
<!--

Well, I've continued work on my HTML5 game engine. I now have successfully implemented movement, moved over to using 32x32, and have the camera system more implemented, as well as a layering system. Now you can see your own character, and move around the map and move around obstacles (so far, only water). Next on the list is to add pixel shifts to the camera, and allow for smoother pixel movement. If you want to look at the current product, take a look here.

-->

NOPE.
Looks like topdown minecraft.
Neblim wrote:
Care to explain to me why somebody liker yourself is using jQuery?

I'm using it a lot for testing purposes. It may not be necessary after that, but I'll have to see first after I'm through the testing phase.

I'm just curious to why my CPU is running at 80% for your game engine, while I can run MANY HTML5 canvas games with not even 10%...? I know you're just testing this, so I'm not trying to come off rude as it may sound. I'm actually getting into this type of thing as well for experimentation.

Running a single canvas window does nothing. It's actually the drawing action that makes things vary, and using it for games requires a very constant redrawing, as opposed to what happens for other applications. Just putting <canvas> causes it to, literally, do nothing. Might as well be putting a <div> element up.

I am running on quite a sound laptop too (Firefox 3.6.13)

Based on all my testing, FF 3.6.13 is... really bad at HTML5 stuff. Opera 11, Chrome, and FF 4.0 are all better for running any HTML5 game. It seems they made serious additions and modifications to their Javascript engine.

From what I have read, drawing the canvas over and over when nothing is happening is quite a bad thing.

It's not computationally very simple to determine when something *is* happening, though, and I don't know if the benefits outweigh the gains. It also sounds like issues of premature optimization.

Idling for 80% CPU usage is definitely not a good sign.

And that doesn't seem to happen for any other browser, so I'd suggest downloading Firefox 4.0 (it'll allow you to use it concurrently with your current Firefox version) to test HTML5 stuff.
Neblim wrote:
Ah ok. Being a complete newbie with jQuery, what exactly is that you are testing? Looking at the source alone appears to be like searching for a needle in a hay stack, for me anyway.

Essentially, it greatly simplifies selecting and modifying HTML elements. It probably won't be necessary in the final version, but we'll see.

While this is very true, I happened to test other games with 3.6 and not 4.0, giving that an accurate comparison despite the need for a browser upgrade. For argument's and productive sake though, I'll humour you and use the latest versions of Chrome and Opera, as these are available to Linux while Firefox 4.0 isn't.

I've looked at other HTML5 games, and they actually seem to produce similar processing increase. Hopefully, sooner or later, browsers will implement some way of making HTML5 games more efficient, but right now there isn't a lot to do in those regards.
Neblim wrote:
Popisfizzy wrote:
I understand what you're saying, but would you mind giving me a coded example of this usage to give a better visual?

You can use stuff like $("element") to select a given element (and all elements) of that kind, or something like $(".class") to select all classes of that class, and etc. It makes selecting and modifying elements much, much quicker. You can also do a lot more, and it makes things very much easier.
Really? What type? If they're 3D, then I would say that doesn't count, as 3D support isn't really something HTML5 is ready for as of just yet, without the use of external plugins and what not.

Actually, WebGL is currently a W3C specification still in progress. It will be something HTML5 can do. Just not yet.

If you're referring to something simple like what you're doing, such as 2D, I see no performance issues in games like these:

http://www.kesiev.com/akihabara/

Hrm, they do have to deal with less processing. I'll have to take a look at it and see if there's anything I can do to change it, and make it better in terms of processing. I have a few ideas.
Oh, yeah. I also use jQuery for binding events to the canvas and window. Altering this will require a great deal of effort, and may be something I do eventually, but to speed up getting an actual game done, I'm not going to do it anytime soon. Therefore, jQuery will be around for a while.