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.

Newcomers DBPro Corner / Survival Horror

Author
Message
Kenomica_deleted
20
Years of Service
User Offline
Joined: 30th Jun 2004
Location:
Posted: 1st Jul 2004 03:06
I Really Want To Create A Survival Horror, But Unfortunately I dont know where to start .Can somebody please help me ?

Thanx

Zeal
22
Years of Service
User Offline
Joined: 10th Oct 2002
Location: Colorado Springs, CO
Posted: 1st Jul 2004 05:07
If you have no programming experience youre going to need to start off SMALL. Start by making a basic pong or lunar lander game. Understand the basic commands and what they do. You should find lots of tutorials on this site. Start with a solid foundation then build your way up. Youll get there I promise.

Its going to be awhile before you can make a survival horror game. If you cant accept that, you need to accept the fact that you will never make a survival horror game. The real question is, how bad do you want it?

All you need is zeal
Kenomica_deleted
20
Years of Service
User Offline
Joined: 30th Jun 2004
Location:
Posted: 1st Jul 2004 05:58
I Want It reeaaallly bad lol i will start small.learn the commands,look up tutorials etc. i just seem to find all of the help tutorials are for FPS games.

Quote: "accept the fact that you will never make a survival horror game"
sorry but i didnt really understand what you meant by that part

zenassem
21
Years of Service
User Offline
Joined: 10th Mar 2003
Location: Long Island, NY
Posted: 1st Jul 2004 09:44
I think that he meant that you will accept that you will not be able to make a survival horror game your first time out.

It's kind of like telling someone who is just learning math for the first time thatt if they want to learn calculus, they will have to learn how to count first, then add, subtract divide..... algebra.... trig..... summations... etc... You don't just start off with a calculus problem.

Treat game programming the same way. Get some experience behind you. work up to a full-out firstr-third person shooter. If you try to push too fast too soon, you will wind up discouraged and frustrated. Take it step by step, building your skill set. Keep your goals and dreams in mind, but be willing to put in the time now to learn the fundamentals. There are no secret shortcuts to becoming a good programmer, except hardwork, pacing, patience, aptitude, experience. This isn't "Candy Land" and there is no "Liccorice Ladder". It's more like "Chutes and Ladders", and those that try to climb to quick usually find themselves slipping back down.
Just read and try out as much as you can, and stay focused and commited. It is better to accomplish small snippets and smaller games to really understand the principles than trying to attempt the near impossible from the start.

~zen


Kenomica_deleted
20
Years of Service
User Offline
Joined: 30th Jun 2004
Location:
Posted: 2nd Jul 2004 02:38
okay, Thanx, i see what you mean.i made a small,3d Pong game lol. i made a few mistakes which i was able 2 correct now am gonna start a fps or a 3rd person shooter.

SandraD
20
Years of Service
User Offline
Joined: 30th May 2004
Location: Down on the corner, out in the street.
Posted: 2nd Jul 2004 02:40
Amen to that Zen...

One must start out by programming the simple things first to gain some knowledge, then tackle the big project.

S.

Any truly great code should be indisguishable from magic.
Kenomica_deleted
20
Years of Service
User Offline
Joined: 30th Jun 2004
Location:
Posted: 2nd Jul 2004 05:07
hmm, i guess i shouldnt really rush into things. i admit i am finding some of the language a little hard to understand but im still just a newbie. This is the first language i have ever encountereed.well, tried to learn anyway.

Zeal
22
Years of Service
User Offline
Joined: 10th Oct 2002
Location: Colorado Springs, CO
Posted: 2nd Jul 2004 05:24
"If you cant accept that, you need to accept the fact that you will never make a survival horror game"

What I meant was if you cant accept 'that' (the fact that it might take awhile to make a survival horror game), you need to accept the fact that youll never make a survival horror game. In a nutshell accept the fact its going to be a long road or dont bother walking down the road at all.

Now having said that, the road to the survival horror game can be a lot of fun so dont get discouraged. It sounds like youre starting off in the right place with pong, ect... And try some of the fps tutorials too. Youd be surprised how many aspects of a fps apply to ALL games (3rd person or otherwise).

Ill bet you came here looking for some real advice for where to start on your survival horror game, so heres what id do if I were you....

When you feel like you understand the language a little better (after making some basic pong/fps mini games and reading many tutorials), try and start out with a simple room. Allow the user to move a character around the room. Apply some collision detection to your code to make sure the player cant move through solid objects (walls, desks, ect...). Remember if you cant model very well just use basic placeholders like boxes ect... just to give you an idea of where the player would be bumping into objects. Now after you have a basic room, try and figure out how record and write all of the 'room data' to a file (like what objects are in the room, their positions, ect...). Now you can go on and make another room, save it to a file as well, and then youll be ready to load different rooms as you walk around the house (I say house because im betting youre aiming for a Resident Evil 1-2 type game).

