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 / Small RPG snippet?

Author
Message
Cian Rice
20
Years of Service
User Offline
Joined: 8th Jun 2004
Location:
Posted: 30th Aug 2004 05:46
I was wondering if anyone could make me a small RPG code snippet, simple I want a 3d action rpg, that has four characters in a party, I'm using DBC, and I don't expect much, but I would like a health meter, magic meter and experiance meter, with primitives as enemies as characters.
Thanks in advanced.
By the way, I think I can really work on the snippet if some one puts the effort, in it's just I need some base code to work with.
So please do a guy a favor and make me a snippet please.
(Sorry if this is the wrong forum)

Got anime?I do.
Cian Rice
20
Years of Service
User Offline
Joined: 8th Jun 2004
Location:
Posted: 30th Aug 2004 06:53
No ones willing to help, or even look? Tear.

Got anime?I do.
the_winch
21
Years of Service
User Offline
Joined: 1st Feb 2003
Location: Oxford, UK
Posted: 30th Aug 2004 07:08
Well you are asking for someone to pretty much write the bare bones of an rpg.

Attempt to write it yourself and ask when you get stuck and have specific questions and people will be a lot more helpfull.

shrink those dbpro exes
Create patches for your dbpro games
Cian Rice
20
Years of Service
User Offline
Joined: 8th Jun 2004
Location:
Posted: 30th Aug 2004 07:22
The whole reason I asked was because I'm not sure how to go about making one, I've tried but I got nowhere.

Got anime?I do.
Cian Rice
20
Years of Service
User Offline
Joined: 8th Jun 2004
Location:
Posted: 30th Aug 2004 08:49
So no one wants to help a guy struggling with the basics of an RPG.
Now I'm even more somber than before...

Got anime?I do.
Douglass
21
Years of Service
User Offline
Joined: 28th Aug 2003
Location:
Posted: 30th Aug 2004 09:05
hey you have no idea how bored i am right now. i think ill try and make something small for you to use. just for practice.

Cian Rice
20
Years of Service
User Offline
Joined: 8th Jun 2004
Location:
Posted: 30th Aug 2004 09:37
Thanks man, oh and sorry to be nitpick, but I would like the health bar and stuff on screen if it ain't to much trouble.
Quote: "En la casa de nada"

In the house of nothing? What?

Got anime?I do.
Kohaku
20
Years of Service
User Offline
Joined: 3rd May 2004
Location: The not very United Kingdom
Posted: 30th Aug 2004 12:05 Edited at: 30th Aug 2004 12:06
Hey Anime b l o o d, I'm bored aswell, so I'll have a shot at a small code based media free rpg.

But do note, even though we are probably going to make these examples, there are better ways of asking for them, and you should be trying to code this yourself. I'm only doing this as I'm bored, and its a nice little challenge.

Now, do you want this to be fist person like the old classics(my faves), a third person perspective, or more of a camera above head but at an angle kind of thing?

Infra-Dark
Bring the 20 liners back!
#coding, like coding, but with a #
John H
Retired Moderator
21
Years of Service
User Offline
Joined: 14th Oct 2002
Location: Burlington, VT
Posted: 30th Aug 2004 15:51
Health bars are easy peasey

First of all we need 2 variables. The 'health_size' variable and the 'actual_health' variable.

Health_Size is always going to = 100
For now, actual_health is going to = 200

To draw a healthbar, simply make a red box as the empty health like this

Ink RGB(255,0,0),1
Box 10,50,110,50

Now draw a box over it, using the Health_Size variable

Ink RGB(0,255,0),1
Box 10,50,health,50

Voila

Now to decrease the HP. Say a monster does your character 10 damage. Now, we cant just decrease your HP bar by 10. Our health is 200! The health_size is just a variable to hold the size of the box we are stretching. Since 200 is 2 times greater then 100, we will divide the damage done to our character by 2.

10/2 = 5

Now we decrease the health_size variable by the 1/2 dmg value, and the actual_health variable by the actual damage done.

Not going to give full code, but you said you didnt have any idea on how to go about doing it, so there ya go ^_^

RPGamer


Check out our Team Request in the Team Request section if you want to help!
Cian Rice
20
Years of Service
User Offline
Joined: 8th Jun 2004
Location:
Posted: 30th Aug 2004 22:49
Thanks for the offer Aurora.
And thanks RPGamer.

Got anime?I do.
Cian Rice
20
Years of Service
User Offline
Joined: 8th Jun 2004
Location:
Posted: 31st Aug 2004 00:16
Aura, I would like third person, I know I should code it myself, bu tonce I have something to work off I think I could accomplish, something, I mean I tried, but to no avail.

