Software sprites (Development MSX Fora)MSX Resource Center MSX Info Update - Finnish MSX madness at its best           
            
English Nederlands Español Português Russian         
 Nieuws
   Voorpagina
  Nieuws archief
  Nieuws onderwerpen

 Informatie
   MSX Fora
  Artikelen
  Recensies
  Beursverslagen
  Fotoreportages
  Beurzen en meetings
  Enquêtes
  Links
  Zoek

 Software
   Downloads
  Webshop

 MRC
   Wie we zijn
  Kom bij ons team
  Doneren
  Policies
  Contact met het MRC
  Link naar Ons
  Statistieken

 Zoek
 
  

  

 Login
 

Gebruikersnaam

Wachtwoord




Ben je nog niet lid? Klik hier en word MSX vriend!


 Statistieken
 

Er zijn 121 gasten en 1 MSX vriend online

Je bent een anonieme bezoeker.
 

MSX Fora


MSX Fora

Development - Software sprites

Ga naar pagina ( Vorige pagina 1 | 2 | 3 Volgende pagina )
Schrijver

Software sprites

SLotman
msx professional
Berichten: 531
Geplaatst: 09 Februari 2005, 14:40   
I use some sort of double buffer in Dungeons & Dragons. And the game is on SCR8!

Nothing stops you from using just a small part of the screen to make a double buffer only where the "software sprite" is passing through! Just an idea


ro
msx guru
Berichten: 2320
Geplaatst: 09 Februari 2005, 15:26   
Quote:


But, the problem is: are there any MSX-Basic code-techniques to avoid sw-sprite flickering?



there is no software (gfx) sprite flickering... if you mean the "slower than refresh rate" thingy (as not to fast) yeah.. there's the page swapping thing
enribar
msx lover
Berichten: 107
Geplaatst: 09 Februari 2005, 17:02   
Thank to all, but now the main question is:
since there are many threads in this forum asking programming tips&tricks, I think It's time to put all answers on some page, for ex. in MSXAsm site ('MSX Assembly Page'). Do we start?
BiFi
msx guru
Berichten: 3142
Geplaatst: 09 Februari 2005, 17:07   
The MSX Assembly Page is mainly (if not only) focused on information, tutorials, sources, etc. about/in assembly and any assembly related question could (if not should) very well be explained on the MSX Assembly Page.

It wouldn't hurt though having a similar page for MSX-BASIC. It could be possible then to link the
DEF USR<x>=<address>
and
<result variable>=USR<x>(<input variable>)
to some page on the MSX Assembly Page since that is closely related to assembly again.
Grauw
msx professional
Berichten: 1002
Geplaatst: 09 Februari 2005, 22:33   
BiFi, er, what you’re saying is in direct conflict with my comment on the previous page (as well as the first paragraph on the frontpage of the MAP)

The MAP is *NOT* focused on Assembly alone. It just happens to be in the title , and we have mainly assembly-oriented content because for us as the current maintainers it is the language we program in. I would love to receive some content for other languages though.


~Grauw
Grauw
msx professional
Berichten: 1002
Geplaatst: 09 Februari 2005, 22:35   
The problem is however: someone’s got to write the texts and tips. Who will be going to do that? Not me, I’m not familiar enough with Basic.
Grauw
msx professional
Berichten: 1002
Geplaatst: 09 Februari 2005, 23:11   
I am writing a little article for the MAP about Basic tips and tricks right now, based on some ideas that just passed on the forum. Note that this is just a start, a stub, I will not actively seek for new stuff to write there (although if I encounter something again I will add it - if I remember to do so ). So people who have additional tips are encouraged to mail them, and I will add them to the article...


~Grauw
enribar
msx lover
Berichten: 107
Geplaatst: 09 Februari 2005, 23:52   
Thank you very much Grauw!
I think not only tips are useful but also simple explanations of the most important instructions, with some little examples. More or less like the RuMSX help.

Thank you again for your help!
Grauw
msx professional
Berichten: 1002
Geplaatst: 10 Februari 2005, 00:20   
The article (in its current form) can be found here:

http://map.tni.nl/articles/basic_tips_tricks.php

With regard to the MSX-Basic instructions... Yup, it would be nice to have an MSX-Basic reference online on the MAP, however that is a lot of work... Volunteers?

Anyways, it is something on the wish-list.


~Grauw
enribar
msx lover
Berichten: 107
Geplaatst: 10 Februari 2005, 00:34   
Good!
I could say this: instead of using DEFINT, a program runs more quickly if the exact type of the variable is specified. For ex., use I% instead of DEFINT:I...
Also, MSX-Basic programs are faster if there are not spaces between instrucions.

Grauw
msx professional
Berichten: 1002
Geplaatst: 10 Februari 2005, 00:59   
Enribar, I covered the spaces thing already. But I will add it to the ‘speed’ section as well. About using I% instead of DEFINT... Nice tip! Didn’t know that. Will add it to the article.
Grauw
msx professional
Berichten: 1002
Geplaatst: 10 Februari 2005, 01:23   
I have tried to verify that P=1-P is faster than P=PXOR1... it is not.
Grauw
msx professional
Berichten: 1002
Geplaatst: 10 Februari 2005, 01:48   
Update: I have added a ‘useful pokes’ section listing a number of well... useful pokes .

~Grauw
AuroraMSX

msx master
Berichten: 1231
Geplaatst: 10 Februari 2005, 10:09   
Quote:

I have tried to verify that P=1-P is faster than P=PXOR1... it is not.



You can generalize the P=1-P trick:

If there is some variable P that toggles between two values a and b then give P a proper starting value (either a or b) and you can toggle using P=(a+b)-P.
10 ' Toggle P between 13 and 42
20 P=13
30 PRINT P
40 A$=INPUT$(1) ' <-- Another tip: wait for  keypress :)
50 P=55-P       ' 55 = 13+42
60 GOTO 30


NYYRIKKI
msx master
Berichten: 1503
Geplaatst: 10 Februari 2005, 13:58   
Quote:

Hi wolf,

double buffering? Is it possibile in not-assembly languages? How?



Here is same example in SCREEN 5 with double buffering:

10 SCREEN 5
20 DEFINT A-Z
30 FOR I=0 TO 200:LINE -(RND(1)*255,RND(1)*211),RND(1)*15:NEXT I
40 COPY (0,0)-(255,211) TO (0,0),1
50 SET PAGE 0,2:CLS
60 CIRCLE (5,5),4,8
70 CIRCLE (5,5),2,15
80 '
90 COPY (X,Y)-STEP(9,9),P TO (10+P*10,0)
100 COPY (0,0)-STEP(9,9) TO (X,Y),P,TPSET
110 SET PAGE P:P=PXOR1
120 COPY (10+P*10,0)-STEP(9,9) TO (VX,VY),P
130 VX=X:VY=Y
140 IF STRIG(1) THEN END
150 R=PAD(12):IF PAD(13)=0 AND PAD(14)=0 THEN 140
160 X=(X+PAD(13))AND255:Y=(Y+212+PAD(14))MOD212
170 GOTO 90

 
Ga naar pagina ( Vorige pagina 1 | 2 | 3 Volgende pagina )
 







(c) 1994 - 2008 Stichting MSX Resource Center. MSX is een trademark van MSX Licensing Corporation.