PDA

View Full Version : Newbie trying something . . . prolly need help later.



TSmithwick
12-03-2003, 11:29 PM
Hello, all. Newbie here, been playing with Delphi off and on for years, have a project in mind and all too much time :cry: to do it in.
I want to clone the original Civilization, or rather something between that and the old Empire games.
I've already decided on the PowerDraw library, DirectX being fast enough to make even Nooby code look good.
One difference is that I'm going to use a Hex tiled map instead of squares. I know many wargamers and they're pretty well in agreement that this is much more realistic - no cutting diagonals to get 40% more speed out of your units.
I don't want to concentrate on the resource allocation too much, at least at first, instead making this a strategy-heavy game.

One early question. Does anyone have any preference for point-up versus point-sideways orientation? And why? I can't really decide and this is pretty basic - though I'm currently coding one, tell my your favorite.

Help I'll need later will include pathfinding for enemy units, some kind of AI, and advice on how to implement multiplayer (since I don't think my AI will be very challenging).

Terry

Sly
13-03-2003, 05:50 AM
It might help to take a look at C-evo (http://c-evo.org/), a free strategy game based on Civilization. It is written in Delphi 4 and source code is provided.

Alimonster
13-03-2003, 01:04 PM
Here's a link to Amit's site about game programming stuff, specifically hex tiles: http://www-cs-students.stanford.edu/~amitp/gameprog.html#Hex. There's some good stuff on that site, including path-finding (like A*). There are a few more Delphi implementations of the A* algorithm - including one (http://terraqueous.f2o.org/dgdev/viewtopic.php?t=348) in the tutorials page here at DGDev :cat:. You can also have a look at RiverSoftAVG (http://www.riversoftavg.com) and this GamaSutra article (http://www.gamasutra.com/features/19990212/sm_01.htm) for more Delphi A* fun.

TSmithwick
13-03-2003, 08:46 PM
Well, Sly, you're "wasting" my time alright. I've downloaded CivEvo (or cEvo?) and expect to spend the next week or so - <ahem> 'studying' the code. I'm especially interested in the interface for the AI modules; are they sufficiently high-level to ignore implementation details such as the switch from squares to hexes. Also, his technology tree might be cleaner and easier to incorporate (though I'm still not sure I want to get that detailed). :?

Alimonster, thanks but I've already seen Amit's excellent site. Still have a few tutorials to go, and will be reviewing it all. I especially liked the customized Google search for 'hexagonal tiling'.
Of course, I saw the article here as well.
The RiverSoftAVG and Gamasutra are new links. Thanks! :D

cairnswm
14-03-2003, 04:33 AM
My article on the 'Nearly A* Pathfinding' was based on experience trying to use the free components from RiverSoftAVG. I found the overhead of using the components much to difficult and once I had studied the code (took about a week) I used my understanding of it to write my own.

Modifying the code to use a hexagonal implementation would be pretty easy as only the offset array would have to be adjusted.