A possible solution

March 4, 2009 on 5:14 pm | In Game Environment | No Comments

Having thought about the problem I outlined in the post just now and having spoken to a mate, I think that I’m doing what many sole developers do and that is overcomplicating the problem.  Although the background of the game is that the game world is equivalent to the real world I shouldn’t be trying to shoehorn the game into real world physics.  One thing that makes the WoW world work as well as it does is that it is broken up into (large) chunks of land, mostly joined together with small pathways of land and bridges.  These zones also have level requirements and flight paths (instant teleportation).

So, I’m still going to aim for the rough land mass that I was going to, but it will be vastly smaller than I originally was contemplating.  As a note (more to me than anything else), traveling 1000 flat tiles would take 50 minutes – this is roughly 4 miles!

Oh, I keep forgetting to say that I’ve finally begun to code the travel aspect of the game, as with the rest of the game, using a combination of php and js it now loads up a 5×5 grid of tiles, caching them appropriatly.  The actual mechanism for moving the tiles is also in place and is far better than I original thought about doing it.  My next task is to configure it so that you can move in 8 directions and to load those tiles as necessary and remove the tiles that are no longer visible.  After that I need to start to think about putting in specific tile data to control the directions you can move in.  From there I can perform the necessary speed and performance testing and tweak the storage method of the data.

A Problem…

March 4, 2009 on 2:20 pm | In Game Environment | No Comments

Ok, problem is perhaps too strong a word, but more of a challenge relating to the whole travel map part of w2.  I’ve done a few calculations so that I know potentially what scope of graphics I need an artist to produce.  If I aim for a tile (64 pixels) being equivalent to 20ft, then 1 mile is going to need 264 tiles (16,896 pixels).  Now in reality that’s only going to take 13.2 minutes to traverse (presuming its all level terrain).  Now using a common set of tiles would result in 1 square mile being able to be generated pretty quickly – though splitting them up may be fun…  The problem that I currently run the risk of is the same as Vanguard did a couple of years back, that the world will end up far too large and players could end up not seeing anything for long spaces of time.

Now my intention is to ensure that each race has its own themed area (1 mile across) in a specific theme for their background (plains, woods, swamps & desert).  Around this area would be large land masses with gateways to dungeons and such like (similar to diablo2).  Now my original intention was to have these areas gently blend into each other and for it to all fit within a world map.  However looking at this logically – the UK is 909 miles long, this would equal 239,967 tiles long.  Factor in that the UK is actually small in comparison to most other continents and you suddenly find that doing a ‘true’ map is not just impossible, but actually impractical as well.

Now I’m sure that I’ll think of ways round this, but initially these are some possibilities:

  • zones have ‘magical markers’ that prevent characters from going over them
  • zones are created with natural edges – mountains, crevices etc – would have to be worked into the background as some type of catrostrophy
  • zones are linked via magical circles/transport stones
  • everything lives within a small number of zones which are all border connected.  Background would have to justify why all races are so close – some continuity issues regarding variation of racial landscapes (swamp next to a desert)

Some kind of magical transportation would be quite useful regardless of what solution is found – characters ought to have some kind of spell or object that allows them to go home.  (Hearthstone, Gate Spells)

Tile Types

March 1, 2009 on 9:24 pm | In Game Environment | No Comments

This post is going to be pretty much my musings on what data is needed for the travel map and as such I hope that at the end of it I’ll work out the best way of coding the ‘database’.

Each tile needs to be related to a target graphic.  Target graphics will belong to a grouping (e.g. grass) and then a sub item within that group, this would allow variation within these groups.

Groupings will have a inate passability/difficulty rating that effects how difficult that tile is to cross and in fact if it can be crossed.  I don’t think that there is any need to overwrite this on induvidual tiles as the graphic should provide visual recognition on how difficult that particular tile is.

The difficulty of the tiles around the character will effect what directions they are able to move in.

The above items indicate that all of the stats can be held on a tile grouping basis, rather than induvidually per tile.  This does make life a lot easier in certain respects.  Now the potential issue will come from how to store what could be thousands of tiles worth of stats.    I’m still thinking flat file that would contain serialized objects and use the fgets function (breaks on chr10).  If all of the required tile id’s are placed into an array then we need to only read up to the relevant line.  This way we don’t risk the chance of bloating ram with reading the whole file.  One thing that is worth investigating however is to see if its possible to pre-populate a variable across the whole website

March 1, 2009 on 6:10 pm | In Game Environment | No Comments

Having thought about it overnight I think that a Zelda-esq map system is going to be the best direction to take.  Programatically its far more logical as it can use a regular co-ordinate system rather than an ‘offset’ system.  Even though I have coded isometric configurations before but it seems unecessarily complicated.  The key element is to ensure that the graphics don’t look cartoon like, else the game is going to end up as ‘yet another indie game’ or a Zelda clone, which would cheapen the whole game entirely.   Currently I’m thinking of (ultimatly) having 3 different map types.

Travel Map: each small square represents roughly 20ft by 20ft.  Character will be represented by a generic blob (initially) and travel from square to square.  A person walks at an average of 5ft per second, thus on flat ground would cover one tile in 4 seconds.  This is quite a long time, so creatures should be able to cross the same distance in 3 seconds intially, difficult terrain will take a bit longer to traverse.  When a creature fully enters a tile then it can do the necessary ‘what can I see’ checks etc.

Village Map: would be displayed when a creature enters some kind of village or area where they can select buildings to visit.  Should be of a larger scale than the travel map.  This scale map would also be the scale that I’d use for dungeons when they eventually get added.

Location Map: largest scale there is and used to shown things like the inside of buildings where you can interact with things.

I’m still unsure on how to create the chuffing travel map though :(   It’s a difficult one to be honest.  Creating a proper admin tool would mean that it keeps the control of the map within the game, however it would require a significant amount of development that in all honesty wouldn’t be used anywhere else.  This would mean the map would either need to be created by hand or using a separate tool of some kind, neither of which is that desirable.

Entries and comments feeds. Valid XHTML and CSS. ^Top^ Powered by WordPress with jd-nebula-3c theme design by John Doe.