hotspot different issue between STRETCHANIM and ZOOMSPRITE

Previous topic - Next topic

Slydog

Could all of this be fixed / replaced with a custom sprite system TYPE using POLYVECTORs?

Include various anchor point (hotspot) presets (TOP_LEFT, MIDDLE_CENTER, BOTTOM_RIGHT, etc), or custom based on percent (25%, 75%).
Have properties such as: x, y, rotation, zoom, colour (maybe even allow all four corners to have a unique colour. Colour should be optional for older devices that have trouble with this feature).

Then calculate everything inside a Draw() method, using SIN() and COS() for rotating the corner points.  Should be fairly quick in execution.
Add texture map / sprite sheet functionality for improved speed by batching the actual display of each sprite till the end of the frame so sprites that share the same texture can be drawn at once, lowering draw calls.

Utilizing the anchor property, you can carry this over to a powerful GUI system, for resolution independent displays.  For example, you can draw a sprite to any of the four corners easily if their anchors are set properly, and you don't have to calculate the size of the sprite and subtract from the screen edge, etc.

I must have most of this done scattered though various sections of my libraries.  But it would take a bit to glue it together into a proper library TYPE.  Be nice if such as system would be built in and included with GLBasic.
My current project (WIP) :: TwistedMaze <<  [Updated: 2015-11-25]

spacefractal

not all games needs POLYVECTORS nor all images, but far from all people is aware how they uses them. But POLYVECTOR is a quite advanced command, so its not for the beginner in mind, but its a very great command. no doubt. Im did uses that too for many uses (but not for all images).

But for the normally ZOOM and ROTATIONS commands, its just only frustations to uses them. That why im thinks SETHANDLEZOOM command could been a great idea. This would give the control back to the user, using the hotspot anchor point where they want. But this is just a request, no other than that.

Also recently its seen Erico have fighted with extractly this issue too when drawing the virtual image to the backbuffer, due this issue.

So im are not alone....
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation - The beagle Jam - Cave Heroes 2023 - https://spacefractal.itch.io/

MrTAToad

Being able to set an offset handle for all sprite commands would be useful.

Hemlos

I dont think i agree with the offset idea.
When it comes to raw GLB commands, i prefer the simplest commands.
When a command becomes too elaborate, theres more opportunity to create an error in a program.

I use zoomsprite for analzing images...the only blurring or fuzzy i see; is when the image is scaled to a size that is not a power of 2.

The offset im perfectly content with adjusting the x and y as needed with variables....more powerful this way imo.
Bing ChatGpt is pretty smart :O

Kitty Hello


spacefractal

the issue with the center genereal, is the placement can been still been unprecision due float. That would not been happens on a top/left border. Its still exists, but not something im will add to the bug list at all. This issue can been skipped.
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation - The beagle Jam - Cave Heroes 2023 - https://spacefractal.itch.io/