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 / [Help me] Controlls

Author
Message
Serengeor
15
Years of Service
User Offline
Joined: 17th Jan 2009
Location: Lithuania/lietuva
Posted: 17th Jan 2009 15:33
Ok so ive started learning to create games and i cant semm to understand this

the 57 29 and 157
where could i learn what numbers are assigned to what keys
the code is from dark invaders

GDK Developer since now
puppyofkosh
17
Years of Service
User Offline
Joined: 9th Jan 2007
Location:
Posted: 17th Jan 2009 15:57
The top left key (the ` and ~) key is 1. The 2 and @ key is two. Tt keeps going like that.
Serengeor
15
Years of Service
User Offline
Joined: 17th Jan 2009
Location: Lithuania/lietuva
Posted: 17th Jan 2009 16:01
but still its little messy like A is supossed to be 30 right ?
when i count do i count the enter after } and ] button
or after " and ' button
and what about numpad ?

GDK Developer since now
Bran flakes91093
16
Years of Service
User Offline
Joined: 13th Sep 2008
Location: Crazy Land
Posted: 17th Jan 2009 17:46
SushiBox
16
Years of Service
User Offline
Joined: 20th Sep 2008
Location: Ohio
Posted: 17th Jan 2009 18:39 Edited at: 17th Jan 2009 18:40
I personally hate using key codes so I use GetAsyncKeyState. Its used like this:



If you want a list of the Virtual Key Codes, check this link at the MSDN library: click me :3

It gives you a nice wide range of keys the tinker with. Most aren't even on my keyboard! Lol.

www.Helios-Online.net
Serengeor
15
Years of Service
User Offline
Joined: 17th Jan 2009
Location: Lithuania/lietuva
Posted: 17th Jan 2009 18:40
than you
ive already added movement up and down to the dark invaders game
now i need to know how can i implement networking. so two or more players could play it

GDK Developer since now
Zuka
16
Years of Service
User Offline
Joined: 21st Apr 2008
Location: They locked me in the insane asylum.
Posted: 17th Jan 2009 19:38
GetAsyncKeyState is slower than dbKeystate.
SushiBox
16
Years of Service
User Offline
Joined: 20th Sep 2008
Location: Ohio
Posted: 18th Jan 2009 04:42
o.o, it is? How? I mean, in order to say something as bold as that, gotta back it up with proof?

I'm not saying your wrong, but if your correct, I would love to change my coding habits ha ha.

www.Helios-Online.net
Serengeor
15
Years of Service
User Offline
Joined: 17th Jan 2009
Location: Lithuania/lietuva
Posted: 18th Jan 2009 16:58
SushiBox i used your suggested method because the list that Bran flakes91093 gave was not enaugh and i think its messed up.
now coul someone tell me how do set positioning cordinates to sprite ? (X Y) Lets say my sprite id is 105

GDK Developer since now

Login to post a reply

Server time is: 2024-11-25 11:54:16
Your offset time is: 2024-11-25 11:54:16