Game backgrounds ?

Page 1/3
| 2 | 3

By Argon

Paragon (1088)

Argon's picture

12-08-2003, 15:42

How do you "render" the backgrounds of a game.

Example: castle walls and tiled "plant" backgrounds in Maze Of Galious.

Is it doable in basic ?
If I read correct, sprites are definitely not the answer, you can only use X sprites at a time ?

Thank you.
K

Login or register to post comments

By ro

Guardian (4150)

ro's picture

12-08-2003, 16:06

ARgon,

If I understand correctly you just wanna have background GFX for screens.
Indeed sprites are NOT the answer, they are best used for game-characters-animation etc.

A background depends on the screen nr.
screen 1 for example is mostly used in msx1 games (e.g maze of galious) and is character based. So you need to change the character types and 'print' them on screen.

in screen 5 (mostly used in msx2 games) you can draw them pixel by pixel. But it is common to use 8x8 tiles as if you were using characters.

I won't go into detail, but I hope you got a clue on where to go from here.

By wolf_

Ambassador_ (9793)

wolf_'s picture

12-08-2003, 17:43

hey ro, speaking about tiles: were the fubsy tiles 8x8 or 16x16?

If 8x8, how do you store your map then?

if you have a whole tilescreen with 8x8 tiles, you've way over 256 tiles then.. guess you can't store 1 map xy coord in 1 byte then.. or do you use the scr1/scr4 method then of having only 256 tiles, and use 1/3 screenparts to refer to..? (does this make sense anyway? Smile )

16x16 (like usas) is for more easier in this situation.

By anonymous

incognito ergo sum (109)

anonymous's picture

12-08-2003, 17:53

Is it doable in basic ?
Yes, Pumpkin Adventure 2 is a fine example of that Smile

if you have a whole tilescreen with 8x8 tiles, you've way over 256 tiles then.. guess you can't store 1 map xy coord in 1 byte then..
The trick here is metatiles. You build your map using the metatiles. Metatiles themselves consist of 4 or more 8x8 tiles. So you can work with the speed and memory usage of 16x16 tiles, while having the graphics detail of 8x8 tiles.

By ro

Guardian (4150)

ro's picture

12-08-2003, 18:47

hey ro, speaking about tiles: were the fubsy tiles 8x8 or 16x16?

If 8x8, how do you store your map then?

if you have a whole tilescreen with 8x8 tiles, you've way over 256 tiles then.. guess you can't store 1 map xy coord in 1 byte then.. or do you use the scr1/scr4 method then of having only 256 tiles, and use 1/3 screenparts to refer to..? (does this make sense anyway? Smile )

16x16 (like usas) is for more easier in this situation.

Fubsy has strickly 8x8 tiles.
You store the tiles them selfes in VRAM ofcours, but keep a map in RAM
you can use a tile more than once, hence a whole tilescreen can be made (even with just one tile)
it's just like filling a text screen with the same character over and over again.

Speaking of fubsy, see if I can put a litle link to a example of some gfx I have left...

www.wolvesteeg.nl/msx_fubsy-jungle00.jpg

here you can see how I make screens using 256x 8x8 tiles
the tiles are at the top of the screen.
;)

while I'm at it:
www.wolvesteeg.nl/msx_fubsy-sprites00.jpg

these are some of the animations I've drawn back then... got plenty more example but those are stored on my MSX HD... and as I told you my MSX FDD is broken so can't export them to show here... unless I get flashcart stuff.. still thinking about that.

ps. these are very exclusive picts ;) haven't showed them to any one but Marcel de Lorme (years ago)
not even speaking about the nosferatu project!!!

By wolf_

Ambassador_ (9793)

wolf_'s picture

12-08-2003, 19:17

well, iirc I have that pic somewhere on some disk in same case in some part of the barn here.. Smile

@guyver:

though about metatiles myself once.. but I guess there must be some restrictions to those metatiles.. if you define a metatile as 4 8x8 tiles, then still you need to have access to your whole tilescreen filled with tiles. So, a metatile could be as big as 3 to 4 bytes..

or do I miss something ?

By Argon

Paragon (1088)

Argon's picture

12-08-2003, 19:48

The screens look incredibly good Smile
You should really continue development Smile

So, I learned how to divide the tiles,
how do I put them on-screen ?
And how do I put those in VRAM as for that ?

PS: I'm a newbie at MSX-basic programming, but I'm a C++ developer, so I should learn fast. All I know for now are sprites, but as you stated before that's not the way to go Smile

Thank you in advance.
K.

By Maggoo

Paragon (1196)

Maggoo's picture

12-08-2003, 21:33

Cool GFX Ro, is this screen 5 ? Is this for the famous Flubsy ?

Now you've shown too much, you GOT to finish it Tongue

By wolf_

Ambassador_ (9793)

wolf_'s picture

12-08-2003, 22:10

I once played some early betalevel w/o enemies.. guess you lost that source, didn't ya Ro? Smile

Anyway, the game played smooth, and back then some tunes were done too.. 2 ones released on muzax3 iirc ..

By anonymous

incognito ergo sum (109)

anonymous's picture

12-08-2003, 22:34

though about metatiles myself once.. but I guess there must be some restrictions to those metatiles.. if you define a metatile as 4 8x8 tiles, then still you need to have access to your whole tilescreen filled with tiles. So, a metatile could be as big as 3 to 4 bytes..

or do I miss something ?
If you use one full page of VRAM for 8x8 tiles that's 1024 tiles. You need 2 bytes to address each tile, for bitmap modes it's handy to use X and Y coordinates, for tilebased modes (or Gfx9K BMXL command ^_^) it's an vram offset.

In stead of using those 2 bytes per 8x8 tile in your map, you use 1 byte which is an index to your metatile data.

Each 16x16 metatile consists of 4 normal tiles, stored as their addresses/coordinates. So that's 4 x 2 = 8 bytes per metatile. So, map-index x 8 = metatile offset.

By ro

Guardian (4150)

ro's picture

13-08-2003, 00:37

the screens shown above are in screen5. And lots more are already done. These are, in fact, the oldest ones (in that period I did not own a HD.. the rest is on that HD and way cooler)
Something I learned before (and was kinda surprised/upset to that others didn't use that technic) was anti-alias. All handdrawn but smooth enough to make them look like a screen 7 pic. For example: look at the 'duck' in the animation screen. Smooth eh? very smooth!

anyway, Wolf, I still got the sources. Don't worry. I've been working onnit already. The demoversion I send you back then, did it go smooth on 3.xx mhz? I never tested it..
And the tunes... man, the tunes were awesome. but we've been on that subject eh.

The reason why I got my msx working again after 4 years of absence is mainly b'coz I had this game to finish Wink
But first things first. I HAVE to complete the kernel with some better music routines (read: uniform)
However, the animation routines are already coded Smile
so no wasted time spending on that shit again!
(btw. I could use some help with more GFX... IF I will finish this little game called 'fubsy' / 'radical raymond') hah.

(hey, maggo: didn't you made a game once with scrolling level? I got a hold of a copy of it... what was the tittle again?! or wasn't it u who send me that great piece?)

Funny, I got so many pics here which have never made it public. Really, some old demo stuff and more. but never used. to bad I'd say.

Argon: about game programming. You should get into screen5 GFX handling first before you can imagen how things are done. I promise; when you get a firm grip of the VDP routines THEN you understand how it works.

It's a matter of COPY instructions. Read a byte from RAM and copy the corresponding VRAM tile to screen.

well, gotta go. My bed's calling! zzzzzzz.....

Page 1/3
| 2 | 3