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
OldTifu
21
Years of Service
User Offline
Joined: 10th Jan 2003
Location: Scotland
Posted: 17th Oct 2004 03:02
Quote: "So, how should I make collision with the ground so the player can still move but not fall through the ground?"

Uh... the same way you check for collision with walls, but you're not putting any code in to stop him from moving, just stop him from falling (which is "falling=0" in my lil gamething)
Cian Rice
20
Years of Service
User Offline
Joined: 8th Jun 2004
Location:
Posted: 17th Oct 2004 03:05
So I would use:

or what?

There is only one way to package shaolin: Shaolin Soccer...
OldTifu
21
Years of Service
User Offline
Joined: 10th Jan 2003
Location: Scotland
Posted: 17th Oct 2004 04:50 Edited at: 17th Oct 2004 04:55
Seems like that would work fine enough |:

IF it doesn't work, and the guy gets stuck in the floor unable to move... then you may want to try instead of checking collision with the hero, using a collision sphere... which is just a sphere, which you hide (hide object col_sphere) and position underneath the hero, so that it will detect the falling collision instead of the hero (this making sure he is above the floor, not actually touching it)

But that may not be necessary... what you said might well work fine
Cian Rice
20
Years of Service
User Offline
Joined: 8th Jun 2004
Location:
Posted: 17th Oct 2004 06:52
Okay, I'll try it.

There is only one way to package shaolin: Shaolin Soccer...
Cian Rice
20
Years of Service
User Offline
Joined: 8th Jun 2004
Location:
Posted: 17th Oct 2004 07:05

Didn't work, when he'd jump he wouldn't fall back down to the ground.
Sidenote:
I have the code for jumping as a gosub, do you think that would affect it because of when it's being called?

There is only one way to package shaolin: Shaolin Soccer...
OldTifu
21
Years of Service
User Offline
Joined: 10th Jan 2003
Location: Scotland
Posted: 17th Oct 2004 08:38
It being in a gosub shouldn't make a difference.. the position of it might. Can I see the sub? Just to see if anythings changed or whatever...
The jumping should come before you reset falling to 1 (= he is falling, which in my games, I always do as the last thing in a loop) and just after you have checked wether he is standing on ground...
Cian Rice
20
Years of Service
User Offline
Joined: 8th Jun 2004
Location:
Posted: 17th Oct 2004 09:52
Well first, as I don't have time to show you the sub as I need to get back to something, are you saying I should position falling=1 at the end of each loop? Because I don't have it like that, so that could be the problem.

There is only one way to package shaolin: Shaolin Soccer...
gothboy 101
20
Years of Service
User Offline
Joined: 31st May 2004
Location: Watonga, ok, usa
Posted: 17th Oct 2004 10:40
gosh i'm confused sorry, i cant figure it out

Are you ready to experience advanced gaming?
http://www.dragonseige.tk
Cian Rice
20
Years of Service
User Offline
Joined: 8th Jun 2004
Location:
Posted: 17th Oct 2004 10:47
That's okay, I think with a reply from Tifu as to what my question is this will be sorted out.

There is only one way to package shaolin: Shaolin Soccer...
OldTifu
21
Years of Service
User Offline
Joined: 10th Jan 2003
Location: Scotland
Posted: 17th Oct 2004 11:01
falling = 1 is always done at the end of the main game loop (if you are doing a jump engine like the one I showed, it's not like it's an essential of coding... more than one way of doing all this)

This is to ensure that at any time, your hero is falling unless the game tells him otherwise. Which means, if the floor is removed for any reason (trapdoors?) or he has jumped and has reached the apex(?) of his jump, or whatever... he will automatically start falling.

Though... even with that not in the code... i'd have thought if you ommited the 'falling=1' line at the end it would simply make him float at the end of a jump, not continue to rise...
Cian Rice
20
Years of Service
User Offline
Joined: 8th Jun 2004
Location:
Posted: 17th Oct 2004 11:02
Thanks Tifu.

