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 / RPG Level Up Code Help

Author
Message
Rwilson
21
Years of Service
User Offline
Joined: 19th May 2003
Location: United States
Posted: 22nd Jun 2003 22:21
What I'm trying to do is create a level-up sysmte like what most classical games had. Gain X amount of exp, go up level and have X amount of points go to X amount of stats. Each character's stats go up differently, for example, the fighter's streagth will gi much higher than a mages, but the fighter will be lacking in intellignece, wheres the mage will be a genius.

At first, I was thinking of using an array to store the amounts, but with the amount of characters and as high as the levels go, I'd end up sucking down most of the available memory on some peoples pcs. Then, I thought of perhaps using a random number generater, but I'd prefer being able to decide how mcuh is given each level. I can't think of what else to do, so I was hoping someone might be able to point out something I missed, or give me an idea or two as to what I could use.
MikeS
Retired Moderator
21
Years of Service
User Offline
Joined: 2nd Dec 2002
Location: United States
Posted: 22nd Jun 2003 22:57
Hmmmm, well a random xp generator would seem the best way to go for me. Something like

(Just an example, not actual code)(using mage example)
E= Total experience
S= Strenght
I= Intelligence

When level 1 goblin is defeated add 350 E, if char.(mage)is level 1
when e>300
S=S+1
I=I+5

When level 1 goblin is defeated add 250 E, if char.(mage)is level 2
when e>500
S=S+1
I=I+5

etc.

I hope this helps get some idea of what you can do for an experience system.

How you would code this and store the data, well you could do arrays, but like you said it would suck up people's memory.

So you might just end up having to use arrays but have less of a experience system.(for example only going up to level 5)

I know this probebly isn't the anwser you're looking for, so I hope someone else can help, as I am curious on the anwser also.



http://www.freewebs.com/goldenrodproductionstudio/index.htm
Yes that's right folks, another total revamp of my site.
Currently trying to register domain name, and get some copyrights.
Megaman Zero
21
Years of Service
User Offline
Joined: 25th Jan 2003
Location: United States
Posted: 23rd Jun 2003 01:36
Why not have it so that if a specific character is created, lets say a mage. It will not run the other level up codes, but it will only use the mages EXP table. Then define all of the levels with the ammount of EXP that you will need for each level up.

I remember doing something like this in A5, & here was a bit of my code...



This is just off the top of my head, & it may work in A5 game engine, & if its something around the area that you need, ill let someone else translate it to DBClassic or DBPro for you.

I dont know enough code at this point to translate it on my own, & I dont remember as much A5 as I used to, so it may not work in A5 either.

This would be the easiest way to do what you want to do, but ill let you decide,

The Shadow Guyver
http://heero_yuy1983.tripod.com/
Get Ready!!! (Zero, from Megaman X4)
MikeS
Retired Moderator
21
Years of Service
User Offline
Joined: 2nd Dec 2002
Location: United States
Posted: 23rd Jun 2003 01:53
Hmmm, yea I'd go with Shadow Guyver's method it's simple enough, and easy just using variables.



http://www.freewebs.com/goldenrodproductionstudio/index.htm
Yes that's right folks, another total revamp of my site.
Currently trying to register domain name, and get some copyrights.
Uriel The Ignoble
21
Years of Service
User Offline
Joined: 13th Jun 2003
Location: In a tiny box in the attic
Posted: 23rd Jun 2003 01:54
it could be alot simpler...

level = 1

if experience < 50 then inc level
if experience <200 then inc level
if experience <600 then inc level
etc

stregnth# = 5 * level
dexterity# = 5 * level
health# = 20 * level

if you want to change how much each stat increase, just change the inc amount, or inc it a different amount for each level increase

Uriel The Ignoble
21
Years of Service
User Offline
Joined: 13th Jun 2003
Location: In a tiny box in the attic
Posted: 23rd Jun 2003 02:00
o nevermind, you cant use the > and < signs.. that would make the stats increase constantly..

use the other guy's method :-p
nevermind me i dont know what im talking about!

BLAH!

Rwilson
21
Years of Service
User Offline
Joined: 19th May 2003
Location: United States
Posted: 23rd Jun 2003 03:22
Thank you for the responses! At this moment, it looks like Shadow Guyver's idea is the best.

