A downloadable asset pack

Buy Now$3.99 USD or more

Forum: Topic

Draw Sprite Pos Fixed asset is fixing the draw_sprite_pos function with a shader and one script. It corrects "affine" drawing method without using D3D mode. Use very simple:

draw_sprite_pos_fixed(sprite, subimg, x1, y1, x2, y2, x3, y3, x4, y4, colour, alpha);

Demo: Download

Features:

  • True, fixed work of well-known function.
  • Perspective drawing.
  • Without using 3D.
  • Works fast and easy.
  • Optimized, clean and commented code.
  • Perfect work on all platforms - Windows, Mac, Linux, Android, iOS, HTML5 (WebGl only) and other.
  • Technical support for all who purchased.
  • And even more.

You need intermediate knowledge of GML to use.

Please write a review if you like the asset and tell me your suggestions for improvement. If you found an error in my code or my English, please contact me ;)

My other assets! Fixture editor, LUT shader, physics rope, liquid simulation, textured terrain, custom savegame system, day night cycle, breakable physics objects, shaders and more.

Purchase

Buy Now$3.99 USD or more

In order to download this asset pack you must purchase it at or above the minimum price of $3.99 USD. You will get access to the following files:

draw_sprite_pos_fixed.gmez 520 kB
draw_sprite_pos_fixed.yymp 522 kB
draw_sprite_pos_fixed.gmz 526 kB
draw_sprite_pos_fixed.yyz 1 MB

Comments

Log in with itch.io to leave a comment.

(1 edit)

How do I download the demo ? Is it possible to update the coordinates to simulate the perspective according to the camera? I did this with draw_sprite_pos but it distorts the image, I tested another script but it was too slow.

(1 edit) (+1)

Hello,

I am getting the following error in the latest version of GMS2.3

FATAL ERROR in Vertex Shader compilation

ShaderName: sh_perspective

I have used this shader in this project on previous versions. Do you have any idea what the issue might be? Thank you.

EDIT: Sorry for the bother. The issue was on my machine. I was lacking the x86 C++ package on my machine, which was apparently needed despite being a 64 bit install.

This works perfectly and saved me a ton of time. It was easy to modify it to work with surfaces as well. Thanks so much.

It seems to be not working for me with sprites what created from surface. Is there any chance to explain what you modified? Thanks.

(+1)

Just tested it in the project file and it seems working. Here is an example code:

surf = surface_create(512, 512);
surface_set_target(surf);
draw_clear_alpha(c_black, 0);
draw_sprite(s_texture, 0, 0, 0);
surface_reset_target(); 
sprite = sprite_create_from_surface(surf, 0, 0, 512, 512, false, false, 0, 0);

Are you trying to draw the surface itself? If so, change sprite_get_texture on surface_get_texture and sprite_get_uvs  on [0, 0, 1, 1], should be working then.

(1 edit)

Thanks for your quick reply and confirmation.

Basically I did the same (create sprite from surface), but just made a simple mistake when used draw_sprite_pos_fixed. I switched y3 and y4, and interestingly the normal draw_sprite_pos gave a twisted sprite (what was not an intention basically), however this fixed one had no outcome at all just a black screen, and I just thought it is surface related...

But I just corrected it, thanks for your help, your asset is working perfectly.

(2 edits) (+1)

I wouldn't recommend using sprite_create_from_surface in this way, as I *think* it will infinitely create sprites and fill up memory.

this is what I did...

instead of:

var texture = sprite_get_texture(sprite, subimg)
var uvs = sprite_get_uvs(sprite, subimg)

just do:

var texture = surface_get_texture(surface)
var uvs = texture_get_uvs(texture)
(1 edit)

funciona para game maker 1.4?

Why does this even cost money...?

I mean sell your work but, this seems like something odd to sell.

(1 edit)

I give you my permission to not buy it.
Btw, it's one of the best selling and most appreciated asset of mine, with a bunch of big commercial projects using it. And no one complained of its price before but on the contrary asking why I charge so little for that.

(1 edit)

I would buy it if I had money, if I am being honest, But due to me not having money I am trying to find something like this that is free.
(Apologies for the negative comment btw :v)

No problem.
Here is a free key of the asset for you, if you really need this and struggling with money: claim. Hope, it will help.

Deleted 2 years ago
(1 edit)

I am surprised that it's only been claimed now 😅 

I created the link that can be claimed only once and was simply hoping that EGA will claim it before someone else, as there is no functionality to create personal key links. But it seems he didn't notice my message notification or something. So no worries it can't be claimed again.

I "revoked" the key, not sure if it will unlink from you, but if you want to pay me anyways you can simply donate here: https://musnik.itch.io/donate-me

Thanks for your support!

Hello, I noticed that the asset pack on the YYG site is for GMS 2 only. Will the version here work for GMS 1.4?

(+1)(-1)

Also, can we use this for commercial projects?

Deleted 2 years ago
(+1)

Yep, YYZ version works perfect on 2.3. Thanks!

Deleted 2 years ago

Hey KeeVee, can I use this with an animated sprite? I mean, would it cycle through the frames?

Sure.