Results 1 to 10 of 10

Thread: Civ-like tile based game

  1. #1
    Guild Adept loogie's Avatar
    Join Date
    Mar 2008
    Location
    Strathroy, ON
    Posts
    364

    Help Civ-like tile based game

    Hey guys, well I've been busy fooling around with programming and such, and have decided to try my hand at game programming... my idea came about after learning basic 2d drawing in XNA, which is directx, used in pretty much every xbox and windows game available... that and that i've been playing a lot of old games lately, one of which is called Masters of Magic... which is very much like civilization, but without tech, and with a combat sim resembling might and magic heros...

    Talking with my friends about how much fun this game was, made me think about creating one myself, and so i've started...

    The thing i need help on tho, and why its actually posted at this site, is how to build a tile based map, randomly, without it becoming some wierd and unrealistic mess?

    I'll try to post any ideas i come up with, but if anyone has any good ideas on how to programatically create a random map, let me know!
    Photoshop, CC3, ArcGIS, Bryce, Illustrator, Maptool

  2. #2
    Software Dev/Rep Redrobes's Avatar
    Join Date
    Dec 2007
    Location
    England
    Posts
    4,807
    Blog Entries
    4

    Post

    Well you have MapTool in your sig which could do it. Or you could run Robs dungeon creator script in Gimp or you can take the tiles I made for the August challenge which are still up in zip form. Alternatively you could write your own script to make them but if you ask me the best way would be to get a load of tiles together and render them out with directx as part of the game engine.

    You can also put yourself on our members location map now too

  3. #3
    Guild Adept loogie's Avatar
    Join Date
    Mar 2008
    Location
    Strathroy, ON
    Posts
    364

    Post

    well, i mean random maps upon game start... like civ does, basically i'd need ideas about the steps to create a random world that looks fairly realistic... but the tiles i'll definitely look at, i'm planning on making my own as well eventually
    Photoshop, CC3, ArcGIS, Bryce, Illustrator, Maptool

  4. #4

  5. #5
    Community Leader jfrazierjr's Avatar
    Join Date
    Oct 2007
    Location
    Apex, NC USA
    Posts
    2,963

    Post

    You could also use GIMP to create a random "world" map.
    My Finished Maps
    Works in Progress(or abandoned tests)
    My Tutorials:
    Explanation of Layer Masks in GIMP
    How to create ISO Mountains in GIMP/PS using the Smudge tool
    ----------------------------------------------------------
    Unless otherwise stated by me in the post, all work is licensed under a Creative Commons Attribution-Noncommercial 3.0 United States License.

  6. #6
    Community Leader Facebook Connected Ascension's Avatar
    Join Date
    Jun 2008
    Location
    St. Charles, Missouri, United States
    Posts
    8,313

    Post

    The main thing about the CIV tiles is that the grass, sand, water, etc. are just one base pattern for said elements. The problem is how to call up the various things that decorate the base like mountains, rivers, forests, lakes, and commodities like cows, iron, pastures, etc. I have the pics from CIV 4 unPACked (a PAC file is sort of like a zip file) onto my pc in a folder that I look at often for ideas. If you want I could send any of this to you so that you could reference them for helping you think your way through the process. I also have the pics for the Fall from Heaven mods in all of its various forms and upgrades and the Beyond the Sword bonus pack. I have all of the past CIV games and bonus packs as well...huge fan can't ya tell
    If the radiance of a thousand suns was to burst at once into the sky, that would be like the splendor of the Mighty One...I am become Death, the Shatterer of worlds.
    -J. Robert Oppenheimer (father of the atom bomb) alluding to The Bhagavad Gita (Chapter 11, Verse 32)


    My Maps ~ My Brushes ~ My Tutorials ~ My Challenge Maps

  7. #7
    Guild Adept loogie's Avatar
    Join Date
    Mar 2008
    Location
    Strathroy, ON
    Posts
    364

    Post

    yeah exactly, i don't want to create one big random map that will be the same every game, i want to create a new map for each game... i don't think plugging in to gimp (if thats even possible) to build a map would be worth it...

    but what your talking about ascension is what i was looking for, mostly the way in which they work out how to create continents, where to put the mountains, rivers, forests, fields, etc etc and all that...
    Photoshop, CC3, ArcGIS, Bryce, Illustrator, Maptool

  8. #8
    Software Dev/Rep Redrobes's Avatar
    Join Date
    Dec 2007
    Location
    England
    Posts
    4,807
    Blog Entries
    4

    Post

    Have you looked at my Instant Islands app ? That sounds similar. It doesnt do the trees and water etc but to create a rough and random height map and paint out where the water and land belong is pretty easy stuff.

    Its a freebie so just get it and play.

    To get more detail would require a more complex algorithm which is where my other apps come in but they're not available.

    If you like the app then here are some detailed tips (oh even source code I see !) on how to get a similar effect.
    http://gameprogrammer.com/fractal.html
    Last edited by Redrobes; 11-04-2008 at 06:42 PM.

  9. #9
    Community Leader Facebook Connected Ascension's Avatar
    Join Date
    Jun 2008
    Location
    St. Charles, Missouri, United States
    Posts
    8,313

    Post

    Yeah, that's the rub...it's in the programming and I don't know anything about programming since Basic went away. Basically the images for terrain are laid out in 16 X 16 grids for rivers, beaches, hills, mountains, roads, and railroads. The programming somehow can chop up the images based upon the 16 grid slices and then plop 'em down in various ways to create the world file. The programming also can choose between sand, grass, and ice base terrains to put the other things on top of. I haven't looked through the forums there for this but I know that civfanatics.com has the largest forums I've ever seen. There are tons of mods there and maybe if you ask some of the folks over there they might help ya out or there might even be a tut. In fact I think I remember a sticky subforum on how to make your own mod and that might be a good place to start.
    If the radiance of a thousand suns was to burst at once into the sky, that would be like the splendor of the Mighty One...I am become Death, the Shatterer of worlds.
    -J. Robert Oppenheimer (father of the atom bomb) alluding to The Bhagavad Gita (Chapter 11, Verse 32)


    My Maps ~ My Brushes ~ My Tutorials ~ My Challenge Maps

  10. #10
    Administrator RobA's Avatar
    Join Date
    Apr 2007
    Location
    Niagara, Canada
    Posts
    5,567

    Default

    Another option would be to use a random terrain generator like Wilbur. It can run erosion and determine river location.

    You could export the heightfield, a slopemap, an ocean mask, all of which could be taken and pixelated. From there it is a matter of using the heightfield and latitude to perform a lookup into your terrain tiles; use the elevation, latitude and slope to lookup the cover tile attributes (forrest, bare, brush, grasslands), and the river mask to add rivers...

    I don't think Wilbur can be scripted though.

    -Rob A>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •