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.

Author
Message
Tarellel
21
Years of Service
User Offline
Joined: 20th Aug 2003
Location: United States
Posted: 21st Aug 2003 05:01
Hello I am making an RPG game and I was wondering if someone could please help me with a few questions that I have. ok to start off
for my characters stats
such as- hp, mp, str, dex, health, max health
Should I define them as global variables or should I define them as global arrays.
Also I wondering since I want to have more then 1 world map such as a map for each Dungeun , city, inside castles, ect. So should I make the indoor world areas with BSP maps or should I make them out of (x)/(3ds) models or what. And should I have them all global or each map/model load in a gosub/function. I also am wanting to move map triggers to happen. Such as when I set on a certain coord area It deleted map area 1 and moves me to a certain place on map area 2 but still be able to move back to map area 1 by stepping on a coord area. My expectations may be to high for DB but I am hoping that I will be able to creating a good rpg with various world areas and terrains. I would also apperiate any and all tips, advice, or help.

Thank you very much for your time and effort.

What you hear ... you forget.
What you see ... you remember.
What you do ... you understand.
Mr Underhill
22
Years of Service
User Offline
Joined: 23rd Apr 2003
Location: The Forgotten Worlds...
Posted: 21st Aug 2003 07:49
Quote: "ok to start off
for my characters stats
such as- hp, mp, str, dex, health, max health
Should I define them as global variables or should I define them as global arrays."


Definitely arrays, that way you can reference characters by HP(Char) rather than hpchar1 or something like that. Less spaghetti code=good .

Quote: "Also I wondering since I want to have more then 1 world map such as a map for each Dungeun , city, inside castles, ect. So should I make the indoor world areas with BSP maps or should I make them out of (x)/(3ds) models or what."


From what the other guys say on the forums, use BSP unless you've got a way to walk on an .X object.(I personally don't know)

Quote: "And should I have them all global or each map/model load in a gosub/function."


Definitely separate. Use a function to load them as you can parse what world you'd like to load. You can't do that in a subroutine (well...you can, but it's complicated). Subroutines are for parts of the game that run separately from the main engine (like a battle system), functions are for sequences of commands you'd like to run inthe main engine, or wherever you need to use them.

Quote: " also am wanting to move map triggers to happen. Such as when I set on a certain coord area It deleted map area 1 and moves me to a certain place on map area 2 but still be able to move back to map area 1 by stepping on a coord area."


If you're asking how to rig it so the player can move from map to map by stepping on an area, try using a scenario (a group of triggers-called events- that run subroutines or functions when activated). You should probably program an editor for a scenario. I'm working on one, myself. When it's finished, I'll send you the link for it.

Hope I was helpful, and welcome to DB!

"You're drawing too much attention to yourself, 'Mr.Underhill'!" - Aragorn (Strider)
Tarellel
21
Years of Service
User Offline
Joined: 20th Aug 2003
Location: United States
Posted: 22nd Aug 2003 10:09
Thank you very much. I apperiate it very much.

What you hear ... you forget.
What you see ... you remember.
What you do ... you understand.
Tarellel
21
Years of Service
User Offline
Joined: 20th Aug 2003
Location: United States
Posted: 20th Sep 2003 07:34
And just so everyone knows I am talking any and all hints and tips that you can think of.

What you hear ... you forget.
What you see ... you remember.
What you do ... you understand.
zzabb
22
Years of Service
User Offline
Joined: 25th Apr 2003
Location: Seattle, USA
Posted: 20th Sep 2003 08:39
well since i haven't completed a rpg i should probably shut my mouth, but i'm feelin rather mouthy so i'll throw in my 2 cents

don't be afraid to write code
there may be easier or faster ways, better ways, but if you hold out for the best fastest shortest code, you'll be waiting forever
in my humble opinion it is better to write 1000 lines of code and learn that you could have written it 100, than to write 100 lines of code when you could have written 1000

but what do I know? I haven’t written an rpg (-:

My advice is free -
unfortunately you get what you pay for (-:
Hell Forged Angel
22
Years of Service
User Offline
Joined: 3rd Jan 2003
Location: United Kingdom
Posted: 20th Sep 2003 13:00
for moving from an area to another when the char is in a certain place you could make an object where you want the edge of the map then hide it. Then just test for collision with it and if the player does collide with it teleport them.

i wrote a battle engine a while back (not a very good one however) but the main thing i learnt was use arrays! seperate varibles make it 10 times harder to code/debug. i switched to arrays half way through codeing it and debugging was 90% easier.

i would post the code for you to look at but alas it was on my old computer.

also a good idea when making any game (but especially rpgs as they hav lots of stats) is to plan it on paper first eg. is your attack going to bebased on your strength or is it going to be half your strenth + 1/4 of your dex etc.

getting a rough idea of how things like that work first will help you alot when codeing later. i also learnt this the hard way.

sorry if ive just been stating the obvious here

Darkness will claim us all
The Dark Padawan
21
Years of Service
User Offline
Joined: 5th Aug 2003
Location: USA!
Posted: 20th Sep 2003 16:28
Also use arrays because you can then save the player's current Hp,energy,ect,ect at the end of a level or at the pressing of key!
I hope I was of some help

"Nintendo GameCube is the best" and "DarkBasic is the best program for PC's"
Tarellel
21
Years of Service
User Offline
Joined: 20th Aug 2003
Location: United States
Posted: 30th Sep 2003 00:47
Thank you very much all your hints are big helps.

What you hear ... you forget.
What you see ... you remember.
What you do ... you understand.
indi
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 30th Sep 2003 04:21
switch over to darkbasic pro and use typed arrays.
I started my rpg in classic and oh boy didnt the arrays grow n grow until it became very hard to control.

eg a simple array

MonsterHps(x)

is a lot more complex to manage than a typed array like

Monster(x).Hitpoints

http://www.lunarpixel.com
It's already tomorrow in Australia
Jess T
Retired Moderator
21
Years of Service
User Offline
Joined: 20th Sep 2003
Location: Over There... Kablam!
Posted: 30th Sep 2003 14:59
But TYPE is available in DarkEDIT i believe... and that is used for DarkBASIC Classic...

If Quizz's Are Quizzical, Then What Are Test's?

Login to post a reply

Server time is: 2025-05-20 18:09:18
Your offset time is: 2025-05-20 18:09:18