School Assignment? Project Due Tomorrow? Chat LIVE With A Programming Expert!

Welcome to Dream.In.Code
Become an Expert!

Join 307,145 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 1,718 people online right now. Registration is fast and FREE... Join Now!




Text Based games

 

Text Based games

Xaveir

29 Oct, 2009 - 12:16 PM
Post #1

New D.I.C Head
*

Joined: 29 Oct, 2009
Posts: 1

Hi, i was wondering if anyone knows how text based games like ogame create there turn based system?

Thanks
Xaveir

This post has been edited by Xaveir: 29 Oct, 2009 - 12:17 PM

User is offlineProfile CardPM
+Quote Post


s3thst4

RE: Text Based Games

29 Oct, 2009 - 06:27 PM
Post #2

Lollercoaster
Group Icon

Joined: 20 Nov, 2008
Posts: 567



Thanked: 3 times
Dream Kudos: 425
My Contributions
A good reference for that kind of stuff: Reference
User is offlineProfile CardPM
+Quote Post

Dogstopper

RE: Text Based Games

29 Oct, 2009 - 06:38 PM
Post #3

The Epiphany
Group Icon

Joined: 15 Jul, 2008
Posts: 560



Thanked: 40 times
Dream Kudos: 675
My Contributions
I created a simple turn-based text game. Here is the pseudo code.

CODE

while (enemy and me are alive):
    player attack options such as attack, eat, run, sleep, you get the idea.
    enemy attack option with maybe a random number generator?
else
    end combat


There is a simple idea.
The attack options can vary based on the player's inventory or level or whatever other effect that it may have.
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic

Time is now: 11/21/09 03:41PM

Live Help!

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter Fan Us On Facebook

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month