strategy game

Started by fireside, October 01, 2008, 04:23:15 AM

Previous topic - Next topic

fireside

My next project, which is basically in the concept phase, will involve turn based strategy but be single player.  I was inspired by RoBombs to do something involving pathfinding and AI.  I plan to start fairly simple with just a fight test, but as usual, I think more in terms of characters because I'm a modeler.  Anyway, this is a character I plan to put in the game.


It's just taken from inside of Blender so far.
click here->Fireside 7 Games<-

fireside

#1
Finally got started on this project.  I'm not the greatest programmer, so things are going a little slow.  So far I can click and put a cube on the closest square of a 30X30 grid and then move around another cube which will show possible moves.


The next thing is to set up an imaginary map using a two dimensional array that has character position and blocked squares because of walls or something and implement astar pathfinding.  I'm not sure if strategy is the right name for this game but it won't really be role playing either since there won't be character choices, etc, but it will eventually act somewhat more like a role playing game with a story without as much inventory management or camping and whatnot.  I plan on wandering around in first person and then jumping to a high altitude 3rd person when there is a fight.
click here->Fireside 7 Games<-

EgonOlsen

#2
Sounds like Heroes of Might and Magic with a first person view or something. I remember the old AD&D games that did the same: First person (very basic of course) when moving around and a turn based view from above (or isometric) when there was a fight.

Edit: My own RPG for the Amiga did exactly the same thing... ;)

fireside

#3
Yeah, where I saw it was from the game Betrayal at Krondor.  It's so old that the first person view is more like a slide show and then they do turn based fighting from a somewhat overhead.  The game is still a lot of fun, though, except for the slide show effect.
click here->Fireside 7 Games<-

fireside

#4
This is the latest screen shot from my project.


I've been using a still of the dragon as a test model.  Right now I can move the mouse around and the marker will follow it in a closest to grid motion and then when I click the dragon will turn and move to it.  I've written an astar path finding algorithm from a tutorial on the internet but haven't installed it in the game yet.  The dragon looks pretty small but I think it will be alright with animations.  The trees are experiments with billboarding that seem to work pretty good.  I'm considering using a map for main movement and then doing closeups for fights and towns to save file space.
click here->Fireside 7 Games<-

fireside



I've finally gotten the applet working properly.  I have idle and fly animations for the dragon.  It seems to run fairly well with this number of trees but I'll have to see what happens when more characters are in the scene.  Next is getting my astar algorithm in the game.  I also tried a different world texture.  The grass seemed too redundant.
click here->Fireside 7 Games<-

fireside

I think I have the path finding implemented now.  I'll have to do some testing but it seems to work.  I plan to put up a small demo when I'm sure it's OK.
click here->Fireside 7 Games<-

fireside

click here->Fireside 7 Games<-

paulscode

Cool.  What heuristic are you using in your pathfinding code?

fireside

I'm using the Manhattan thing from this tutorial I found. I think it's the simplest one.  I hope that's what you mean.  Otherwise I'm just using zero right now for the other thing.
click here->Fireside 7 Games<-

EgonOlsen

Nice. However, i got this once right after clicking somewhere into the applet:

Exception in thread "Thread-11" java.lang.NullPointerException
at org.me.hello.WebPlayer.move(WebPlayer.java:391)
at org.me.hello.WebPlayer.run(WebPlayer.java:143)
at java.lang.Thread.run(Unknown Source)

fireside

Yeah, it's still a little buggy.  ;D
click here->Fireside 7 Games<-

paulscode

The manhattan distance heuristic is what I am using in my pathfinding code too.  Basically that's adding the difference in x to the difference in y to estimate distance to the target - less precise than using a pythagorean distance heuristic, but much faster in most cases.

fireside

Yeah, I think speed is the most important.  It probably doesn't matter much for this game because it will be turn based, but real time games where the npc's are constantly making decisions like Robomb, I think you would need the fastest thing you could get. It should come in handy for lots of games.   
click here->Fireside 7 Games<-

EgonOlsen

Quote from: fireside on December 13, 2008, 08:44:25 PM
...but real time games where the npc's are constantly making decisions like Robomb, I think you would need the fastest thing you could get. It should come in handy for lots of games.   
It shouldn't be too slow, but whether you are doing a sqrt or not usually doesn't matter. Even less in Robombs, where the bots are running on their own client instance, i.e. they are running in their own thread. On current multi core cpus, i have at least 75% of one cpu available for AI, which, if used properly, could lead to much smarter bots than i have today...