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 .NET / Newbie needs help with Input Basics

Author
Message
ColorOfCode
14
Years of Service
User Offline
Joined: 13th Jan 2010
Location:
Posted: 14th Jan 2010 02:24 Edited at: 17th Jan 2010 10:00
Language: C#

I've been at this for hours and I've gotten nowhere and I can't make anything move. Can someone show me how to make a single 2D object move using the keyboard? And perhaps explain to me how I could have figured that out from what is installed with the Dark GDK.Net so perhaps I can figure out the rest of the API on my own. I'm struggling here. Dark GDK was cool, but I was never much of a C++ programmer, I thought .Net would ease the burden but I've gotten even less done with it.

Here is the skeleton of Pong game I'm trying to create. Where would I declare the input functions, and how would I then call them to move the paddle up and down?



January 17th, 2010

So, I've figured out how to move sprites, but not via keyboard input. I added variables for X,Y, and velocity (I removed the two paddles and am just focusing on a single item, the ball).



I then updated the sprite method using those variables.

As far as keyboard input goes, I don't understand why the following doesn't work:



End January 17th, 2010

"The beatings will continue until morale improves"
ColorOfCode
14
Years of Service
User Offline
Joined: 13th Jan 2010
Location:
Posted: 17th Jan 2010 10:00
Language: C#

I've been at this for hours and I've gotten nowhere and I can't make anything move. Can someone show me how to make a single 2D object move using the keyboard? And perhaps explain to me how I could have figured that out from what is installed with the Dark GDK.Net so perhaps I can figure out the rest of the API on my own. I'm struggling here. Dark GDK was cool, but I was never much of a C++ programmer, I thought .Net would ease the burden but I've gotten even less done with it.

Here is the skeleton of Pong game I'm trying to create. Where would I declare the input functions, and how would I then call them to move the paddle up and down?



January 17th, 2010

So, I've figured out how to move sprites, but not via keyboard input. I added variables for X,Y, and velocity (I removed the two paddles and am just focusing on a single item, the ball).



I then updated the sprite method using those variables.

As far as keyboard input goes, I don't understand why the following doesn't work:



End January 17th, 2010

"The beatings will continue until morale improves"

Login to post a reply

Server time is: 2024-03-29 10:39:55
Your offset time is: 2024-03-29 10:39:55