Ok, so I am developing a game where things fall frome the top and you have to dodge them. It is also the first program I am programming with xLib.

Things a made already:
- Sprites
- 2 things per collum
- they disappear at the bottom
- sees if you are hit --> draws over you a new Sprite

To Dos:
- Make it quicker
- Add a Menu
- Make that te things can't be in each other
- allow costome Sprites
- Highscore with name




Edit by Merth: Changed the image to actually be an image.
Nice! Any chance of screenies? And If I may suggest, could you possibly add in achievements and have unlockable sprites as you gather more points?
Granted, there should be a gif, but i don't know why it is not displayed. http://img143.imageshack.us/i/mino01.gif/
Maybe it's an upload error?
Dunno, It is displayed now to me.
huh, maybe its just me. But could you possibly add in achievements and have unlockable sprites as you gather more points? That might be interesting to put in a later version.
It's because I changed it.
http://img143.imageshack.us/i/mino01.gif/ is a link to a webpage, when you go to it, it's clearly a webpage and not a link to an image. When I right-click and do "view image"on the image, it gives: http://img143.imageshack.us/img143/7099/mino01.gif which is a link to an image, so that's what goes in the image tags.
Oh, thanks. I'll remembe3r that for future! Smile
To me the xLib Getkey command ( real(Cool ) doesn't work, even thought i check the knew numbers for the keys and that is stored in Ans. Plz help!
Would you mind posting the part of the source in question?

Code:
:real(8
:C+U->C
:If Ans=2 or Ans=3
:Then
:real(1,8A,54,1,8,201,3,0,0,0,0
:If Ans=2
:Then


And so on

Ok, I can't find any syntax problem...but it still doesn't work :S
This looks great! Does it get harder with time, though?
Thanks! Not yet, but i have the gain stored in a Variable, so it is easy to modify, what i want to do. Smile
Sorunome wrote:

Code:
:real(8
:C+U->C
:If Ans=2 or Ans=3
:Then
:real(1,8A,54,1,8,201,3,0,0,0,0
:If Ans=2
:Then


And so on

Ok, I can't find any syntax problem...but it still doesn't work :S
Your code is modifying Ans. real(8 will store the key pressed into Ans, but then C+U->C will overwrite that, so when you check Ans, you're checking the result from C+U->C. Try doing real(8->K and then checking K instead of Ans.
It does? I would think C+U is being stored to C over Ans. If the destination variable isn't defined, the answer is stored in Ans; why would the result be saved to Ans and C?
merthsoft wrote:
Sorunome wrote:

Code:
:real(8
:C+U->C
:If Ans=2 or Ans=3
:Then
:real(1,8A,54,1,8,201,3,0,0,0,0
:If Ans=2
:Then


And so on

Ok, I can't find any syntax problem...but it still doesn't work :S
Your code is modifying Ans. real(8 will store the key pressed into Ans, but then C+U->C will overwrite that, so when you check Ans, you're checking the result from C+U->C. Try doing real(8->K and then checking K instead of Ans.

It works, but it is much slower than GetKey Sad Still thanks! Smile
Spotted that first glance. Gotta remember assignment modifies Ans. Use that to your advantage.
comicIDIOT wrote:
It does? I would think C+U is being stored to C over Ans. If the destination variable isn't defined, the answer is stored in Ans; why would the result be saved to Ans and C?
The results are always stored in Ans. See: http://tibasicdev.wikidot.com/ans
Merthsoft is of course spot-on. Smile And Sorunome, the xLIB getkey is useful when you want to detect things like dual arrow keypresses, but shouldn't be used instead of getKey for single keys.
Ok, thanks. As i don't need dueal keys I'll use the normal one! Smile
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 3
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement