Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: Map Storage For Game

by shotgunefx (Parson)
on Oct 25, 2001 at 09:29 UTC ( #121379=note: print w/replies, xml ) Need Help??


in reply to Map Storage For Game

Does one unit represent a grid (nxn dimension) or a point in space?

What is the unit of movement? Can objects only move gridsize units at a time or do you need partial movement, where an object could potential be in four "tiles" at once?

Knowing a bit more about the requirements and limitations can let you do a lot of tricks to speed up things.

I used to work at a game company years ago and did alot in these areas. If I can help, I'd be glad to give you some advice if it's something I've got experience with. Then again, our target machines where 386SX's so it was mostly done in ASM and some C. Very over optimized. Haven't done any games in Perl yet but the concepts should all translate.

-Lee

"To be civilized is to deny one's nature."

Replies are listed 'Best First'.
Re2: Map Storage For Game
by dooberwah (Pilgrim) on Oct 25, 2001 at 17:56 UTC
    Though nothing is final yet, I think that it's likely that we will have units that can move less than a tile at a time. In Civilization (and FreeCiv) your units, and your cities all take up one tile. We're trying to steer away from this, because in actuality a group of units would be much smaller than a city. We might just fix this problem by having cities be more than a tile in size, but it would be nice to look at all the options before we settle on something.

    -Ben Jacobs (dooberwah)
    Homepage: http://dooberwah.perlmonk.org
    PGP Public Key: http://dooberwah.perlmonk.org/mykey
    "one thing i can tell you is you got to be free"

      It seems like it would make more sense to have your tiles be at the most granular level you can make it. This provides you with the ability to have a more detailed terrain, and keeps the complexity of trying to move a unit only a portion of the way through a tile out of your system. It also gives you larger flexibility with the design of your cities. Cities wouldn't need to be square, they could be oblong shapes if you so desired.
      Having objects move at abitrary rates also brings up problems with collision detection etc. What type of terrain is this? What type of objects? How are they shaped?

      I think making an arbitrary world model in Perl could be slow. It depends on what the criteria is though. How many frames per second do you need?

      -Lee

      "To be civilized is to deny one's nature."

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://121379]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (4)
As of 2018-12-12 04:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How many stories does it take before you've heard them all?







    Results (57 votes). Check out past polls.

    Notices?
    • (Sep 10, 2018 at 22:53 UTC) Welcome new users!