Jump to content

  • Log In with Google      Sign In   
  • Create Account

markr

Member Since 23 Mar 2004
Offline Last Active Yesterday, 03:45 PM

Posts I've Made

In Topic: Open world RPG - how to efficiently simulate the whole world?

24 January 2015 - 02:06 PM

I'm going to reply and reiterate a very old maxim - premature optimisation is the root of all evil.

 

Your goal *may* be to make the "open world RPG" with 2000 NPCs and a zillion zones, etc,

 

But you might be overestimating the amount of content that you can reasonably create. You might subsequently change the scope of the game to be a bit ... smaller.

 

So don't do anything. Make a few NPCs work in a small world, and once you're happy with that, then you can expand it as you have additional content.

 

After all, a game with 2000 NPCs and a zillion zones, is really BORING if you don't have varied, detailed content to go with it.


In Topic: A diffrent type of rts.

26 December 2013 - 02:13 PM

Did you play the 1996 Bullfrog game "Genewars" ?
 

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

 

It had some similar ideas.

 

If it's still feasible, get a copy :)


In Topic: A* on large Map

26 December 2013 - 02:10 PM

You're going to have to put some instrumentation in to find out the answer to these questions.

 

If you implement it incorrectly, A* becomes the same as Dijkstra's algorithm. This still always finds the shortest path, but in some cases takes a lot longer.

 

You need to produce some test-cases where A* should be considering only a small number of nodes, to check that it really is only considering the nodes it needs to (not going to the opposite side of the map, looking for a shorter route, because there can't be one (assuming no teleporters, time machines etc, in the map))


In Topic: Javascript - access data of a file local to the document

20 October 2013 - 03:13 PM

You need to "notionally" do network access to get these data for images. But the images might come from the browser's cache if they're already available. You can encourage or enforce caching through a combination of web server headers and a cache-manifest file. Or you can just preload your images when your game starts so they're already available.

 

Once you have an Image object in memory, and you're holding a reference to it, it's not going to go away and you can use it without a problem. But when a player comes back to play the game again (in the same browser session or a different one), the assets need to come either from the server or the browser cache.


In Topic: Javascript - access data of a file local to the document

19 October 2013 - 08:00 AM

Image elements don't work on that level. You can't ask the Image object for its binary data. You can in principle extract the pixel data from an image, which might be an idea for loading maps or other assets.

 

If you want to do file IO for arbitrary (non-image) files, use XMLHttpRequest.


PARTNERS