Jump to content
MakeWebGames

can Neab make game like this?


rpg-style
 Share

Recommended Posts

Re: can Neab make game like this?

Well, isometric views and more than 2 layers are in principle possible. But sadly our dear browsers, with simply HTML / Javascript are not yet fast enough to do it. Or at least, not with a good window size or speed.

If you would need something like that then you need to go to Java, Flash, Silverlight or any other kind of plugin.

Link to comment
Share on other sites

Re: can Neab make game like this?

 

Well, isometric views and more than 2 layers are in principle possible. But sadly our dear browsers, with simply HTML / Javascript are not yet fast enough to do it. Or at least, not with a good window size or speed.

If you would need something like that then you need to go to Java, Flash, Silverlight or any other kind of plugin.

ok,I see

Link to comment
Share on other sites

Re: can Neab make game like this?

BTW I tried street mobster. Beside it's not my kind of game, I do love this kind of "map" they have. However, as you see, when you click on an arrow to move around, the map will load all the images and place them... which is not as fast as it's needed for being able to have a 2D map, unless you do it page by page, and not like scrolling as we do have.

Link to comment
Share on other sites

Re: can Neab make game like this?

 

BTW I tried street mobster. Beside it's not my kind of game, I do love this kind of "map" they have. However, as you see, when you click on an arrow to move around, the map will load all the images and place them... which is not as fast as it's needed for being able to have a 2D map, unless you do it page by page, and not like scrolling as we do have.

Hi

you notice the map,but the map is fack 3d,can it be used at your engine?

I mean the buildings could blot out the charactors when you move on,because its three-dimensional,isnt it?

 

thanks

Link to comment
Share on other sites

Re: can Neab make game like this?

what you call fake 3D is instead 2D isometric:

http://en.wikipedia.org/wiki/Isometric_projection

To do it properly, you basically have tiles based on diamond shapes, and draw from the top to the bottom... or back to front if you prefer.

Now each sprite can overlap completely or partially the previous sprites (or tiles). To do so you will need a lot more tiles than we currently use. Also movement on 2D isometric views tends to be yet a bit more difficult as you don't walk straight normally. Which tends to be a bit odd for players to handle your avatar.

Now, to come back to your question: our 2D engine do not support isometric tiles. And as I said before, I doubt you can do good isometric rendering with plain Javascript. I would love to, even if I should change all, but sadly I believe it's not possible to make it working fast and right.

Link to comment
Share on other sites

Re: can Neab make game like this?

 

what you call fake 3D is instead 2D isometric:

http://en.wikipedia.org/wiki/Isometric_projection

To do it properly, you basically have tiles based on diamond shapes, and draw from the top to the bottom... or back to front if you prefer.

Now each sprite can overlap completely or partially the previous sprites (or tiles). To do so you will need a lot more tiles than we currently use. Also movement on 2D isometric views tends to be yet a bit more difficult as you don't walk straight normally. Which tends to be a bit odd for players to handle your avatar.

Now, to come back to your question: our 2D engine do not support isometric tiles. And as I said before, I doubt you can do good isometric rendering with plain Javascript. I would love to, even if I should change all, but sadly I believe it's not possible to make it working fast and right.

yeah,I learn a lot from it,thanks!

Link to comment
Share on other sites

Re: can Neab make game like this?

Vali: we do implement all those possible "smart" loading tricks we found, and we still have issues with browsers not caching all files as needed. Also, you still have HUGE limitations of the number of images you can change, before it is simply too slow to be usable. Specially on IE. Here again we use all sort of tricks to make it as fast as possible. But as isometric maps requires many overlaps, it would simply make all way too slow.

BTW I would suggest you to test our demo or our own game, to see that indeed we do have a complete 2D map, with what we managed to squeeze out our beloved browsers.

Link to comment
Share on other sites

Re: can Neab make game like this?

a_bertrand you place 100+ images on the screen for the user at once? as in all the times as one image, and overlap them to generate the <> tiles right?

If so, do this:

Your map in 3 layers.

- 1 - land / doesn't change

- 2 - user / sprites

- 3 - trees / stuff over the user

When you render it, instead of rendering 100 images (say you have a 10x10 grid), you render it server side and cache the result (on the server so they are ever only rendered once).

So, the user will load big images of 300x300 pixels (say your 1x1 is 30x30px) instead of more smaller images.

If the user moves left, lets say, and takes 5 sec to 30 pixels (1 tile), you start preaching the left 300x300 series of times. When that enters the user's view point, you place it on screen, and remove the one that's on the right of the screen that just moved out of view.

That way, you gain a few things:

- less HTTP requests to your server = faster load

- 1 big image is faster to render than 100 small ones.

- you get the 3 layers, so the user can be under a tree or something.

- you can unload tiles (300x300 times) from the browser to release memory, but they can still be cached for fast load.

- You can check how fast users travel and how fast they download stuff, so you can start preaching the possible tiles (300x300) to show next (say it takes 10 sec for that time to enter the user's view point and 5 sec for the user to load it, you then start loading the tile 5-6 sec before it will enter the user's field of view)

These are some ideas, and I'm sure there are more ways you can improve this.

Link to comment
Share on other sites

Re: can Neab make game like this?

