Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Moving oval  RSS feed

 
Alaric Mustoe
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a oval I need to move left and right I have the variables but need to input them for player usage. I have
ex. case'a'
x=x-1;
case'd'
x=x+1
 
Les Morgan
Rancher
Posts: 752
17
C++ Java MySQL Database Netbeans IDE Oracle Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you are using "x" for your horizontal control, the that should work... increasing to the right and decreasing to the left.

What do you have so far?

Here is a small very basic animation/game loop with movement supplied by holding the appropriate key down.
 
Tushar Goel
Ranch Hand
Posts: 934
4
  • Likes 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Les, please don't provide complete solution to OP. We are here to help OP to find correct solution not ourself.
 
Alaric Mustoe
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is what i had so far
 
Knute Snortum
Sheriff
Posts: 3545
85
Chrome Eclipse IDE Java Postgres Database VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Make sure the code you post can compile. There are many syntax errors in this code. Could you clean it up and repost?
 
Campbell Ritchie
Sheriff
Posts: 53720
127
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moved to our GUIs forum.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!