Got anime?I do.
Kohaku
20
Years of Service
User Offline
Joined: 3rd May 2004
Location: The not very United Kingdom
Posted: 31st Aug 2004 02:02
I've slept since I began, and here I am now, calling the still in produvtion RPG, Land of Cube. The main character will be a cube, he will be followed by his cube minions, probably, to rid the world of the evil Flat Monsters, on the island of Cone Trees.

The above is subject to change.

So, third person huh?.. Hm, maybe I'll make it optional in the game. I always liked the old style.

Infra-Dark
Bring the 20 liners back!
#coding, like coding, but with a #
Cian Rice
20
Years of Service
User Offline
Joined: 8th Jun 2004
Location:
Posted: 31st Aug 2004 02:23
Sounds good Aura. Any time of completion?
And you know this is for DBC right? (Just in Case).
And rem the changing method for camera view laot cuz, when you gie me the snippet I probably won't have a 1st person view as I will try to focus fighting game style combat.

Got anime?I do.
Kohaku
20
Years of Service
User Offline
Joined: 3rd May 2004
Location: The not very United Kingdom
Posted: 31st Aug 2004 03:20
Wait, this is hurting my brain, you want first person or third person?

Progress:
Added MakeDoorWay function
Map mode
Scrolling water
Old style fog cubes
texture made of code

Infra-Dark
Bring the 20 liners back!
#coding, like coding, but with a #
Cian Rice
20
Years of Service
User Offline
Joined: 8th Jun 2004
Location:
Posted: 31st Aug 2004 03:20
Sorry 'bout that I want third person,
see I thought you said that you would make it optional.
But that was my bad.

Got anime?I do.
Kohaku
20
Years of Service
User Offline
Joined: 3rd May 2004
Location: The not very United Kingdom
Posted: 31st Aug 2004 03:54
I did say I was going to make it optional, I just didn't know what you said.

Infra-Dark
Bring the 20 liners back!
#coding, like coding, but with a #
Cian Rice
20
Years of Service
User Offline
Joined: 8th Jun 2004
Location:
Posted: 31st Aug 2004 04:14
anyidea of when you'll be done?

Got anime?I do.
Kohaku
20
Years of Service
User Offline
Joined: 3rd May 2004
Location: The not very United Kingdom
Posted: 31st Aug 2004 04:29
Not for a while, heres a snippet of my progress.

At the start choose 1 or 2 for your camera mode.
The controls are with the arrow keys.
For map mode press shift.

You'll notice I'm not even using fog here for my attempt at making the RPG look like a classic DOS game.



Infra-Dark
Bring the 20 liners back!
#coding, like coding, but with a #
Cian Rice
20
Years of Service
User Offline
Joined: 8th Jun 2004
Location:
Posted: 31st Aug 2004 04:50
I get an error:
Quote: "paramater mismatch. dot expects integer,integer at line 40"

Can't wait to see the final source, but ya know it doesn't need to be HUGE.

Got anime?I do.
Kohaku
20
Years of Service
User Offline
Joined: 3rd May 2004
Location: The not very United Kingdom
Posted: 31st Aug 2004 04:56 Edited at: 31st Aug 2004 10:55
Ah, yea, forgot to try it. Give me a min.

Ok, DBC and DBP handle the DOT command differently. I'll just fix that...

Well, now it kind of works, but not so well...
Theres two ways out of this, either I continue trying to convert the code, or you download the 100 day DBP demo(which rocks by the way.).

Ok, just a small rotation issue and its ready...

Well, it kinda works, but you can't see my textures right
Please Download the DBP demo.
http://files.thegamecreators.com/darkbasicprofessional/trial/darkbasic_professional_compo2004_trial.zip

For DBC, not DBP.



Infra-Dark
Bring the 20 liners back!
#coding, like coding, but with a #
Cian Rice
20
Years of Service
User Offline
Joined: 8th Jun 2004
Location:
Posted: 31st Aug 2004 06:40
Aura, I'll just wait until you get furthur cuz I'm getting DBPRO in a month or so anyways, so don't worry bout it.

Got anime?I do.
Douglass
21
Years of Service
User Offline
Joined: 28th Aug 2003
Location:
Posted: 31st Aug 2004 07:50 Edited at: 31st Aug 2004 07:52
hey im almost done with my code just have to finish the battle engine. but for now just press spacebar to win automatically. ill probably have the whole thing done tommarow. so far you can battle and talk to villagers. im really suprised i got this far. this is actually the longest program ive every written. here it is. tell me what you think.


Cian Rice
20
Years of Service
User Offline
Joined: 8th Jun 2004
Location:
Posted: 31st Aug 2004 08:36
First, is this for DBC or DBP?
Thanks to both of you guys. Maybe when there both finished I'll take the stronger parts from both to make a even better bare outline.

