Discussion

SPRITE ZOOM command

0

S3B4 2019-05-28 00:48

So....... I was thinking about the LowRes NX commands and I can’t help but wonder, why is there no PRITE ZOOM command? It could help if you wanted to make a sprite that took 4 cells but didn’t want to take 4 characters. Of course the graphics wouldn’t look good as the pixels of the sprite would just expand but if all you wanted was to make a game with bigger sprites it would be useful.


was8bit 2019-05-28 05:09

Sounds like a good idea :) I’m guessing not as easy to implement... as the graphics in NX are not founded on pixels, but on characters...


was8bit 2019-05-28 05:15 (Edited)

I do this with code here...

https://lowresnx.inutilis.com/topic.php?id=317

I expand a single character by doubling it once, then double it again ...

Note the following though..

1) it’s slow
2) it requires 20 unused character spaces to operate
3) it’s raw characters, not sprites... for each individual sprite to be “zoomed” would require 20 unused character spaces and time to process it... so to zoom 3 sprites at the same time would require you to leave an entire page of graphics empty so it would have the space to do the zoom....


Timo 2019-05-28 05:41

It would be a “hardware” feature, even the C64 had simple scaling for sprites.
I didn’t do it though because collision detection (hit) would be complicated the way I programmed it. Also there is no free bit left in the sprite attributes :O


Timo 2019-05-28 05:44

Usually you don’t need all characters at once in a game, so if you don’t have enough space, you can put your sprites in different ROM entries and copy the ones you need manually to video RAM.


was8bit 2019-05-28 06:06

<.... you can put your sprites in different ROM entries and copy the ones you need manually to video RAM.>

I plan on trying that trick on my 3D maze one day .... some day I will finish it ;)


was8bit 2019-05-28 06:12 (Edited)

Here I load different font sets into the last page of character memory...
https://lowresnx.inutilis.com/topic.php?id=428

Here I load entire sets of new characters...
https://lowresnx.inutilis.com/topic.php?id=429

The things you can do is really incredible :)


Log in to reply.