Register to reply 
I need help programming in Chipmunk Basic with arrow keys, and random coordinate gen. 
Share this thread: 
#1
Apr2312, 02:51 PM

P: 10

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.



#2
Apr2312, 04:24 PM

P: 1,037

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. 


#3
Apr2312, 04:58 PM

P: 10

It gave me a type mismatch error in line 20



#4
Apr2312, 06:45 PM

P: 10

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 rephrased 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!!! 


Register to reply 
Related Discussions  
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 & Computer Science  3 