ZJRP.COM
welcome to my space
X
Search:  
 HOME   C++ Game Design - Eagle Eye Scrollable Map?
C++ Game Design - Eagle Eye Scrollable Map?
Published by: smith 2010-03-16
Welcome to:zjrp.com

  • Hey all,

    I am hoping someone might have programmed something like this before. Basically it is the same as any rts, where the screen is only focused on one part of the map, but can be scrolled, and actions still take place offscreen.
    HTMS Education Links::
    Shodor Activities - scroll to Box Plot, Box Plot 2, Measures, Plop It Eagle Eye Cam - Hancock Wildlife in Hornby Island, British Columbia, Canada
    http://htms.springdaleschools.org/links.html
    HOME

    I'm still pretty new to c++, but I am wondering if you could use an 2D array to store data for the map, and then call data from that array based on the position of the screen relative to the map?

    The map I have in mind will be somewhat big, so I was hoping to create something that has no lag and doesn't hog memory/cpu time. Any ideas would be appreciated.

    Thank you,
    Cedwyn


  • Thank you for your help, that is what I had in mind. I was thinking of using a tiled array system, where a single array cell counts as a tiny tile, but wasn't sure if a huge array of many small tiles would create any processing problems :)

    As for the coding, I'm thinking of making each cell in the array (if it has a unit on the tile) be a pointer to an unit object. I figure this is better for the system as I can delete pointers when a unit dies, as well as allow selecting multiple units. Ie. An array called 'selection' holds the pointer data for all units selected.
    The Inform Designer's Manual::
    File Format: PDF/Adobe Acrobat - View as HTMLand for many games design begins with, and is periodically interrupted by,. research. If constructing geography, maps of real mountain ranges, river valleys
    http://www.inform-fiction.org/manual/Chapter8.pdf
    HOME
    Transformers Movie News::
    The Eagle Eye premiere red carpet event featured more than a few people involved with .. Scroll down to "Trailer 4" and press the right arrow key on your
    http://www.seibertron.com/news/index.php?f_cat=4&f_keyword=trailer
    HOME

    If anyone has anymore thoughts or ideas, please share :)


  • ^with C++ your not going to be killing your CPU that much for simple array modifications ect. But for this type of thing I would make a multidimensional array for.

    Array: [[id(type), #(relative to number onscreen), hp(health), x, y]]

    Basically then when you have Type soldier attack type soldier (of the enemies multidimensional array) you can use basic math to find if they are on the screen if thats true then use simple math to simulate a bullet firing between the units sub from their hp in each array.

    Note that the types would have to be defined with properties such as Total HP and damage range (x1 to x2). Game design takes a lot of time so make sure your spending more time thinking than you are coding or you will end up wasting dev time.

    I hope this give a brief example and design logic to go from.

    /edit, additional information.

    Tiled world with free from movement. Tiles will give you a very clear estimate on hit regions and path finding while allowing for a more realistic unit movement style (remember RTS tiles are usually larger around 100x100pixels to 150x15pixels.


  • Scratch what i said.

    Units: [[id(type), #(relative to number onscreen), hp(health), x, y]]
    -Where X, Y are true pixel cords on the map.

    Buildings: [[id(type), #(relative to number onscreen), hp(health), x, y]]
    -Where X, Y are tile locations on the map.

    This will allow tiles hit detection to be altered when a building is created above the tile or if it is destroyed. And units movements along the nodes (nodes are in the center of every passable tile.

    Also if your doing the tiles as ISO (such as starcraft), then these ideas may not work.





  • Where was the last debate on wednesday with Mccain and Obama?
    INSTANCE / WAITING FOR SPRING

    You are looking at:zjrp.com's C++ Game Design - Eagle Eye Scrollable Map?, click zjrp.com to home
  • famous photographers birds and insects
  • help me choose
  • my first cc request my son on chinook pass wa
  • bronze ish black and white effect
  • x4 to double mp s
  • first 40d pics d 4 pics
  • do these look to over sharpend to you
  • to shoot in b w or convert
  • problems again
  • xsi
  • a bit of strobist experimenting c c please
  • been practicing ready for 2nd c c
  • should i use aliases if i am an artist in different mediums
  • great tits
  •  
  • portrait attempts
  • live band shots
  • scenic shots cnc please
  • cc on the rocks
  • first flower shot cc please
  • what should i buy lens or flash
  • cc calder s la grande vitesse
  • baby on a bench
  • help with web posting
  • need a opinions from wise photographers
  • pictures of people c c
  • again
  • skyline
  •  Homepage | Add to favorites | Contact us | Exchange links | LOGIN | Site map | 
    Copyright© 2008 zjrp.com        Site made:CFZ