ROTOZOOMANIM Zoom BUG (again)

Previous topic - Next topic

erico

oh heck... :( guess I give a go right now.

Make sure your gfx board has ANTIALIASING FXAA set to OFF.
Otherwise you get a half bright/color pixel on hard 90o edges, nothing bad though, but GLB should be able to override that in my opinion (bug? :P).

Downloaded your sprite and used on the following code:

Code (glbasic) Select
// --------------------------------- //
// Project: Hark0
// Start: Wednesday, August 14, 2013
// IDE Version: 10.283


SETCURRENTDIR("Media") // go to media files
LOADSPRITE "sprite1.png",1

//---

SETSCREEN 640,480,0
ALPHAMODE 0
SMOOTHSHADING FALSE
CLEARSCREEN RGB(126,126,126)

//---

DRAWSPRITE 1,10,30
ZOOMSPRITE 1,60,40,2,2
ZOOMSPRITE 1,150,50,3,3

//---

SHOWSCREEN
MOUSEWAIT

END


I´m zooming it with ZOOMSPRITE and I get perfect pixels as the appended photoshop dump.

It could be anim, or rotozoomanim produces different results?... but I still have to check those.
That I will leave for tomorrow. :bed:




erico

Putz! The image is a bit strange here, best append the project + harkotest.jpg in a zip, here we go.

erico

#17
What?? Nothing for tomorrow! that is for chicken mcfly! =D
Not much trouble to add rotozoomanim to such, I still have the same results, perfect pixels.

code here but not much different:
Code (glbasic) Select
// --------------------------------- //
// Project: Hark0
// Start: Wednesday, August 14, 2013
// IDE Version: 10.283


SETCURRENTDIR("Media") // go to media files
//LOADSPRITE "sprite1.png",1
LOADANIM "sprite2.png",1,20,20

//---

SETSCREEN 640,480,0
ALPHAMODE 0
SMOOTHSHADING FALSE
CLEARSCREEN RGB(126,126,126)

//---

//DRAWSPRITE 1,10,30
//ZOOMSPRITE 1,60,40,2,2
//ZOOMSPRITE 1,150,50,3,3

DRAWANIM 1,1,10,30
ROTOZOOMANIM 1,1,60,40,0,2
ROTOZOOMANIM 1,1,150,50,0,3

//---

SHOWSCREEN
MOUSEWAIT

END


Prove pic appended plus zipped project+better resolution pic.

What could be wrong then? Are you sure your construction routines are doing all good?
All my theory of central pixels just went down the dump... :S That is what I get spending time drawing and not coding. :'(

Count me up on any help you need Hark0, you are doing an excellent job on Electric RPG and now its derived project, I will check how it is going on your blog, thanks for the links!

edit: I still get killed lines on nearest neighbor on photoshop when rotating stuff.:(

edit2: All done on glb 10.283, are you using newer version?

erico

#18
Wait a second... :noggin:

It seems my last results carry no perfect pixels at all, they show what you got in red too, as originally posted! The rotozoomanim is causing that, if you check the zoomsprite post, it is ok.
Heck, I will try the center pixel idea tomorrow, my brain just fried of overload back and forth... :shit:

Hark0

Quote from: MrTAToad on 2013-Aug-14
Have you tried SMOOTHSHADING FALSE and made sure anti-aliasing in your graphics drivers are deactivated.

Yes, yes... I have this func in my render routine... ;)
http://litiopixel.blogspot.com
litiopixel.blogspot.com - Desarrollo videojuegos Indie · Pixel-Art · Retroinformática · Electrónica Development Indie Videogames · Pixel-Art · Retrocomputing · Electronic

Hark0

#20
Hi @erico, very thanks for your tests...

I have this test (like you):

- Paint with ZOOMSPRITE, works OK.

- Paint with ROTOZOOMANIM, size of tile: 20x20, FAIL.
- Paint with ROTOZOOMANIM, size of tile: 21x21, FAIL.
- Paint with ROTOZOOMANIM, size of tile: 24x24, FAIL.

(Your last test with rotated sprite NOT ARE pixel perfect... as you says).

Definitelly... It's a bug!!!

I add the anim file to this post...



P.S. Do you want test Path_RPG? :P
http://litiopixel.blogspot.com
litiopixel.blogspot.com - Desarrollo videojuegos Indie · Pixel-Art · Retroinformática · Electrónica Development Indie Videogames · Pixel-Art · Retrocomputing · Electronic

spacefractal

#21
if you dont doing use division by 2 on a texture, then you might see those strange issues like this. This is not a glbasic bug, but its more that way drivers works when a uncommon imagesizes is being loaded and streamed into as a texture, which can been imperfect at time. Its needs to been power of 2 to been scaling correct. So try that and see what happens.

So this cannot property been fixed me guess.

But Since you dont use rotation, you could uses POLYVECTOR to draw your texture instead. Here you have much more control what its happens.
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation - The beagle Jam - Cave Heroes 2023 - https://spacefractal.itch.io/

Hark0

hmmm how speed difference using polyvector vs zoomrotoanim?

Sincerelly I think this problem are a really bug from glb... im are using many sprites... and fails some sprites not all...  :blink:
http://litiopixel.blogspot.com
litiopixel.blogspot.com - Desarrollo videojuegos Indie · Pixel-Art · Retroinformática · Electrónica Development Indie Videogames · Pixel-Art · Retrocomputing · Electronic

erico

#23
Hey Hark0, saw your results and I guess the issue stands.
ZOOMANIM command would come well here. :good:

I saw your new game before on your blog, but I quite didn´t understand it the first time.
The video you posted here helps a lot on that front:
http://litiopixel.blogspot.com.es/2013/08/path-rpg-gameplay-video-001.html

It is quite unique game design you have there, I love it so far!
Kind of feels like a board game.
Any hopes on multiplayer?
I also thought, what about natural/artificial events that could change/add/remove paths?
Hide some paths? Hide some path´s object?
Why not have a thread here about the game with the biggest headline news?

I would love to test, and can also do it on android and caanoo if you bother for those.

Hark0

Quote from: erico on 2013-Aug-18
Hey Hark0, saw your results and I guess the issue stands.
ZOOMANIM command would come well here. :good:

I saw your new game before on your blog, but I quite didn´t understand it the first time.
The video you posted here helps a lot on that front:
http://litiopixel.blogspot.com.es/2013/08/path-rpg-gameplay-video-001.html

It is quite unique game design you have there, I love it so far!
Kind of feels like a board game.
Any hopes on multiplayer?
I also thought, what about natural/artificial events that could change/add/remove paths?
Hide some paths? Hide some path´s object?
Why not have a thread here about the game with the biggest headline news?

I would love to test, and can also do it on android and caanoo if you bother for those.

Hi, fast replys!

First, thanks for view my blog... As you says, the idea of don't understand gameplay are intencionally... the game NO have any type of help/tuto/etc... ;)

The gameplay are similar to board game, but not at 100%,... are a mix from roguelike, action rpg, puzzle...

At this moment the game are designed for touch... my test on ipad are very good... with mouse are playable of course.

The game no have multiplayer... I'm design the gameplay thinking only in SOLO mode... hmmm

About the maps / paths / items / combat, etc... I make a new post (I send you a PM) with all features of the title...

Let me finish some optimizations and I release a Alpha version... tested on Win and Macos...

About Cannoo... the screen design are 1024x768 (1024x758 for macos)... :/
http://litiopixel.blogspot.com
litiopixel.blogspot.com - Desarrollo videojuegos Indie · Pixel-Art · Retroinformática · Electrónica Development Indie Videogames · Pixel-Art · Retrocomputing · Electronic

Hark0

My code for use polyvector sprite zoom... (only valid for one row sprite anim):

Code (glbasic) Select
FUNCTION ZOOMANIM: Anim,Sprite,PosX,PosY,Zoom

LOCAL Tile=20
LOCAL Escala=Zoom*Tile
LOCAL Origen=Sprite*Tile

STARTPOLY Anim
POLYVECTOR PosX+0, PosY+0 ,0+Origen ,0
POLYVECTOR PosX+0, PosY+Escala ,0+Origen ,Tile
POLYVECTOR PosX+Escala, PosY+Escala ,Tile+Origen ,Tile
POLYVECTOR PosX+Escala, PosY+0 ,Tile+Origen ,0
ENDPOLY

ENDFUNCTION
http://litiopixel.blogspot.com
litiopixel.blogspot.com - Desarrollo videojuegos Indie · Pixel-Art · Retroinformática · Electrónica Development Indie Videogames · Pixel-Art · Retrocomputing · Electronic