There is only one way to package shaolin: Shaolin Soccer...
Cian Rice
20
Years of Service
User Offline
Joined: 8th Jun 2004
Location:
Posted: 17th Oct 2004 11:55
Tifu, words cannot describe how helpful you are, it worked. Props.
Now I'll probably try and implement Andrew's waypoint system for my AI and add more ai that don't try to kill you along with implementing a quest. I also want to tough up my hud, to make it look better.

There is only one way to package shaolin: Shaolin Soccer...
Crazy Programmer
AGK Developer
20
Years of Service
User Offline
Joined: 6th Sep 2004
Location: Lost in AGK
Posted: 17th Oct 2004 13:55
hey guys i was messing with the code and was wondering insted of all those spheres how would i make this one come up in all those sphers places load object "enemy.x" can any body help

OldTifu
21
Years of Service
User Offline
Joined: 10th Jan 2003
Location: Scotland
Posted: 17th Oct 2004 19:45
Just use 'load object "enemy.x"' instead of 'make object sphere'... i'm fairly sure that was said earlier in the thread :p
Cian Rice
20
Years of Service
User Offline
Joined: 8th Jun 2004
Location:
Posted: 17th Oct 2004 21:59
ARrgghhh.
Tifu the I can now jump, as I have told you; properly but now I can't move because of the collision, so how would I do this sphere thing?

There is only one way to package shaolin: Shaolin Soccer...
OldTifu
21
Years of Service
User Offline
Joined: 10th Jan 2003
Location: Scotland
Posted: 18th Oct 2004 02:43
Sphere collision, is something I used in my PPGame before I decided to go for NuclearGlory (which I don't actually have yet, but I know i'll be using it once I get back to work on it...)

Instead of checking collisions with the player, you have a sphere that is hidden (make object sphere, hide object) you position it wherever you need to check collisions.
So... position object col_sphere,herox,heroy-20,heroz
would position the sphere a little below the hero (though the numbers of course have to be changed, depends on how tall he is... and just use the variables you're using already for the heros position)

The sphere will check for collision just like checking for collision with the hero, but it gives you more freedom because you don't need to actually have the hero in the place to check the collision... so you can check if something is under him, over him, in front, behind, without him moving.

Just create a sphere, set it's collision to spheres, hide it (though actually, for testing purposes it's best to have it visible at first, hide it when you know it's working and you don't need to see it anymore), and position it where you want to check the collision (in this case, under the hero)
Then do a collision check, like I assume is already being done for the hero... but do it with the collision sphere

Not sure how good I am at explaining this... anyway the reason for this is to make sure that the hero doesn't actually collide with the floor, but stays a little above it (not flying above it, just so his feet aren't embedded within the ground) because that would cause conflicts with your movement collision, resulting in the problem you be having D:
Cian Rice
20
Years of Service
User Offline
Joined: 8th Jun 2004
Location:
Posted: 18th Oct 2004 02:57
So for collision with the ground I would have it with the sphere and then fallin=0?
That definatly was a bit confusing. Seen more confusing though and also I'm very confused about how I have it under the hero I just position it under him or do I need collision? And how do I make it follow him?

If you don't get what I mean could you show me an example?

