MSX1 Sprite animation (Development MSX Fora)MSX Resource Center            
            
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 60 gasten en 1 MSX vriend online

Je bent een anonieme bezoeker.
 

MSX Fora


MSX Fora

Development - MSX1 Sprite animation

Schrijver

MSX1 Sprite animation

Huey
msx professional
Berichten: 630
Geplaatst: 07 April 2006, 12:07   
I want do make animated sprites for an MSX1 game. Strangely enough there arn't any post concerning sprite animation. Only the good old 5th sprite, and multi color sprite questions . So it seemed a good reason to start this topic. As I believe animation is MORE inportant than fancy colors.

After doing some planning on the sprite generator table I come to the conlusion that I can define 64 (16x16)diferent sprite patterns.

My question is:
- I it a good idea to alter a spritepattern to animate or should i alter the name in the sprite attribute table?

As I'm an MSX asm/vdp noob at the moment I just don't oversee the direct consecuences.
I can imagine that the RAM -> VRAM copy is slower than the sprite attrubite tabel alter.

Or should I go for this option:
On screen build up (no scrolling), on entering a new 'room', copy the sprite animations that are used to the sprite generator table and animate using the attribute table?
(Got the feeling I just gave the answer to my question myself )

BiFi
msx guru
Berichten: 3142
Geplaatst: 07 April 2006, 13:41   
or set up a bunch of sprite patterns with the animation frames and cycle through those... it's a lot faster to change 1 byte in VRAM for the sprite pattern in the sprite attribute table than redefining a sprite by writing 32 bytes all the time.

in SCREEN1 or 2 the tables are located in the same place... unless you decide to set up the VDP registers yourself.

The sprite attribute table starts from $1B00 (size 128 bytes) and the sprite pattern table starts from $3800 (size 2048 bytes).
Huey
msx professional
Berichten: 630
Geplaatst: 07 April 2006, 14:26   
Thanks that was what i was opting
I'll cycle the sprite patterns using the name table. And store the patterns every other level/theme when there will be no gameplay.

Another questing about screen 2, just to be sure:

Pattern name table (3x2KB = 6KB)
Pattern generator table (3x2KB = 6KB)

What if i only use 128 patterns?
Will that create a continous block of (3x1KB) 3KB?
Or does this leave memory holes of 1KB which i can use for the pattern color table so there is 4KB left (in which I can store the sprite attrib en pattern tables (max 128bytes+2KB)?

Then there is also a trick mentioned somewhere to make the 3rd pattern table use the 2nd pattern generator (using reg #4)?

I've been reading the MSX1 VDP en MSX techbook but it's only confusing me more.......
GhostwriterP
msx addict
Berichten: 313
Geplaatst: 07 April 2006, 14:54   
Quote:

Thanks that was what i was opting
I'll cycle the sprite patterns using the name table. And store the patterns every other level/theme when there will be no gameplay.


Some games need more than those 64 'predefined' frames. Then you gonna have to update
the Sprite Generator (writing those 32 bytes).

Quote:

What if i only use 128 patterns?
Will that create a continous block of (3x1KB) 3KB?
Or does this leave memory holes of 1KB which i can use for the pattern color table so there is 4KB left (in which I can store the sprite attrib en pattern tables (max 128bytes+2KB)?



It leave holes and you can not fill it up with colortables. Why, well the color tables can only
be placed at steps of 8 kb. So they either start on 0000h or 2000h

Quote:

Then there is also a trick mentioned somewhere to make the 3rd pattern table use the 2nd pattern generator (using reg #4)?



Just set bit 0 and bit 1 of r#4 to 0 and for the colortable r#3 bit 5 and bit 6 to 0

All sets will now be the same as the first. There are more variations, you'll just have the try them
to see what it does.

On msx1 it is also possible to set these bits however, Sprites will be affected.
There is a topic about sprite doubles for msx1 www.msx.org/forumtopic5579p15.html

On msx2 it will all work just fine.


PS:somewhere halfway the forem topic is a test program wich demostrates the effect (a total of 96 sprites!)
emulators do not (yet?) support this TMS 'bug' so you'll need a real msx1 to test it.



Huey
msx professional
Berichten: 630
Geplaatst: 07 April 2006, 15:25   
Thanks,

I won't be using the reg#4 trick as I want it to be full MSX1 compatible. I'll just copy the gfx data 3 times.

Main reason why i was asking was some miscalculation I made..... I counted the pattern name table to be 6kb (768x8 bytes) instead of jst 768 bytes. DUH

I think I can fit my ideas into the 64 patterns for each theme'd level.

BiFi
msx guru
Berichten: 3142
Geplaatst: 07 April 2006, 23:22   
if you're gonna use SCREEN1 you can use R#4 as there is more than 8KB of VRAM still free to use... to switch between pattern tables
Huey
msx professional
Berichten: 630
Geplaatst: 08 April 2006, 10:51   
I'm going to use SCREEN 2. I plan to make a ROM game so I dont mind storing 3 x 4 KB (patterns+colors) in ROM for 3 different patternsets. I don't know what I should to with the free VRAM anyway.


norakomi
msx professional
Berichten: 861
Geplaatst: 09 April 2006, 18:01   
Quote:

I've been reading the MSX1 VDP en MSX techbook but it's only confusing me more.......

Trust me on this one:
I completely agree with you.
Its very confusing.
But keep holding on there, and I promise you, it wont take long for things to start make perfect sense !!!

Hang on there ! You'll get all the help you need !!!
norakomi
msx professional
Berichten: 861
Geplaatst: 09 April 2006, 18:09   
Quote:

I plan to make a ROM game so I dont mind storing 3 x 4 KB (patterns+colors) in ROM for 3 different patternsets.

Could you give us some more details about the game, maybe we can help you with the construction of the game !!!
Huey
msx professional
Berichten: 630
Geplaatst: 09 April 2006, 21:41   
Well. I don't really know yet.

It'll be a platformer. Non scrolling.
I want to use a little puzling ala soukoban and kingsvalley II
And use the action elements from the goonies, higemaru and maze of galious.

Stage themes will be ruin like (influenced by indiana jones).
I'm not planning on end bosses but specific small puzzles as a final map.

Currently i'm just testing my skills on graphics display. Which is taking a lot if time.
So nothing much now.
The only thing i will be needing is music (psg) and sound effects. But thats a problem for later.
 
 







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