• Hey! Guest! The 39th GMC Jam will take place between November 26th, 12:00 UTC and November 30th, 12:00 UTC. Why not join in! Click here to find out more!
  • Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

Sprites Warp and Stretch as the Player Moves

L

Lewis Hammond

Guest
Recently I've been working on a space style shooter game and have just started to add randomly generated stars, the only problem I notice is as I (the player) moves the sprites seem turn stretch out depending on how fast I am moving and turn in the direction I am heading. No variables are linked between the two sprites. I have attached a Youtube video of the issue and a download to the source code so that anyone who wished to look in to the issue can easily see all the grahpics options I have set.

Youtube Video:
Source Download: Removed

EDIT: Issue seems to be a trick on the eyes, thanks for the help
 
Last edited by a moderator:
A

Aura

Guest
You should post the related code instead of posting the complete project. Either way, it seems like an image_xscale (or image_yscale) issue to me. For instance, if you are setting it to hspeed and hspeed is equal to 5 then the sprite would stretch horizontally 5 times! If you want to simply flip the sprite, use sign().

Code:
if (hspeed != 0) {
   image_xscale = sign(hspeed);
}
 
L

Lewis Hammond

Guest
You should post the related code instead of posting the complete project. Either way, it seems like an image_xscale (or image_yscale) issue to me. For instance, if you are setting it to hspeed and hspeed is equal to 5 then the sprite would stretch horizontally 5 times! If you want to simply flip the sprite, use sign().

Code:
if (hspeed != 0) {
   image_xscale = sign(hspeed);
}
I don't want the sprites to move at all, they stretch and move without me adding any code to them.
 

Jaqueta

Member
Probably the problem is with your monitor, I was able to see this "effect" on my "awesome" Laptop too, however, when I paused the video, it was completely normal. Try pausing the video while the ship is moving, and see if the effect persists.
 
.....This looks like simple motion blur? I think your eyes may be playing tricks on you, here. Take a SCREENSHOT of your game instead of a video. Is the "stretching" still present? The only other thing I can think of is that if you're scaling your game, you may have pixel interpolation activated in the general game settings. That *will* deform your pixels when you move if you're not scaling by an integer amount.

Edit: ah, ninja'd. There you go. They effect is just your eyes and monitor. :p
 
L

Lewis Hammond

Guest
Ah, doesn't seem like anything I'm doing wrong and is just a trick on the eyes, thanks for the help :)
 
Top