Once youve gotten that far come back here and ill tell you where id go from there .

BTW Im glad to hear you say "I Want It reeaaallly bad ". Remember all you need is zeal.

All you need is zeal
Kenomica_deleted
20
Years of Service
User Offline
Joined: 30th Jun 2004
Location:
Posted: 2nd Jul 2004 05:39 Edited at: 2nd Jul 2004 05:53
Thanx, lol i will come back after better understanding.it might take a while as i am not the quickest learner but i am prepared to do what ever it takes. however long it may take

Also, i'm planning a mmorpg, not now but in the very far future lol,i think i read that DBP lets you make games online without having to pay for people signing up and playin, is this true?
thanx for all ya help,its greatly appreciated

SandraD
20
Years of Service
User Offline
Joined: 30th May 2004
Location: Down on the corner, out in the street.
Posted: 2nd Jul 2004 06:33
Be of brave heart Albert....

Dark Basic is pretty easy once you get "into" it. In no time at all you'll be coding like us all... nice and buggy and banging your head against the wall! LOL!

No really, it'll come to you... just gotta give it time.
S.

Any truly great code should be indisguishable from magic.
Zeal
22
Years of Service
User Offline
Joined: 10th Oct 2002
Location: Colorado Springs, CO
Posted: 2nd Jul 2004 15:45
"i think i read that DBP lets you make games online without having to pay for people signing up and playin, is this true?"

The reason you have to pay to play MMORPGs like EverQuest ect... is because the people who made EverQuest need to pay for servers, bandwith (to send all that data across the internet), a building to store the servers, employees to maintain the servers (if they crash or need updates), ect... So you see, its costs money to run a MMORPG and THATS why they charge monthly fees.

So to answer your question, YES DBPro can make a multiplayer MMORPG (in theory heh), but NO it cant do it without charging people

All you need is zeal
Kenomica_deleted
20
Years of Service
User Offline
Joined: 30th Jun 2004
Location:
Posted: 2nd Jul 2004 15:46 Edited at: 2nd Jul 2004 15:50
thanx, Do you know the average price?

Quote: "Dark Basic is pretty easy once you get "into" it. In no time at all you'll be coding like us all... nice and buggy and banging your head against the wall! LOL!
"

lol thanks, im gonna do my best

Zeal
22
Years of Service
User Offline
Joined: 10th Oct 2002
Location: Colorado Springs, CO
Posted: 3rd Jul 2004 04:11
To host the kind of servers EverQuest does, I would guess at least several thousand bucks a month? Dont worry though, if you made a MMORPG you could just start small, and host a single server out of your parents basement. A simple cable modem or DSL would likely be fast enough. It wouldnt be super fast or efficient, but it would be enough to get you started, make sure a couple hundred players (maybe heh) could connect and play. Then once you get things on their feet, go to a publisher and get them to finance you.

All you need is zeal
Prep
21
Years of Service
User Offline
Joined: 17th Nov 2003
Location:
Posted: 3rd Jul 2004 05:11
When I first picked up programming I wanted to make an rpg, I saw lots of "start off simple", "make a pong game" and such and I thought, ok I can deal with starting simple but pong? bah!

I went and started coding a simple text / input based RPG, built a few commands, which turned into a turn based combat system. Then I created map "point and click" movement system to replace a "Input Where do you want to go, input$" movement system that I first made.

I gradually built it up and started learning graphics commands by just adding them here and there and I learnt a lot in a way which I wanted to.

I think you could apply the same thing to a survival horror, as long as you are reasonably creative in describing areas you stumble upon, ok it won't be particulary horrorifying but you could probably and quite easily put something like that together and learn a lot in the process.

Start off with a simple

Print

"You enter a large hall, there are two doors on both the left and right hand walls and in front of you stands a grand stair case.

"Here are your options"
1: Go through the.... etc
2: Head up the stairs

After making something like that with any luck you will have learnt something about varibles, if commands. (perhaps selects)

It can be built up into a huge learning experiance as long as you keep asking questions.

What happens when I go through the next door? I don't want to have to repeat the whole code for another room so how can I use the same code but with varibles and perhaps external file access?

Personnaly I think people learn a lot more when they feel like they are truely progressing on doing something they want to do. Expanding on the above concept (or something as similar) with you origanal goal in mind I think you will learn the core of the language a lot faster, and enjoy it a lot more.

They my wise words anyway.

To be no more, sad cure.
Kenomica_deleted
20
Years of Service
User Offline
Joined: 30th Jun 2004
Location:
Posted: 3rd Jul 2004 06:11
I Tried The Text survival horror type game, im getting a little stuck with if statements and choices.I Cant make a choice to do a certain thing. help would be greatly appreciated



