ec1 PROGRAM:ZMOUSE real(9,1,253 real(9,0,253 real(0,0 real(12,0,0,0,0,7,0 real(12,0,1,1,5,5,0 real(12,0,0,7,5,5,1 real(9,1,252 real(9,0,252 real(3,253,1 real(9,1,253 {H,V\->\\L\MTP real(1,H,V,1,8,252,0,0,3,0,1 Repeat K=21
c1-->CODE | ec1 PROGRAM:ZMOUSE real(9,1,253
QUOTE | real(9,0,253
Isn't it so that xLib won't overwrite already existing Pics? Try adding c1-->ec2 before saving the Screen to Pic 255.
c1-->CODE | ec1For(I,1,0,-1 real(1,H,Ans,1,8,252,0,0,3,0,I Endc2 |
ec2
Since you will be using a list, you will need to change Ans back to V.
In my professional experience, an rpg made in xLIB can be as fast as an rpg made using ASM (with getcsc for the keydetection). It's also easier to calculate the stats.
very tru,but with not as much features, in ASM you can fit in so much more at a decent speed, *points to Spencer's Zelda. One thing about the Mouse program, one way to make it seem faster is to increment (x,y) by more than 1. And i have a question, is it faster to include the key detection within the main loop, or as a seperate loop as Kalan__vod coded?
Dunno, I'd say a seperate loop inside the main loop is faster. Why? When you put it directly into the main loop, it goes through the whole loop every time, thus eating up some time. A seperate loop however is likely to be smaller and is thus repeated faster, making key detection overall faster. Just a theory though :ninja:
It detects the key faster if you have a loop for the getkey function, as apposed to going through the whole loop for the game and only hitting the getkey once. If you have a small game loop, then you may not need a getkey loop but I would recommend it if it is not a live/action type game.
You canc1-->CODE | ec1Repeat getkey End Ans->Kc2 |
ec2or if you need to update after a bit of a delay, I do this, though there may be a better wayc1 -->CODE | ec1For(A,0,10 getkey->K If Ans 1-A Endc2 |
ec2
yeah thats what reuben quest did, because key detection was slow unfortunately it wouldnt work in metroid, altough I have a lil idea how I could make it work but that would make enemies move at insane speed when not walking
ThreeFingeredGuy the first code doesn't work, you want:
Repeat Ans getKey->K End
Or for delay, you can optimize to:
For(K,0,10 getkey->K End
What about this if you need more responce speed?
Repeat Ans getKey End Ans->K
or don't even use K at all? Or put the getkey into a FINANCE var?
That last code is fairly pointless because there is no need to worry about speed when waiting for the user to press the button so all you have to do is optimize for memory (no offence), but the FINANCE variables is something I will forever incourage (hehe).
pyro....your sig takes forever...
for modem users, that is XD
still, you should *try* to keep your sig size down bytewise...
|
|
|