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.

DarkBASIC Professional Discussion / 2d platformer help

Author
Message
midniteferret
15
Years of Service
User Offline
Joined: 14th Oct 2010
Location: where ever you are not
Posted: 18th Oct 2010 06:26
Ok, I am planning to create a 2d platformer but I need help with some (several?) things.
1) how to make a window full screen
2) how to do collisions
3) how to do gravity and physics
4) how to move the character
5) how to have things appear out of the character (ex. ninja stars swords)
6) Do I need 2 or more dba files in 1 dbpro file
ok so please tell me the answer to these questions and more things that I left out that are needed in a 2d platformer game
Thx!

-Sharpie, not even once...
BatVink
Moderator
23
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 18th Oct 2010 10:25
Search the newsletters for Brucie, a tutorial written by VanB over several issues. It will tell you everything you need to know,and includes all of the source code.

baxslash
Valued Member
Bronze Codemaster
19
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 18th Oct 2010 14:46
1) how to make a window full screen

2) how to do collisions
Take a look here: http://forum.thegamecreators.com/?m=forum_view&t=95770&b=7 there are lots of examples but I would recommend sparky's...
3) how to do gravity and physics
Sparky's comes with some good examples of how to achieve something pretty good.
4) how to move the character
Again sparky's examples will show you this.
5) how to have things appear out of the character (ex. ninja stars swords)
I suggest getting off the starting block before thinking about the finish line. Take it as far as that for now then see what comes next... it'll take a while to get that far anyway!
6) Do I need 2 or more dba files in 1 dbpro file
No, you can produce your whole game in one dba if you want. I personally find it easier to use several (it helps keep stuff organised for me).

midniteferret
15
Years of Service
User Offline
Joined: 14th Oct 2010
Location: where ever you are not
Posted: 19th Oct 2010 00:55
Thanks to All!

-Sharpie, not even once...
midniteferret
15
Years of Service
User Offline
Joined: 14th Oct 2010
Location: where ever you are not
Posted: 19th Oct 2010 04:16
wait, and also how do you assign controls to the qwerty keyboard
like I know you can do numbers like this

but also, if this command works with the qwerty keyboard then don't you have to press enter after every key you punch in?
So basically I want to assign controls to the qwerty keyboard like you assign them to numbers but without the need to press the enterkey after every input
THX!

-Sharpie, not even once...
baxslash
Valued Member
Bronze Codemaster
19
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 19th Oct 2010 16:10


midniteferret
15
Years of Service
User Offline
Joined: 14th Oct 2010
Location: where ever you are not
Posted: 20th Oct 2010 02:08
Cool, but how come it is Keystate(17) and not say keystate(6) is there some way you are supposed to count the keyboard keys?

-Sharpie, not even once...
bergice
19
Years of Service
User Offline
Joined: 5th Jun 2007
Location: Oslo,Norway
Posted: 20th Oct 2010 02:09
baxslash
Valued Member
Bronze Codemaster
19
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 20th Oct 2010 10:29
...you can test which number you get too as some keyboards differ (I believe):


Login to post a reply

Server time is: 2026-07-22 03:51:39
Your offset time is: 2026-07-22 03:51:39