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 Battle System

Author
Message
Lonnie
21
Years of Service
User Offline
Joined: 28th May 2003
Location:
Posted: 15th Apr 2004 23:12 Edited at: 15th Apr 2004 23:30
Ok, people

I realy thought just a simple RPG would be fun, and educational for me to try to do.

Dont worry, I am not going to try to make a realy complex RPG.
I am just hoping that mabey I can make a very simple, easy RPG, then if I enjoyed programming a simple RPG, then mabey I would attempt to develop a more complex RPG.

My first goal is to try to just make a battle system. A very basic Battle system.

I would have Attack, HP, and mabey defense.

Then I would advance on all the other things, like Speed, Items, Equipment, ect.

Any Ideas or recommondations, or guides, ect; would be very helpful.

Oh, also I dont want to do graphics for it, just a menu. I only want to do the battle system.(for now)

Thanks

PS I am also having touble running the Pac-Man game(if you look in these forums, you should find the one that is open source).

Anyways, when ever I try to run it I get an errror, its:
"This application has failed to start because d3d9.dll was not found. Re-installing the application may fix this problem."

And
"Failed to load DLL (2: DBProSetupDebug.dll)

Any help?
Thanks

Do Print "Hello World"
Wait 2003 loop
zircher
21
Years of Service
User Offline
Joined: 27th Dec 2002
Location: Oklahoma
Posted: 16th Apr 2004 01:03
Try installing DirectX 9.0b.
--
TAZ

Scouseknight
20
Years of Service
User Offline
Joined: 15th Mar 2004
Location: Bootle, Merseyside, UK
Posted: 16th Apr 2004 01:42
With regard to the battle system, one method you could use in determining whether (a) an attack was on target and (b) the attack was parried is to borrow something from the old Dungeons and Dragons games involving dice rolls to determine the success of an attack or spell e.t.c. based on the player's attributes in the relevant area :

Suppose we had a player fighting a monster - each character would have attributes :

Player(1).Health = 10
Player(1).Attack = 6
Player(1).Defence = 4

Monster(1).Health = 20
Monster(1).Attack = 3
Monster(1).Defence = 1

To see if the player's attack was successful :

Attack = Rnd(10) + 1
If Player(1).Attack > Attack
Hit = 1
Else
Hit = 0
Endif

To see if the attack was parried by monster :

If Hit = 1
Defend = Rnd(10) + 1
If Monster(1).Defence > Defend
Hit = 0
Endif
Endif

It's very very basic but as a concept it is sound enough - in this example, the player's hit score will more than likely result in a hit (6 times out of 10).

If the player has a mega sword, you would add this to his attack score before the dice roll for even more chance of success.

Likewise, if the monster had a large shield or good armour, you would adjust the defence score accordingly.

Just an idea for you to throw into the mix.

zircher
21
Years of Service
User Offline
Joined: 27th Dec 2002
Location: Oklahoma
Posted: 16th Apr 2004 01:53 Edited at: 16th Apr 2004 03:55
Scouseknight is right, you can look at pen and paper RPGs for a lot of good rules and game mechanics. You don't have to implement every single facet of the game system up front, but using such a source will allow you to focus on writing the battle engine sooner.
--
TAZ

Lonnie
21
Years of Service
User Offline
Joined: 28th May 2003
Location:
Posted: 16th Apr 2004 02:31
Ok, thank you for your comments.

Hmm... It would be nice if I could do a small RPG battle system in about 2 months, that way, I might be able to have it to count towards a school project.

Ya, I guess I should try downloading Direct X 9.

Thank you

Do Print "Hello World"
Wait 2003 loop
DK_
20
Years of Service
User Offline
Joined: 4th Jan 2004
Location:
Posted: 17th Apr 2004 22:30
what is that "Player(1).Health=10"
what is Player(1)
is it a class?

Scouseknight
20
Years of Service
User Offline
Joined: 15th Mar 2004
Location: Bootle, Merseyside, UK
Posted: 18th Apr 2004 00:11
It's a Typed Array - since I was introduced to them I find them invaluable and I wonder how I programmed without them.

If you have 200 monsters in your RPG, you could keep track of them like this :



DK_
20
Years of Service
User Offline
Joined: 4th Jan 2004
Location:
Posted: 18th Apr 2004 00:58
Wow thanx.

That is very helpful, I know some C++ and I always thought that a weakness in DBPro is that it can't do classes, but this can come very close.

DK_
20
Years of Service
User Offline
Joined: 4th Jan 2004
Location:
Posted: 18th Apr 2004 21:47
I have another question though.

would it be possinle to instead of using an integer use a string.
I tried it and it didn't work, here is what I did:

type monster
name$ as string
endtype

and it gives me a compiler error.

Magpie
21
Years of Service
User Offline
Joined: 16th Jul 2003
Location: Otherland! Cos it rocks!
Posted: 18th Apr 2004 21:51
Is this turn-based or real-time?


If you have any questions about any of our projects you can email any member of Cogworks at trunito15262@hotmail.com.
Scouseknight
20
Years of Service
User Offline
Joined: 15th Mar 2004
Location: Bootle, Merseyside, UK
Posted: 18th Apr 2004 21:51
Strings should be fine - I use them in a typed array in my current project and it compiles and runs fine :



What is the error message you are receiving?

DK_
20
Years of Service
User Offline
Joined: 4th Jan 2004
Location:
Posted: 19th Apr 2004 00:05 Edited at: 19th Apr 2004 00:11
so this code should work then?






***********************[ EDIT ]***********************
I got it to work now, before I was asking for the character name like this.

input "please enter a name: ",player(1).name$

but for some reason that doesn't work so I tried this

input "please enter a name: ",n$
player(1).name$=n$

and that works. I guess the user can't type a value directly into it.

Scouseknight
20
Years of Service
User Offline
Joined: 15th Mar 2004
Location: Bootle, Merseyside, UK
Posted: 19th Apr 2004 01:21
Ah cheers for the heads-up - I've never it this way before.

GameMaker Jason
21
Years of Service
User Offline
Joined: 22nd Nov 2003
Location: UK
Posted: 19th Apr 2004 01:31
Could you eplain types for me and the player(1).x how does it work?
btw i understand arrays.

Scouseknight
20
Years of Service
User Offline
Joined: 15th Mar 2004
Location: Bootle, Merseyside, UK
Posted: 19th Apr 2004 02:31 Edited at: 19th Apr 2004 02:32
I don't know the ins and outs of a cat's rectum about them but what I do know is they are incredibly useful.

I think of them like having the ability to mix data types in an array, and also having a second dimension to an array that you can reference by name rather than number.

Take a typical Pac Man type game - you would have your ghosts in a multidimensional array such as :



Instead, with Typed Arrays, you could make life a lot easier and expand on this :



It's a small example and doesn't explain in detail what these things are but I am sure you can see how useful they are.

Login to post a reply

Server time is: 2024-11-26 14:31:57
Your offset time is: 2024-11-26 14:31:57