Forums Register Login

Whats the best way to walk around?

+Pie Number of slices to send: Send
Hey everyone! I am trying to create my first game. It is going to be a text based RPG. Right now, i am just trying to figure out a way I can get a player to move around the world. For example on lets say the first move,
would be something like

"you have entered the room"

1. Desk
2. Door on left
3. door to right
4. door behind you

------------------------
Now, if you pressed 1, you would go to the desk and have these options:
----------------------
"you are now at the desk"

1. read note
2. leave desk
-----------------------
and if you pressed 2, you would go BACK to the options:
------------------------------------

"you have entered the room"

1. Desk
2. Door on left
3. door to right
4. door behind you
-----------------------------
And, well, thats how i want the player to be able to move within a limited world. Well, i have already tried numerous ways of doing this. Does anyone have any pointers to a good way to start this off, basic overview of design?
+Pie Number of slices to send: Send
Cool Sean -- I've been working on something similar for a while now so maybe I can help a little.

The example project that is available from the Blue J resources page is good.

I've found that for me a good way to start is to work out what objects are needed
i.e in this case the Desk, Room etc. could all be Places or something similar, and to have a Player or Character object that can move between them. The Place would have references to all of it's neighbouring Places, and would be the object that you would ask where you could move (as the player). Keeping it as simple as possible seems to be the best way to do it.
The BlueJ zork game is an excellent place to start, in my opinion. They have a good system and a parser as well if you were interested in making your game take text commands.

If you have any more questions or just want to bounce some ideas off someone, don't hesitate to post again and I'll see if I can help.

Good luck Sean!
+Pie Number of slices to send: Send
Put one foot in front of another? Oh and make sure you are standing.

Sorry, feeling sarcastic this life.

Mark
Seriously Rick? Seriously? You might as well just read this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 1141 times.
Similar Threads
Should I complain to prometric about a test center?
Dare you to...
Your own work pranks
Office Dares !!!
I got a new desk
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 11:55:07.