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.

Dark GDK / how to make someone jump?

Author
Message
programing maniac
16
Years of Service
User Offline
Joined: 19th Apr 2008
Location: Bawk, Bawkity
Posted: 26th Apr 2008 00:31
My brother has sent me on a task to try and somewhat recreate mario brawl. Well, that is going to be hard, considering I am somewhat a noob, although I know many functions.

My one problem is how to make people jump. I have thought of one way, but it is extremely long......... Is there an easy way?

Also, Is there any random function in darkGDK? I think it is like dbRandom ( ); but I need to double check.

Lastly, Is there a time finction in darkGDK or c++? I know one way, but it isn't exact-- Like is there a code that sets one object to just wait for a couple of second and then do something?

I know it seems that I won't be able to do it, and that I should start out easier, but I can manage. One thing though, get ready to answer another question-- I might have more along the way.
Core2uu
16
Years of Service
User Offline
Joined: 15th Mar 2008
Location: Saskatoon, SK, Canada
Posted: 26th Apr 2008 01:10
1. What's the extremely long way? The jump code I use for my fighter is 16 lines per character...

2. If you didn't know there is a list of all commands... Start Menu->Programs->The Game Creators->Dark GDK->Documentation->Information... You can check for a random function there...

3. You could always set incrementing integer into your loop which when reaching a certain number does something...

~~It's not who you are underneath, but what you do that defines you.~~
programing maniac
16
Years of Service
User Offline
Joined: 19th Apr 2008
Location: Bawk, Bawkity
Posted: 26th Apr 2008 02:54
1. My jump method actually proves to be faulty.
.... Whats yours? Mine is a little messy....

2. Thanks, didn't know that!

3. Thats the way I know... I was hoping there was another...

Its not about what you know, its about how you figure it out.
Core2uu
16
Years of Service
User Offline
Joined: 15th Mar 2008
Location: Saskatoon, SK, Canada
Posted: 26th Apr 2008 04:46
1. Mine isn't very clean at all, it's actually quite messy... I'm in no way an experienced programmer... I'll post but I use quite a few booleans to make it work so I'm not sure if you'll understand it...



2. That file will prove to be invaluable... keep it handy...

3. I don't DGDK has it's own timer but there is probably one included in some library that came with C++... Search around and you might find the command...

~~It's not who you are underneath, but what you do that defines you.~~
Zuka
16
Years of Service
User Offline
Joined: 21st Apr 2008
Location: They locked me in the insane asylum.
Posted: 26th Apr 2008 06:11
Try dbTimer()

It's used in both of the game examples, 2d and 3d.

I don't need an oven to make my cookies.
programing maniac
16
Years of Service
User Offline
Joined: 19th Apr 2008
Location: Bawk, Bawkity
Posted: 26th Apr 2008 17:12
thanks!
Quote: "I'll post but I use quite a few booleans to make it work so I'm not sure if you'll understand it...
"

Yeah, I understand it, I am a noob at c++ but not at programming, I was doing python before this, and I used a lot of those!-- boolians--

Once again thanks for the help!

~~Its not about what you know, its about how you figure it out.~~
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 26th Apr 2008 19:04
Core2uu
16
Years of Service
User Offline
Joined: 15th Mar 2008
Location: Saskatoon, SK, Canada
Posted: 26th Apr 2008 19:30 Edited at: 26th Apr 2008 19:32
@Jason: Could you partially program in OOP while doing the rest in procedural, seeing as there is timer class...

@programing maniac: I didn't mean you didn't know what booleans were, I was just saying since I didn't include all the code overhead and what the booleans were there for might not make sense...

~~It's not who you are underneath, but what you do that defines you.~~
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 26th Apr 2008 21:22
Absolutely

test.cpp





Something like that should work.

jgc_clock.h


jgc_clock.cpp


jgc_timer.h


jgc_timer.cpp



Does this help?

Core2uu
16
Years of Service
User Offline
Joined: 15th Mar 2008
Location: Saskatoon, SK, Canada
Posted: 26th Apr 2008 22:47
Wonderful, TYVM...

~~It's not who you are underneath, but what you do that defines you.~~
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 27th Apr 2008 22:47
You're Welcome Glad You were able to make use of that post!

Login to post a reply

Server time is: 2024-09-29 19:14:39
Your offset time is: 2024-09-29 19:14:39