Is it possible to 'mirror' the screen easily?
Moderator: Stef
-
- Very interested
- Posts: 151
- Joined: Sun Apr 14, 2013 1:19 am
- Location: Auckland, New Zealand
- Contact:
Is it possible to 'mirror' the screen easily?
For my racing game I'm using a textured road. Obviously I'd like to save as much memory as possible so cutting the road in half and mirroring the other side would be awesome. Is this easily achievable? I haven't seen anything obvious in the various VDP functions I've been playing with.
Thanks in advance!
Thanks in advance!
-
- Very interested
- Posts: 3131
- Joined: Thu Nov 30, 2006 9:46 pm
- Location: France - Sevres
- Contact:
Re: Is it possible to 'mirror' the screen easily?
You have vertical and horizontal flip support on a tile basis. Rescomp is able to generate and optimize automatically you tilemap data given a image which use flipped tiles.
-
- Very interested
- Posts: 151
- Joined: Sun Apr 14, 2013 1:19 am
- Location: Auckland, New Zealand
- Contact:
Re: Is it possible to 'mirror' the screen easily?
Cool thanks! I'll look into rescomp
Re: Is it possible to 'mirror' the screen easily?
strangely, why I have totally mirrored tiles so obtained...
Re: Is it possible to 'mirror' the screen easily?
I use only VDP_drawImageEx(..)
as assures Stef, it should automatically optimize mirrored tiles...
or not?
as assures Stef, it should automatically optimize mirrored tiles...
or not?
Re: Is it possible to 'mirror' the screen easily?
hi,
where i can find this "vdp ram " windows tools ?
thx
where i can find this "vdp ram " windows tools ?
thx
Re: Is it possible to 'mirror' the screen easily?
http://elektropage.ru/publ/programmy_dl ... 38-1-0-122troudki wrote: where i can find this "vdp ram " windows tools ?
-
- Very interested
- Posts: 3131
- Joined: Thu Nov 30, 2006 9:46 pm
- Location: France - Sevres
- Contact:
Re: Is it possible to 'mirror' the screen easily?
VDP_drawImageEx(...) just draw an image given a specified tileset and tilemap. What matter is the tool used to convert your image to internal binary format. Rescomp should take care of it, normally it detects duplicate / flipped tiles and arrange tileset/tilemap for that.alko wrote:I use only VDP_drawImageEx(..)
as assures Stef, it should automatically optimize mirrored tiles...
or not?
I forgot to reply in the appropriate topic but i tested rescomp on your image and it works as expected, I obtain 135 uniq tiles over the 240 base tiles which is expected given the input image.
-
- Very interested
- Posts: 151
- Joined: Sun Apr 14, 2013 1:19 am
- Location: Auckland, New Zealand
- Contact:
Re: Is it possible to 'mirror' the screen easily?
So rescomp is part of the sgdk... do I need to do anything to utilise it or is it always used when I import resources? Am I right in assuming that if my image is symmetrical it will handle it for me? That sounds better than trying to work out how to fill empty tiles with flipped matching tiles
-
- Very interested
- Posts: 3131
- Joined: Thu Nov 30, 2006 9:46 pm
- Location: France - Sevres
- Contact:
Re: Is it possible to 'mirror' the screen easily?
As long you image is symmetric on tile basis (8x8 pixel block) it will work.
And yeah, rescomp is used automatically when you use .res file to declare your resources.
And yeah, rescomp is used automatically when you use .res file to declare your resources.
-
- Very interested
- Posts: 151
- Joined: Sun Apr 14, 2013 1:19 am
- Location: Auckland, New Zealand
- Contact:
Re: Is it possible to 'mirror' the screen easily?
Awesome Pretty sure I can finish the road "engine" this weekend Thanks for all your help, Stef!!!
Re: Is it possible to 'mirror' the screen easily?
rescomp which comes complete with SGDK.What matter is the tool used to convert your image to internal binary format.
As well as in my case .I obtain 135 uniq tiles over the 240 base tiles which is expected given the input image.
Only RLE- algorithm .
No mirroring optimization .
8*16+6=134 tiles.
-
- Very interested
- Posts: 3131
- Joined: Thu Nov 30, 2006 9:46 pm
- Location: France - Sevres
- Contact:
Re: Is it possible to 'mirror' the screen easily?
Hmm sorry you're right, i forgot to count about the blank tiles, it's why we obtain 135 uniq tiles (counting 1 blank) :-/ Ok i will check that in deep ! It seems that flipped tiles are definitely not optimized (they should !)