Author Topic: strategy game  (Read 26756 times)

Offline fireside

  • double
  • *****
  • Posts: 605
    • View Profile
strategy game
« on: October 01, 2008, 04:23:15 am »
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.
« Last Edit: October 01, 2008, 04:29:03 am by fireside »
click here->Fireside 7 Games<-

Offline fireside

  • double
  • *****
  • Posts: 605
    • View Profile
Re: strategy game
« Reply #1 on: November 19, 2008, 09:57:38 pm »
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.
« Last Edit: November 19, 2008, 10:09:53 pm by fireside »
click here->Fireside 7 Games<-

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11776
    • View Profile
    • http://www.jpct.net
Re: strategy game
« Reply #2 on: November 19, 2008, 11:08:21 pm »
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... ;)
« Last Edit: November 19, 2008, 11:10:12 pm by EgonOlsen »

Offline fireside

  • double
  • *****
  • Posts: 605
    • View Profile
Re: strategy game
« Reply #3 on: November 19, 2008, 11:24:45 pm »
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.
« Last Edit: November 19, 2008, 11:27:26 pm by fireside »
click here->Fireside 7 Games<-

Offline fireside

  • double
  • *****
  • Posts: 605
    • View Profile
Re: strategy game
« Reply #4 on: November 30, 2008, 06:26:12 pm »
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.
« Last Edit: December 01, 2008, 04:11:01 pm by fireside »
click here->Fireside 7 Games<-

Offline fireside

  • double
  • *****
  • Posts: 605
    • View Profile
Re: strategy game
« Reply #5 on: December 05, 2008, 06:00:40 am »


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<-

Offline fireside

  • double
  • *****
  • Posts: 605
    • View Profile
Re: strategy game
« Reply #6 on: December 11, 2008, 06:02:47 pm »
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<-

Offline fireside

  • double
  • *****
  • Posts: 605
    • View Profile
Re: strategy game
« Reply #7 on: December 13, 2008, 04:59:20 am »
A demo of path finding can be found here:
http://fireside7games.com/labz/strat_test1.html
click here->Fireside 7 Games<-

Offline paulscode

  • double
  • *****
  • Posts: 863
    • View Profile
    • PaulsCode.Com
Re: strategy game
« Reply #8 on: December 13, 2008, 01:19:55 pm »
Cool.  What heuristic are you using in your pathfinding code?

Offline fireside

  • double
  • *****
  • Posts: 605
    • View Profile
Re: strategy game
« Reply #9 on: December 13, 2008, 02:43:32 pm »
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<-

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11776
    • View Profile
    • http://www.jpct.net
Re: strategy game
« Reply #10 on: December 13, 2008, 03:52:37 pm »
Nice. However, i got this once right after clicking somewhere into the applet:

Code: [Select]
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)

Offline fireside

  • double
  • *****
  • Posts: 605
    • View Profile
Re: strategy game
« Reply #11 on: December 13, 2008, 04:34:42 pm »
Yeah, it's still a little buggy.  ;D
click here->Fireside 7 Games<-

Offline paulscode

  • double
  • *****
  • Posts: 863
    • View Profile
    • PaulsCode.Com
Re: strategy game
« Reply #12 on: December 13, 2008, 08:20:05 pm »
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.

Offline fireside

  • double
  • *****
  • Posts: 605
    • View Profile
Re: strategy game
« Reply #13 on: December 13, 2008, 08:44:25 pm »
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<-

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11776
    • View Profile
    • http://www.jpct.net
Re: strategy game
« Reply #14 on: December 14, 2008, 12:24:18 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...