Author Topic: Star ship commander  (Read 8400 times)

0 Members and 1 Guest are viewing this topic.

tenniskid493

  • Guest
Star ship commander
« Reply #15 on: December 17, 2005, 02:16:00 pm »
@dysfunction:  I know the labels and gotos are bad, I was just too lazy at the time to get rid of them.  EDIT:  I just removed them from my game.  Now to update the code.  EDIT:  Code updated.  dragon_lance: if you hate gotos, you may want to check the updated code.  I removed all of them.

:gotosuck:goto.gif

Also, although the "If K=0:End" is unnecessary, it makes your key presses run faster and gives a better response time so that it doesnt go through the whole loop everytime, only that very short loop.  In my mind, its worth the extra 5-10 bytes to make it run that much faster.

dragon__lance

  • Guest
Star ship commander
« Reply #16 on: December 17, 2005, 04:28:00 pm »
thx, ill try it out pronto!

dysfunction

  • Guest
Star ship commander
« Reply #17 on: December 19, 2005, 09:15:00 am »
I'm not sure how If K=0:End would result in better response time. Certainly it would increase framerate when a key is not being pressed, but since nothing is happening when a key is not pressed, I can't see how that would matter. All it should do is slow it down a bit when a key IS pressed, since it has that extra If to go through.

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Star ship commander
« Reply #18 on: December 19, 2005, 09:23:00 am »
I only see the use for grayscale stuff , but I used Repeat Getkey:end instead

tenniskid493

  • Guest
Star ship commander
« Reply #19 on: December 20, 2005, 02:01:00 am »
It increases the frame rate while you aren't doing anything so it isn't in the loop somewhere when you press the key, its always right at the getkey.  I don't know, maybe it doesn't help, I'll check it out later.

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Star ship commander
« Reply #20 on: December 20, 2005, 02:33:00 am »
what is good is that it makes key detection a bit better

dysfunction

  • Guest
Star ship commander
« Reply #21 on: December 20, 2005, 07:43:00 am »
OK, I see now... I'll have to actually try it though.

tenniskid493

  • Guest
Star ship commander
« Reply #22 on: December 20, 2005, 10:54:00 am »
I've never actually tested it, it was just a theory I had.