To Shadow: I think that despite your code snippet being from another language, I beleive it is translatable to DB Pro. If I could ask though, what is A5? I've heard of several programming languages, but never A5.

Bloodshot
21
Years of Service
User Offline
Joined: 7th Apr 2003
Location: United Kingdom
Posted: 23rd Jun 2003 05:06 Edited at: 23rd Jun 2003 06:25
I've created a basic example here for you to try:

Megaman Zero
21
Years of Service
User Offline
Joined: 25th Jan 2003
Location: United States
Posted: 23rd Jun 2003 06:13
A5 is a really pricy game engine that I came from. Its very easy to use, but its very pricy. To make a multiplayer game for an MMO style RPG with more than 4 players, it costs $900 (thier new price for A6). A5 Pro used to cost $1250 until the A6 serries came out.

I want to use it again, but its extremely pricy, & I cant afford $900 right now to buy the game engine, so ill stick with DBPro.

It does have some better quality traits, but there are 4 versions to buy, which I belive you can upgrade at a later date, or you can just buy the orriginal.

One of the better traits is Better FPS rates, but it does have its downsides. It requires some constant code & knowledge of the engine to do what you may want, & the price for multiplayer games. If you want to make a multiplayer game with only 4 players max, it costs $200, & you can not have mirrors without buying Pro (the $900 version.)

It uses CScript which is a modified version of C, but its very easy to understand compaired to what I have been able to do with other engines.

If I were you, I would stick with one engine, until you can get somewhere with it, then move on to something more powerfull.

I would rate DBPro & A5 about the same rating, there are some pretty good ups & downs to both.

The Shadow Guyver
http://heero_yuy1983.tripod.com/
Get Ready!!! (Zero, from Megaman X4)
Kanzure
21
Years of Service
User Offline
Joined: 19th Feb 2003
Location:
Posted: 25th Jun 2003 07:50
I would recommend using some formulas already out their, such as from Pokemon. Yes, I said Pokemon.

Pokemon has a great level up system, with 3 diffrent ways of gaining levels. View these sites for detail - they give you all the formulas you need

http://www.azureheights.com
http://www.pokefor.tk

~Morph
Owner of MultiCode.NET and Multi2k.NET.
Nothing is something, and something is then nothing. Life is an illusion.
Mtek
21
Years of Service
User Offline
Joined: 28th Jul 2003
Location:
Posted: 28th Jul 2003 13:02 Edited at: 28th Jul 2003 13:07
All you lot are talking about makeing the exp and everything but can someone help me with the basics of Rpg's. I can do good 3d games but i just cant get the hang of Rpg's. I really want to make games like final fantasy so can somone plz give me some Rpg code to look at so i can learn from it?

Ralen
21
Years of Service
User Offline
Joined: 22nd Jul 2003
Location:
Posted: 28th Jul 2003 14:15
You can do a simple formula.


100 * ((Level + a) ^ 2)

A = Your Adjustment Veriable. Just to make it easy A = 0 for now.


Level
1 100 Exp
2 400 Exp
3 900 Exp
4 1600 Exp
.
.
.
50 250000 Exp

Using a formula is much better. Instead of coming up with a table for levels you can just adjust the formula and it adjust every level for you.

Rwilson
21
Years of Service
User Offline
Joined: 19th May 2003
Location: United States
Posted: 28th Jul 2003 19:05
Goodness! This has been out there for several weeks now, and I suddenly get these new responses! Much appreciated, indeed, But I have everything figuared out now(Sort of). Thank you all!

mR n
21
Years of Service
User Offline
Joined: 25th Jun 2003
Location:
Posted: 31st Jul 2003 22:40
Even though you've figured things out I thought i could get in my say. Actually you COULD store the info on character,enemys,etc in an array without slowing down the computer. just store the array in a memblock. yeah it's more trouble but if you plan on making a game more than 5 minutes long than its worth it because with your method you'll confuse yourself with 5 million variables and huge amounts of code. But hey, that's just what i think. hope that helped!

Login to post a reply

Server time is: 2024-09-20 17:41:04
Your offset time is: 2024-09-20 17:41:04