Prep
21
Years of Service
User Offline
Joined: 17th Nov 2003
Location:
Posted: 3rd Jul 2004 07:36
Right, heres how you could do your option bits. I'm showing you this using several seperate IF commands, its not the best way to do it but its probably the clearest and hopefully the easier to learn from.



Right, there are some pretty obvious problems with coding like this, the major issue is really that you would need to repeat loads of the same code over and over again.

Navigating a program is probably the most important thing you will need to learn.

Heres a pretty basic example



I added a few extra bits a pieces in there which I hope you can learn from, using a varible to determine what to do in the game. (the key)

You can label a 'Sub' anything as long as it has a : on the end, and remember to put the return at the bottom of it. You can call that code whenever you want by using the Gosub lablename (without the command

I hope that code helps you (and works!, I kinda rushed it and haven't compiled it!)

To be no more, sad cure.
Kenomica_deleted
20
Years of Service
User Offline
Joined: 30th Jun 2004
Location:
Posted: 3rd Jul 2004 19:51 Edited at: 3rd Jul 2004 19:52
thanx! i have a little experience with If statements on the RPG maker 2003 so that also helps me a little lol. that second snippet helps A LOT! but can you please explain the :

Thanks

Prep
21
Years of Service
User Offline
Joined: 17th Nov 2003
Location:
Posted: 4th Jul 2004 04:23
Basically thats the only bit of code the program "runs on its own", things inside labels or functions (something you will look at soon probably, depending on how fast your learning) will only run when they are called.

The return command at the end of a Label says "Go back to the line this label was called from and continue the program". So in the example I wrote nothing would happen without the loop at the start, because the labels were never told to run.

If you remove the Do and Loop lines from that code it might help you understand why I put it there. (keep the Gosub line).

In the end most programs are a big loop with loads of function / gosub calls.



They often look something like that. (of course it varies a lot depending on how they are wrote and what sort of program it is).

Basically everything in the loop will keep repeating itself until its told not to, and that often means when the program ends.

In case I waffled on in an manner which means very little, the do loop in the code I wrote before makes the "game" run and makes sure it doesn't just end. It both starts and keep the game running

Hope that helps, anymore questions feel free to ask. (I'm sure at some point you will want to learn some ways of not having to write a label for every desk , box , door or item your players come accross.

To be no more, sad cure.
Kenomica_deleted
20
Years of Service
User Offline
Joined: 30th Jun 2004
Location:
Posted: 4th Jul 2004 10:40 Edited at: 4th Jul 2004 11:07
oooooh, thanks! i think am getting the hang of this now lol

[edit]

arrr crap lol i keep getting error message "Could not close nest at *line number"

can you find anything wrong in the code?



SandraD
20
Years of Service
User Offline
Joined: 30th May 2004
Location: Down on the corner, out in the street.
Posted: 4th Jul 2004 13:03
Yes, you have a missing endif command right near the top.... the error is right about the same place where you put the "else" but I'll let you find it. (Good practice!)

Any truly great code should be indisguishable from magic.
Kenomica_deleted
20
Years of Service
User Offline
Joined: 30th Jun 2004
Location:
Posted: 4th Jul 2004 21:02 Edited at: 4th Jul 2004 21:10
thaks, i think i fixed that problem but now, everytime i enter 3 then press enter it goes back to the beggining instead of the print commands etc its kinda confusin lol and can you help me so that when you enter any other number than the valid ones or when you just press enter without a number it WONT go back to the first line, thanx



Don Malone
21
Years of Service
User Offline
Joined: 27th Apr 2003
Location: Birmingham, Alabama
Posted: 4th Jul 2004 21:48 Edited at: 4th Jul 2004 22:21
There seems to be a construction problem with this section of code.

Quote: "if sInput$ = "1"
Gosub Hall_Door1
else
if sInput$ = "2"
Gosub Hall_Stairs
if sInput$ = "3"
Gosub Hall_Locked
endif

endif


return"


I'm not sure that it can do a three tiered if else statement. It checks the input that is either 1 or 2 and then falls through. You may want to look at the select case statements or seperate each if <condition> Gosub <Tag> to its own line instead of using if else.

Quote: " FROM THE DARKBASIC HELP FILE

ELSE
This command will allow your program to perform two different sequences of commands based on the result of a condition. If the condition is true, the commands immediately following the IF command are performed. If the condition is false, the commands immediately following the ELSE command are performed. You must always use an ENDIF to mark the end of the ELSE command sequence.
"


and it returns to the start of the program because of the way the GOSUb command RETURNs from a call to the point at which it was called so eventually it all returns to the main Do LOOP.

Wasting CPU Cycles since the 286 was a hot machine.
Prep
21
Years of Service
User Offline
Joined: 17th Nov 2003
Location:
Posted: 4th Jul 2004 23:07
The reason you always end up back in the factory is because your program will eventually always return back to the do loop.

Example

EnterFactory -> CheckDesk -> CheckCheck returns to EnterFactory where it was called -> EnterFactory Returns to where it was called -> Do Loop calls EnterFactory ->

If you remove the Do Loop lines you will find the program will just close when all the Labels (from here on known as Subs (subroutines)) return; the program has no other lines to run so it ends.

When working with IFs Else's and Endifs you have to make sure you understand whats happening (It took me quite awhile to pin this down)

Try and indent your code in if / else for easier reading



In the end though write loads of if / elses not only looks messy its also a rather slow method of checking condtions.

As DBoy780 correctly says the Select statement is a far better tool for checking multiple conditions.



Hope that helps.

- Prep

To be no more, sad cure.
Kenomica_deleted
20
Years of Service
User Offline
Joined: 30th Jun 2004
Location:
Posted: 4th Jul 2004 23:46 Edited at: 4th Jul 2004 23:47
okay,i have tried to get as far as i can without help so i can see how it works and erm, i kinda screwed it up and got into a muddle and i have really confused myself :-\ :-\ :-\ please help lol



(the print"blah" was just to test it lol)

Prep
21
Years of Service
User Offline
Joined: 17th Nov 2003
Location:
Posted: 5th Jul 2004 00:48
Ok I can see quite a few problems in there, so i'll try and explain what they are and why they are and let you fix it.

Remeber a Sub (exampe EnterFactory starts as a Label has some code and then a return statement at the end of it. (look at your Examine_Desk: and Hall_Locked



Remember also when the code within the sub is run the return command will make the program go back to the line the sub was called from using the Gosub Command.

Your nested if statements look somewhat dodgy (If I were you I would look at the select command above). Remember an If, Else, IF is two if commands and as such will have two endifs.



The thing to remember is if you add an if after the else you will need to close that if off with an endif before closing the if that the else belonged to. (Make sense?)

Be careful with the varible names you use with your Input function.

Input returns a string (basically text, thats why if your ifs you have "" around your numbers, they are not values but are text) which is why the varible sInput$ you have been using has a $ on the end of it, it means this data is text rather then a number.

In your EnterFactory sub you have



It would be wise to avoid using a second string name to be returned from an input command. (just because it makes the program harder to follow for yourself) If you want to "save" what a player has input earlier in the program I would advise you do something like.



Just try reading through you subs in the order the program will, follow them through and return to the line they were called from and try and debug any oddities.

If you have ICQ i'm on now 123 - 214 - 874 and would be happy to help out with any question you have.

- Prep

To be no more, sad cure.
Kenomica_deleted
20
Years of Service
User Offline
Joined: 30th Jun 2004
Location:
Posted: 5th Jul 2004 16:13 Edited at: 6th Jul 2004 16:02
Thank you all for your help.sorry, i dont like to keep bothering people for help but the strange thing is, it runs the EnterFactory Skips The Select Command then Runs Hall_Unlocked then EnterFactory Again



ive had a couple other errors b4 that but i sorted them out maself

Kenomica_deleted
20
Years of Service
User Offline
Joined: 30th Jun 2004
Location:
Posted: 7th Jul 2004 00:42
Hello?

Zeal
22
Years of Service
User Offline
Joined: 10th Oct 2002
Location: Colorado Springs, CO
Posted: 7th Jul 2004 05:26 Edited at: 7th Jul 2004 05:28
Ok I made quite a few changes to your code so here goes...

I changed your main loop from a do/loop to a for/next loop (dont really worry about the difference for now, they work almost exactly the same). Also you may notice at the top of your main loop we do a couple things. First we clear the screen of old text with cls, then we reposition the cursor at the top left corner of the screen so the text is always up top. At the bottom of your main loop youll see a new command called 'sync' this just draws the screen (your old do loop used to do this for you, but now we have a little more control). And lastly the suspend for key command which waits for the user to smack anykey before continuing the loop (this gives the player time to read).

As for the rest of the code I just cleaned it up a bit. I got rid of your case statements (you really dont need to use them here). A simple if then statement works fine for picking 1-3 choices. I also added a neato game over effect when you die. Try pickign up the key (choice 2) then walking to the right door (choice 3) mwaahhahahah.

*Edit the new code is in the source box just below here. look down and click it.

All you need is zeal
Kenomica_deleted
20
Years of Service
User Offline
Joined: 30th Jun 2004
Location:
Posted: 10th Jul 2004 19:54
wow thanks ! thats really helpfull! i really like the Game Over effect!

Login to post a reply

Server time is: 2024-11-27 00:33:48
Your offset time is: 2024-11-27 00:33:48