Got anime?I do.
Douglass
21
Years of Service
User Offline
Joined: 28th Aug 2003
Location:
Posted: 31st Aug 2004 09:04
its made in pro but should work in classic.

Cian Rice
20
Years of Service
User Offline
Joined: 8th Jun 2004
Location:
Posted: 31st Aug 2004 10:19
Will test it.

Got anime?I do.
Cian Rice
20
Years of Service
User Offline
Joined: 8th Jun 2004
Location:
Posted: 31st Aug 2004 10:24
Ahh, it doesn't work says:
Syntax error. Unknown command at line 12.
I guess I'll go with the DBPRO trial to test them out.

Got anime?I do.
Douglass
21
Years of Service
User Offline
Joined: 28th Aug 2003
Location:
Posted: 31st Aug 2004 10:32
dark basic doesnt have types? well,that sucks. if your going to make an rpg, types are very useful. so uless theres an equivelent, wait until yuo get pro.

Cian Rice
20
Years of Service
User Offline
Joined: 8th Jun 2004
Location:
Posted: 31st Aug 2004 10:34
downloaded 100 day trial, should suffice till I get it. LOL

Got anime?I do.
Cian Rice
20
Years of Service
User Offline
Joined: 8th Jun 2004
Location:
Posted: 31st Aug 2004 10:36
Doug, tried it, hate to be a nit pik, but I wanted a action battle system. Sorry bout the complaint, but other than that it was good, save the part where I'd encounter a rock every few seconds.

Got anime?I do.
Kohaku
20
Years of Service
User Offline
Joined: 3rd May 2004
Location: The not very United Kingdom
Posted: 31st Aug 2004 10:54
If your going to try my one, then try the first one I post, the secong one is ****.

Infra-Dark
Bring the 20 liners back!
#coding, like coding, but with a #
Cian Rice
20
Years of Service
User Offline
Joined: 8th Jun 2004
Location:
Posted: 31st Aug 2004 11:07
Gotcha, I used the 2nd one and it was still good in my opinion.

Got anime?I do.
Douglass
21
Years of Service
User Offline
Joined: 28th Aug 2003
Location:
Posted: 31st Aug 2004 11:41
oh no big deal. its just that i heard rpg and i assumed turn based. since i didnt actually program the battle system it would be just as easy for either. and you didnt like the part where you encounter a rock every few second. the thing is, in most rpgs (as a matter of fact in all) you encounter enemies every few seconds so what do you think should happen instead? oh and i know that rocks arent exactly the most exicting enemies but keep in mind that im using primatives.so what kind of fighting system do you think i should make? should it be precise like a shooter or more like a fighting game with different moves?

Kohaku
20
Years of Service
User Offline
Joined: 3rd May 2004
Location: The not very United Kingdom
Posted: 31st Aug 2004 11:44
Anime b l o o d, you have Pro now right?
If so then I can start using more favoured commands.

Infra-Dark
Bring the 20 liners back!
#coding, like coding, but with a #
Douglass
21
Years of Service
User Offline
Joined: 28th Aug 2003
Location:
Posted: 31st Aug 2004 12:01
Kohaku
20
Years of Service
User Offline
Joined: 3rd May 2004
Location: The not very United Kingdom
Posted: 31st Aug 2004 12:19
Neat.

