Results 1 to 8 of 8
Thread: Turn based game
- 12-13-2011, 07:36 PM #1
Member
- Join Date
- Nov 2011
- Posts
- 49
- Rep Power
- 0
Turn based game
I just finished a text based rpg in java and have some time off before school starts up again in January. I have studied the 2d graphics chapter in my java book and am thinking about designing a turn based game, something akin to Sid Meier's Civilization V. Of course nothing as glamorous as that. I want to do something basic that has stats and abilities change with incrementing time.
My question is if someone can point my in the right direction for researching how to implement turn based features in java? I'm not sure where to start looking.
- 12-13-2011, 09:26 PM #2
Re: Turn based game
Just curious, What are "turn based features"?turn based features in java?
- 12-14-2011, 01:44 AM #3
Member
- Join Date
- Nov 2011
- Posts
- 49
- Rep Power
- 0
Re: Turn based game
Sorry if I wasn't clear enough. With the game I'm thinking of making I need to create a way to count time. In this case time equals a turn. For each turn stats and abilities of the player and the players enemies will increase and decrease based upon actions of the player. So right now I'm trying to design the logic of how to increment time. I'm thinking of using a counter to increase time by 1 every time the player hits the next turn button.(The player would hit the next turn button once they have done everything they can or want to do that turn.)
I'm wondering if there is a better way to design this than using a counter, possibly with a class or method that I'm just not aware of?
- 12-14-2011, 01:57 AM #4
Re: Turn based game
Not sure what your goals are. Sounds like a counter would work.
You can measure clock time with methods in the System class.
If you want to give a set time to a player, you could use the Timer class.
- 12-14-2011, 02:13 AM #5
Member
- Join Date
- Nov 2011
- Posts
- 49
- Rep Power
- 0
Re: Turn based game
I would program times when specific events would occur during the game. For example, every three turns a new citizen is born in the players home town; or, if the player decides to build roads at some point in the game, this would then set off the road method that would require the player to spend money on upkeep for the roads every ten turns. Should I read up on the java documents for the System Class, or do you think that my design idea here would work well?
- 12-14-2011, 02:17 AM #6
Re: Turn based game
Sorry, I have nothing to say about what you are trying to design.
The method in the System class I mentioned is a simple way to get the current time.
- 12-14-2011, 11:32 AM #7
Moderator
- Join Date
- Apr 2009
- Posts
- 10,484
- Rep Power
- 16
Re: Turn based game
A game loop.
Since this is a turn based game, the easiest is simply to say that each time round the loop is a turn.
During that turn you do all the house keeping.
- 12-14-2011, 06:02 PM #8
Member
- Join Date
- Nov 2011
- Posts
- 49
- Rep Power
- 0
Similar Threads
-
i need an example of JSR179 ((Location based Ser)implementation for CDC based device
By talk_to_vivekmishra in forum CDC and Personal ProfileReplies: 3Last Post: 12-30-2010, 10:07 AM -
Implementing "Game Over" in Minesweeper game based on Gridworld framework.
By JFlash in forum New To JavaReplies: 2Last Post: 08-05-2010, 04:49 AM -
creating a text based game
By Phobos0001 in forum New To JavaReplies: 1Last Post: 02-12-2008, 04:35 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks