Firstly, yes you really should be using kb_Scan instead of os_GetCSC, which should give you some speed improvement (and also let you move the cursor along diagonals).

The method that I used for VYSION 2 is a combination of partial redraw and intelligent updating--things are generally only redrawn and/or updated when they have to be, instead of every frame as I assume you're doing it now. The largest speed concern in your program is probably the large background sprites, which will be very slow to draw.

So to start with, I'd try to figure out a way in which you can move the cursor around without redrawing the entire screen. This should be pretty easy given that as far as I can tell, the background behind the cursor doesn't change very often--so you don't have to do any tricks to fix that. If you're looking for more speed after that, see if you can figure out a way to only update the things that you actually need to. It looks like you already have a start on that in marking buttons as valid or invalid. In VYSION 2, for example, only the currently active window updates, as well as any visible elements in the super menu/taskbar/etc.

Good luck!
epsilon5 wrote:


So to start with, I'd try to figure out a way in which you can move the cursor around without redrawing the entire screen. This should be pretty easy given that as far as I can tell, the background behind the cursor doesn't change very often--so you don't have to do any tricks to fix that.


I am doing partial redraw for the cursor. I grab the background Sprite and then display the cursor on top of it. This updates every frame.
Hey everyone, would y'all be interested in seeing anything like a chatbot similar to Siri (except I'm going to call it CEri) in GrannySmithOS. I apologize for the corny joke ... but seriously!
  
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 2 of 2
» 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