Infra-Dark
Bring the 20 liners back!
#coding, like coding, but with a #
Cian Rice
20
Years of Service
User Offline
Joined: 8th Jun 2004
Location:
Posted: 31st Aug 2004 20:39 Edited at: 31st Aug 2004 20:45
Doug (my keyboard acting weird so don"t mind the odd wrighting) I know that< it"s just whenever i"d step i"d have a random encounter< more like a battle every one to three seconds instead of five to ten>

Edit:
Okay, back to normal.
Doug I was impressed how you tried to implement it but yeah, hack and slash woudl've been better and what I said above about turn based be every 5-10 not 1-3.
Aura, any news on your battle system?

Got anime?I do.
Kohaku
20
Years of Service
User Offline
Joined: 3rd May 2004
Location: The not very United Kingdom
Posted: 31st Aug 2004 20:53
Last night I was working on the evil Cube Mens AI. I now have 100 cubes running around quite contently. I'll work on the battles later today.

Infra-Dark
Bring the 20 liners back!
#coding, like coding, but with a #
Cian Rice
20
Years of Service
User Offline
Joined: 8th Jun 2004
Location:
Posted: 1st Sep 2004 04:27
Don't forget action battles, not turnbased.

Got anime?I do.
Douglass
21
Years of Service
User Offline
Joined: 28th Aug 2003
Location:
Posted: 1st Sep 2004 06:21
maybe you shud try coding your self a little...

Cian Rice
20
Years of Service
User Offline
Joined: 8th Jun 2004
Location:
Posted: 1st Sep 2004 06:36
How many times have I stated that I've attempted an RPG and failed, it's not that I can't code is just rpgs are hard for me, I've made a fps but it was deleted on my old computer, that's why asked for a snippet, so I could use that to learn how to code one.

Got anime?I do.
Douglass
21
Years of Service
User Offline
Joined: 28th Aug 2003
Location:
Posted: 1st Sep 2004 08:27
you have some code maybe you should try changing it and see what happens. what exactly is it you have trouble with? stats? a.i.?

Kohaku
20
Years of Service
User Offline
Joined: 3rd May 2004
Location: The not very United Kingdom
Posted: 1st Sep 2004 08:31
Good questions Doug.

Infra-Dark
Bring the 20 liners back!
#coding, like coding, but with a #
Cian Rice
20
Years of Service
User Offline
Joined: 8th Jun 2004
Location:
Posted: 1st Sep 2004 08:53
I don't want to sound like an idot but, everything.
And plus the code was on my old computer anyways.

Got anime?I do.
Cian Rice
20
Years of Service
User Offline
Joined: 8th Jun 2004
Location:
Posted: 1st Sep 2004 09:00
By the way, if you guys don't want to help then fine, I just thought maybe someone would have the time to help.


Got anime?I do.
Kohaku
20
Years of Service
User Offline
Joined: 3rd May 2004
Location: The not very United Kingdom
Posted: 1st Sep 2004 10:18
Well I'm still coding it.

Infra-Dark
Bring the 20 liners back!
#coding, like coding, but with a #
Cian Rice
20
Years of Service
User Offline
Joined: 8th Jun 2004
Location:
Posted: 1st Sep 2004 10:36
Okay, well I was messing around, by using Psionics free 3d dwarf model, I want it to animate walking while I press the arrow keys, and stop when I release, how would I do it?

Got anime?I do.
Douglass
21
Years of Service
User Offline
Joined: 28th Aug 2003
Location:
Posted: 1st Sep 2004 11:03
if upkey()=1 then play object...

something like that. im not saying that i dont want to help. i just think you should try writing something even if its totally wrong. and if you cant code at all try the binary moon tutorials

Cian Rice
20
Years of Service
User Offline
Joined: 8th Jun 2004
Location:
Posted: 1st Sep 2004 11:42
Got them. I can code a bit, just more along the fps lines as that's what I had been working on until it got deleted.

Got anime?I do.
Cian Rice
20
Years of Service
User Offline
Joined: 8th Jun 2004
Location:
Posted: 1st Sep 2004 11:47
Tried your suggestion doug, then I realized, that's what I had see what it does is ones I stop moving it does the animation, sorry Ican't post a snippet but I don't have the time so see ya!

Got anime?I do.
Arkheii
21
Years of Service
User Offline
Joined: 15th Jun 2003
Location: QC, Philippines
Posted: 1st Sep 2004 18:48
Thinking about it, coding the RPG is simpler than making revolutionary gameplay that actually fits the definition of an RPG... IMO Morrowind is more RPG than the FF games; while Morrowind's NPCs are lifeless and you can take the "cheap" way to build up your stats, it actually lets you form and develop a character rather than following a pre-made storyline in FF.

In FF, your character's class affects mostly your stats and attacks, etc. Pretty narrow IMO.

In Morrowind, a mage is more than a character with high INT. They can create their own spells, enchant items with greater chance, etc. Thieves can steal in more ways; they can pickpocket civilians, crack locks, or take things on the table when the guard's back is turned and your sneak level is high enough.

Other than gameplay elements, the RPG is coded pretty much the same way as any other games. Morrowind has a first (and third) person camera, so you could take your old FPS code, use melee weapons, add an inventory and stat system, make dialogue for NPCs, etc., then you have an FPS, still. _But_ since it plays like an RPG, then it can be called an RPG! Even snake/nibbles can be turned into an RPG, just add a storyline and give good reasons why you have to eat the apples (Some game types are just not meant to become RPGs...). Some self-proclaimed RPGs should fall under adventure games instead IMO.

The coding tips... I have no idea why people go through all that math to make a third person camera, but what I do to make a quick hack is pretend I'm working with a first person camera (Which you have already done, yes?) and use "move camera -20" or something value like that. And instead of taking a weapon model and locking it to the screen, just show your player model. If you want to implement camera collision, just get a dll with a raytracing function and use it to find the distance to the polygon you hit, and plug it in the move camera command.

Good luck in your endeavors!

Login to post a reply

Server time is: 2024-09-24 03:14:17
Your offset time is: 2024-09-24 03:14:17