There is only one way to package shaolin: Shaolin Soccer...
OldTifu
21
Years of Service
User Offline
Joined: 10th Jan 2003
Location: Scotland
Posted: 18th Oct 2004 08:22
Of course you need collision... isn't that the whole point?
Follow him? That's simple... you just position it under him... you have his co-ordinates as variables don't you? (like hero_x# or jus x# or whatever?) the x# and z# variables of the sphere are the same as the hero, and y# value is just a little lower than him (a lower value)
Cian Rice
20
Years of Service
User Offline
Joined: 8th Jun 2004
Location:
Posted: 18th Oct 2004 08:25
Okay, I'll try and see if I can work this out as I'm still a bit confused but if I can't I'll post back with my inqueries.

There is only one way to package shaolin: Shaolin Soccer...
Cian Rice
20
Years of Service
User Offline
Joined: 8th Jun 2004
Location:
Posted: 19th Oct 2004 05:28
I see something there was something in your code I hadn't noticed that messes up everything, it turns out I don't need a collision sphere it's the fact that in your code you have:

Of course I had it there originally but then I discovered something, when I remed it I could move, but not jump when I un-remed it I could jump but not walk.
So I need to find a way to get this to work.

There is only one way to package shaolin: Shaolin Soccer...
OldTifu
21
Years of Service
User Offline
Joined: 10th Jan 2003
Location: Scotland
Posted: 19th Oct 2004 05:48
How does this mean you don't need collision sphere?
Cian Rice
20
Years of Service
User Offline
Joined: 8th Jun 2004
Location:
Posted: 19th Oct 2004 05:50
What I mean is the collision sphere didn't make a difference it just that one part of the code that changes everthing if I don't use it I can move but if I do I can jump.

There is only one way to package shaolin: Shaolin Soccer...
OldTifu
21
Years of Service
User Offline
Joined: 10th Jan 2003
Location: Scotland
Posted: 19th Oct 2004 08:50
Wel you can't be doing it right if the col_sphere isn't making a difference... it should work with that line you're talking about as far as I can figure...
Cian Rice
20
Years of Service
User Offline
Joined: 8th Jun 2004
Location:
Posted: 19th Oct 2004 08:51
Hold on a second, let me try an experiment, won't tell you what it is though until I'm done.

There is only one way to package shaolin: Shaolin Soccer...
Cian Rice
20
Years of Service
User Offline
Joined: 8th Jun 2004
Location:
Posted: 19th Oct 2004 09:05 Edited at: 19th Oct 2004 09:37
My experiment failed.
So it doesn't matter what it was, should've figured it wouldn't work.
I've looked at your code Tifu and I don't see why it works in yours but not mine.
I'll have another go and see if I can get both walking and jumping to work.
EDIT

I did some rearranging, just with ceratin collision variables and now finally I can both move and jump.

There is only one way to package shaolin: Shaolin Soccer...
Cian Rice
20
Years of Service
User Offline
Joined: 8th Jun 2004
Location:
Posted: 19th Oct 2004 21:58
What I want to do next:

Finally there is jumping and later on today I'll implement the waypoint system of AI, so next I want to move on to some more stuff.
Better Enemy AI:

I want to add a waypoint system for the enemies too, I'll probably used a different version of Andrew's code. But I want the enemies to be able to block and cast magic, also I want to add a button for the player to be able to block but that will be easy stuff.
Weapons and Armor

we didn't really get anywhere with this last time so I thought about redoing the whole battle system so what weapon your using affects how much damage you deal and how much armor you have affects how much damage you take.
Different Types of Enemies...

Well I thought this would be easy, but. eh it wasn't I tried making an array and copying the way the first enemies worked and changing some varaiables and what not but it didn't work because it said that the object already existed at the line where I was loading the objects, pretty much I wanted the second group of monsters to have double the health, deal triple damage, but have less defense, we'll need to rework the battle system for this though, also I want to add a boss that comes out of hiding when a quest is taken, and I know how to have the boss come and I'll just have to but have the code be the same almost as the second group of enemies.
AI who help in combat

Just some really stupid AI who will follow you but do move a bit on their own when you're not moving at all and will fight also and have health. I can have them follow you by positioning them back but having them do combat and be the target of attacks from enemies is something I'll need help with and also making sure that once you start moving again they'll foloow you, then I'll add magic and XP.
I guess that's all for now...
I think I'll wait until I get Cshop then go back to cels once I've built the inners of a house.

There is only one way to package shaolin: Shaolin Soccer...
Cian Rice
20
Years of Service
User Offline
Joined: 8th Jun 2004
Location:
Posted: 20th Oct 2004 20:50
Hello?

There is only one way to package shaolin: Shaolin Soccer...
Cian Rice
20
Years of Service
User Offline
Joined: 8th Jun 2004
Location:
Posted: 21st Oct 2004 06:23
Tifu...
I know you're here, please reply.
Anything,
like some help with my new topics or
Quote: "It took you long enough to get something so simple implemented"

Please reply...
Also I've noticed I've asked most of the questions, there have been a few others like Gothboy Freak_Oz, and FDM, but not many others, please post your RPG questions here two, there is tons of code here to help you and Tifu will probably help you if you need, I'll even try too .
I mean threads aren't here just to help one person.

There is only one way to package shaolin: Shaolin Soccer...
Crazy Programmer
AGK Developer
20
Years of Service
User Offline
Joined: 6th Sep 2004
Location: Lost in AGK
Posted: 21st Oct 2004 06:35
anime r u in a team

Cian Rice
20
Years of Service
User Offline
Joined: 8th Jun 2004
Location:
Posted: 21st Oct 2004 06:41
No. Why?

There is only one way to package shaolin: Shaolin Soccer...
Crazy Programmer
AGK Developer
20
Years of Service
User Offline
Joined: 6th Sep 2004
Location: Lost in AGK
Posted: 21st Oct 2004 07:19
i was wondering if u would like to help me make my game i am making a rpg its going to be like ever quest with out the online theirs going to be a goal for the player the goal so far is im going to make 3 versions of the game each version is going to be different
the first one the goal is going to be a dark mage created a portal and somthing went wrong and his castle is ruled by powerful creatures and u have to fight gain xp in magic and combat to kill the creatures and get the key and lock the portal if your intrested i will give u some more game info

Cian Rice
20
Years of Service
User Offline
Joined: 8th Jun 2004
Location:
Posted: 21st Oct 2004 08:18
No thanks.

There is only one way to package shaolin: Shaolin Soccer...
Crazy Programmer
AGK Developer
20
Years of Service
User Offline
Joined: 6th Sep 2004
Location: Lost in AGK
Posted: 21st Oct 2004 08:23
ok so hows your project comming

Cian Rice
20
Years of Service
User Offline
Joined: 8th Jun 2004
Location:
Posted: 21st Oct 2004 08:26
Well I'm stilling working on my engine for both of my games, also I'm working on my RPGs story, and my friend is adapting a video game story for the Shaolin Soccer movie and is adding more content so it is a full length game.
If you want to know the name of my RPG it is Kamagata, I'm working on the website, and will post pics of my RPG engine on it or you can visit the link a few pages back.

There is only one way to package shaolin: Shaolin Soccer...
Crazy Programmer
AGK Developer
20
Years of Service
User Offline
Joined: 6th Sep 2004
Location: Lost in AGK
Posted: 21st Oct 2004 10:35
how whould i say when the character has killed like 10 bad guys how would i have him advance a level like have his lvl in the top left had corner etc how would i make him advance a lvl

Cian Rice
20
Years of Service
User Offline
Joined: 8th Jun 2004
Location:
Posted: 21st Oct 2004 10:56
Could you rephrase that?

There is only one way to package shaolin: Shaolin Soccer...
Crazy Programmer
AGK Developer
20
Years of Service
User Offline
Joined: 6th Sep 2004
Location: Lost in AGK
Posted: 21st Oct 2004 11:49
like on the hit points bar i want to make a level bar like that but every 10 kills i want it to pop up and say like lvl 2 or if your lvl 3 it would say lvl 4 but ever 10 kills u advance a lvl and i want a lvl bar like the hp bar can u tell me how to do that

Oneka
20
Years of Service
User Offline
Joined: 24th Apr 2004
Location: Hampton,VA
Posted: 22nd Oct 2004 10:00
thats easy
just make your system for the pop up w/e and make it so that when your EXP = or > then Levelexp then level up ;P


Making better games everday!
Oh yeah and just so you know its Oh-nek-a not One-ka!
OldTifu
21
Years of Service
User Offline
Joined: 10th Jan 2003
Location: Scotland
Posted: 22nd Oct 2004 18:39
I don't think I can be of much help, what I started helping you with was very simple little things. I'm no good at describing how to do the complex stuff (*points towards his attempt to explain weapon damage thing *) and I know nothing of AI which is what seems to be the source of many of thy queries
Cian Rice
20
Years of Service
User Offline
Joined: 8th Jun 2004
Location:
Posted: 22nd Oct 2004 21:17
Oh, okay, maybe someone else can help Tifu.
@Crzy Programmer:
I'll make you an example to show you a way later, it is simple though, like Oneka said.

There is only one way to package shaolin: Shaolin Soccer...
Cian Rice
20
Years of Service
User Offline
Joined: 8th Jun 2004
Location:
Posted: 23rd Oct 2004 04:20
Before I post an example this is pretty much what you want to do:
First you want to make an image that says:
"Level Up!"
Then, you want to load the image into Darkbasic, then you want to sprite the image and hide it and when you reach the maxium XP you want to fade in the image and have it move up the screen, or whatever you want it to do.
Then you hide the image until it is needed again.

There is only one way to package shaolin: Shaolin Soccer...
Cian Rice
20
Years of Service
User Offline
Joined: 8th Jun 2004
Location:
Posted: 23rd Oct 2004 09:39
Hey! If you're reading Andrew Neal I was wondering if you would read your email, I have sent you a message realting to your code.

There is only one way to package shaolin: Shaolin Soccer...
Crazy Programmer
AGK Developer
20
Years of Service
User Offline
Joined: 6th Sep 2004
Location: Lost in AGK
Posted: 23rd Oct 2004 22:50
ok im going to do what u said

Cian Rice
20
Years of Service
User Offline
Joined: 8th Jun 2004
Location:
Posted: 23rd Oct 2004 22:51
Okay. I didn't get time to make an example, sorry.

There is only one way to package shaolin: Shaolin Soccer...
Crazy Programmer
AGK Developer
20
Years of Service
User Offline
Joined: 6th Sep 2004
Location: Lost in AGK
Posted: 24th Oct 2004 00:20
its ok

Cian Rice
20
Years of Service
User Offline
Joined: 8th Jun 2004
Location:
Posted: 24th Oct 2004 01:12
Good.
Andrew Neale you there?
I need a reply.
I can't get the boxes where I need them for the waypoints.

There is only one way to package shaolin: Shaolin Soccer...
TEH_CODERER
20
Years of Service
User Offline
Joined: 12th Nov 2003
Location: Right behind you!
Posted: 24th Oct 2004 04:33
Yep. Sorry I took so long.
Just position the cubes where you want them without using the for loop.

Realms Of Tutopia: Rise Of Evil
http://www.freewebs.com/elbsoftware/index.htm
Cian Rice
20
Years of Service
User Offline
Joined: 8th Jun 2004
Location:
Posted: 24th Oct 2004 05:43
I can put the code in fine I just because of the things like:
X*100
and whatnot I can't position them in those coardinates, everything else is fine.

There is only one way to package shaolin: Shaolin Soccer...
Cian Rice
20
Years of Service
User Offline
Joined: 8th Jun 2004
Location:
Posted: 25th Oct 2004 00:57
So Andrew, how would I chang the positioning to get it where I want it?

There is only one way to package shaolin: Shaolin Soccer...
Cian Rice
20
Years of Service
User Offline
Joined: 8th Jun 2004
Location:
Posted: 25th Oct 2004 09:49
Hey Andrew? Are you busy or something? Because I need some help getting the positioning part to put the object where I need it.

There is only one way to package shaolin: Shaolin Soccer...

Login to post a reply

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