New Reply

I need help programming in Chipmunk Basic with arrow keys, and random coordinate gen.

 
Share Thread Thread Tools
Apr23-12, 02:51 PM   #1
 

I need help programming in Chipmunk Basic with arrow keys, and random coordinate gen.


I am trying to make a game in Chipmunk Basic using the arrow keys but I cant because I cannot figure out how. I have programmed in other Basic Softwares but I cannot figure out how to use the arrow keys and spacebar in my programs. An example (much simplified) of a game I am making is snake (if you dont know what it is its where a line goes around the screen and you need to come into contact with colored dots to make your "snake" bigger. If you run into yourself then the game ends). IF you know how to make graphics/sprites with colors in CB (Chipmunk Basic) then please let me know because CB is a lot different with graphics than other programs.
 
PhysOrg.com
PhysOrg
science news on PhysOrg.com

>> 'Whodunnit' of Irish potato famine solved
>> The mammoth's lament: Study shows how cosmic impact sparked devastating climate change
>> Curiosity Mars rover drills second rock target
Apr23-12, 04:24 PM   #2
 
Can you make this work?

while
s=inkey$
if s<>"" then print asc(s)
wend

Test that by gently pressing a single key, like X or 3.
If that works then gently press one arrow key and post the results.
For X it should print a single number.
For an arrow key it may print 1 or 2 or 3 or 4 lines of single numbers.

If that works then you need to build a little machine in software that uses the numbers.
 
Apr23-12, 04:58 PM   #3
 
It gave me a type mismatch error in line 20
 
Apr23-12, 06:45 PM   #4
 

I need help programming in Chipmunk Basic with arrow keys, and random coordinate gen.


If you see this reply please go to this link because I wanted to make an new post that re-phrased my question. http://www.physicsforums.com/showthr...31#post3880431. If this doesnt work then just search my name and look for the post on programming (not this one).

Thanks ALL!!!
 
New Reply
Thread Tools


Similar Threads for: I need help programming in Chipmunk Basic with arrow keys, and random coordinate gen.
Thread Forum Replies
For computer game programming use: The damage of an arrow Calculus 0
Cat vs. chipmunk General Discussion 4
Very basic coordinate problem Calculus & Beyond Homework 4
Random coordinate General Math 14
Borland C++ 5.0 input using arrow keys Programming & Comp Sci 3