Software sprites (Development Foros MSX)MSX Resource Center            
                       
English Nederlands Espa�ol Portugu�s Russian                  
 Noticias
   Página principal
  Almacén de noticias
  Temas de noticias

 Recursos
   Foros MSX
  Artículos
  Analisis
  Informe de ferias/RUs
  Álbum de fotos
  Ferias y encuentros
  Encuestas
  Enlaces
  Buscar

 Software
   Descargas
  Tienda Online

 MRC
   Quiénes somos
  Únete a nuestro equipo
  Donar
  Políticas
  Contacta con nosotros
  Enlázanos
  Estadísticas

 Buscar
 
  

  

 Login
 

Login

Contraseña




¿Aún no tienes una cuenta? ¡Conviértete en miembro del MSX Resource Center! ¡Únete a nosotros!.


 Estadísticas
 

Hay 40 invitados y 1 miembro en línea

Eres un usuario anónimo.
 

Foros MSX


Foros MSX

Development - Software sprites

Ir a la página ( Página anterior 1 | 2 | 3 Siguiente página )
Autor

Software sprites

SLotman
msx professional
Mensajes: 544
Publicado: Febrero 09 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
Mensajes: 2347
Publicado: Febrero 09 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
Mensajes: 124
Publicado: Febrero 09 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
Mensajes: 3142
Publicado: Febrero 09 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
Mensajes: 1006
Publicado: Febrero 09 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
Mensajes: 1006
Publicado: Febrero 09 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
Mensajes: 1006
Publicado: Febrero 09 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
Mensajes: 124
Publicado: Febrero 09 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
Mensajes: 1006
Publicado: Febrero 10 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
Mensajes: 124
Publicado: Febrero 10 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
Mensajes: 1006
Publicado: Febrero 10 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
Mensajes: 1006
Publicado: Febrero 10 2005, 01:23   
I have tried to verify that P=1-P is faster than P=PXOR1... it is not.
Grauw
msx professional
Mensajes: 1006
Publicado: Febrero 10 2005, 01:48   
Update: I have added a ‘useful pokes’ section listing a number of well... useful pokes .

~Grauw
AuroraMSX

msx master
Mensajes: 1262
Publicado: Febrero 10 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
Mensajes: 1528
Publicado: Febrero 10 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

 
Ir a la página ( Página anterior 1 | 2 | 3 Siguiente página )
 







(c) 1994 - 2008 Fundación MSX Resource Center. MSX es una marca registrada de MSX Licensing Corporation