Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / Room Escape Help with starting

Author
Message
Derekioh
17
Years of Service
User Offline
Joined: 1st Feb 2009
Location:
Posted: 18th May 2011 01:58
Hello DarkBasic Pro community!

I was wondering if anyone had any idea how I would go about creating a room escape game. I want it to be 3d and first person so you can walk around, but i want interactive objects that you can combine and use in the room to escape. Does anyone know how I would go about doing that? Or where to start? Or somewhere to point me in the right direction?

To clarify I am not asking for someone to write source code for me (although a demo or sample is always nice )

chafari
Valued Member
20
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 18th May 2011 02:14 Edited at: 18th May 2011 02:21
Imagine you are into a room, and there`s a closed door...you will have to find a key to open this door. If we have several objects into the room, we can place the key hidden somewhere, so if we find the key, you can program a pop up notice saying FOUND KEY or perhaps in the main screen you can show a little blinking key or whatever you like, then you can go to this closed door and with the key will be open...

Have a look to one of my examples.




NOT MEDIA NEEDED

http://forum.thegamecreators.com/?m=forum_view&b=1&t=48011&p=175

Cheers.

I'm not a grumpy grandpa
Derekioh
17
Years of Service
User Offline
Joined: 1st Feb 2009
Location:
Posted: 18th May 2011 23:05
Sorry for the late response...but thanks! I dont have time to look at it at the moment, but when i get back in a couple of hours i shall take apart your code and come up with some new questions! Thank you

29 games
20
Years of Service
User Offline
Joined: 23rd Nov 2005
Location: not entirely sure
Posted: 18th May 2011 23:16 Edited at: 18th May 2011 23:33
A way you could do this is to have some variables that program use to know if the player has picked an item up.

A simple example:

you could have a variable "KEY", which would equal 0 if the player doesn't have the key. When they pick the key up the variable "KEY" would equal 1. That way, when the player went to the door, all you need is to check whether the variable "KEY" equals 0 or 1.

If "KEY" = 0 then any attempt to open the door would yeild a message to state the door is locked and can not be opened.

If "KEY" = 1 then any attempt to open the door would mean the doors opens.


If you want to combine items, let's say there's a key down an air vent and the key can be retrieved by attaching a magnet to a stick, then there needs to be variables that shows the player has the items required to perform the action.

Then there is the question of having to perform multiple actions in order to get to the final goal. So let's say there's a grille that needs to be removed from the vent before so they can get the key but the player needs a screw driver to remove the grille. Then you need variables to show that the player has the screw driver, that would then give the option for removing the grille. Have a variable to show whether the grille has been removed or not. Once the player can see the key but any attempt to take it will show the message that it's out of reach. The player then gets the magnet and the stick and can then retrieve the key.

So you could set up the following variables show whether the player has:

the screwdriver
the magnet
stick
key

So

if "screw driver" = 0 then any attempt to remove the grille will fail
if "screw driver" = 1 then any attempt to remove the grille will succeed

if "grille" = 0 then their is no option to retrieve the key
if "grille" = 1 then they are given the option to retrieve the key

If "stick" or "magnet" = 0 then any attmept to retrieve the key will fail
If "stick" and "magnet" = 1 then any attempt to retrieve the key will succeed

Once you have the key you can open the door, as previously outlined.

The interesting thing here is, depending on how the room is set up, the screwdriver, magnet and stick could be collected in any order but have to be used correctly.

How you actually set up all these variable is up to you and your coding style.

It's then a case of working out how you want to show all this on the screen.

I hope this helps.

(Nice game, by the way, chafari)
Derekioh
17
Years of Service
User Offline
Joined: 1st Feb 2009
Location:
Posted: 19th May 2011 04:45
Okay, that makes since to me. Thank you. I will try to come up with a demo soon and show my progress and all the fun stuff.

@chafari: The game looked nice, I just couldnt compile it on this computer so I'm gonna try my desktop tomorrow. but that you!

Login to post a reply

Server time is: 2026-07-10 23:13:31
Your offset time is: 2026-07-10 23:13:31