Yes we tried that, but sadly it was MUCH slower than what we currently have. Basically it would be faster for the browser, but would require to always load new map parts, and this was slow. At least for some players. As we tested with some players. Without talking about the network usage (both on our side and on the player side).

You need to think that we have a 400 area world map (plus infinite maps linked to it), each of those maps are 100x100 tiles of 64x64 pixels... which would mean lots of maps to generate.

Finally, our maps do change basically as soon as players interact with them, like picking up objects, dropping, or linked to quests. So no chance of caching them on the server.

Also, I cannot estimate when a player will enter an area, as players change direction at any time. So I would either need to load a lot of those map part without any need, or simply not have them on time, and therefore having the players walking on... empty areas.

You know, we are developing this game since more than 4 years now, so we tried already a lot of those techniques, searched a lot, and tested a lot. And we never stop doing it :-D. We currently have good performances, but it's by no way an easy code to make it work. If you want, I can explain more in details how we handle it.

Link to comment
Share on other sites

Re: can Neab make game like this?

hey

Sure, would be interested to see how you solved this problem.

I'm sure my suggestion works, since I used it for a project about 3 years ago, and google is using something similar for google maps.

It's true that I had A TON of images on the server, and was using quite a bit of bandwidth, but performance was good on a AMD 4000+ (client), and didn't get allot of hits on the server.

Want my MSN?

Link to comment
Share on other sites

Re: can Neab make game like this?

Again, as said, works while it uses a lot of network, and for things like google maps there is basically no other options. But doesn't work well if your map change basically for each player and on each map load (that's basically what happens on my game, due to plants harvested, object left on the map, holes and map part modified due to quests conditions). So it would require that the server render those maps each time.

Now on my side, what I did is a quiet huge number of tricks mixed together:

- To cache the images, I use first the old trick of the javascript preload, but only for the tiles needed on that map, and yet only if those have never been loaded.

- To avoid to reload images, I do not close the frame containing the map, it's simply hidden when I need to display something else (like the inventory). So basically the map, with the script and all the tiles are still there.

- To speed up access to the DOM objects (all the different tiles are accessed via their DOM ID), I cache the object reference into arrays. Dom is much slower than having a obj.src='xxx';

- To speed up the rendering, I do hide the objects layers when the objects are... not there.

- To speed up the rendering, instead of changing the source of all the images, I draw them inside a HUGE IFRAME, with overflow: hidden. then scroll the iframe when I need to display something, and just move the last/first row/column to the missing location. And change the source of the images only for that particular row/column. This means instead of moving 100 tiles (your 10x10 grid example) I move only 10, and change those 10 .src property.

Now just to give you an idea... as our game normally resize to use the whole browser window real estate, it may be a 20x16 grid... which would mean 320 tiles x 3 for the 3 layers (you somehow correctly saw). That would be way too much for any browser, beside maybe google chrome.

Now... I said somehow, as we do have 2 real layers, plus some floating divs for life objects, and other players.

So, yes, I would love to find better ways yet, even if now it takes about 4-10 milisec to draw a step on firefox 3.0 and about 10-30 milisec on internet explorer 7. So squash more speed here would not really make sense... what would make sense is add more effects... but we end up again in, either adding more images (which is... already too much), or add effect... but be blocked by gifs transparency... as PNG with alpha channel is not an option due to IE and of course that would not be animated...

Link to comment
Share on other sites

Re: can Neab make game like this?

If you have it rendering at 30miliseconds, (33.3fps) then keep it the way you have it.

The difference between my way and your is that on my way, you can have huge maps (say 10kx10k tiles), and you always only hold at most X tile sections in memory/on screen.

Also, in my solution, if the user "digs a hole in a tile", you will need to update that time graphic.

Now, I'm not sure how often users get to do that (change terrain), but I assume it's not that often.

Here is part of my solution:

http://gamearchitect.net/Articles/Strea ... tiary.html

This will improve a few things with the way you described your game:

- faster render speed (you only move part of the map, rather than the entire thing)

- smoother animation (you can move stuff the way you want)

- faster load time for users (only load what's needed)

- you can add bigger maps... virtually unlimited size since you only render what you need.

Hope that helps.

Link to comment
Share on other sites

Re: can Neab make game like this?

I understood what you are saying, and we already tested it for our maps. Actually we use it for our "World Atlas" which does exactly this. However the world atlas is used only to have an overview, the maps are only part of the maps (as we don't show inside buildings, or dungeons), and we do update only once per day without showing the dynamic changing areas.

- faster render speed? Well, due to the unique layer? Maybe... not sure

- Smoother animation? Why? We can move the way we want too? In fact if you use smooth step mode in out game, you will see that we scroll pixel by pixel, and not tiles by tiles. Due to the fact we are in this DIV and then scroll the div.

- faster loading time, yes, at least the first time. Later on, it doesn't take much time due to our caching.

- having big map is not really limited by our rendering technique. The point is that we need anyhow to have the map information in memory to allow to check if a player can walk, or do some action on some cell. So that would anyhow require to load the map information as a grid to make the checks inside Javascript.

- finally, last point, having something eating up a lot of server resource and bandwidth, is not really wise, as this is what cost most when you have a game. Instead having a distributed solution should be cheaper. Even if you have to live with some compromises.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...