• 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.

Question - Code Are sub-pixel cameras available?

hdarren

Member
One of the things that annoy me with the GM 1.4 is that if I'm making a low-fi game with small resolution then the view can only stick on the pixel-by-pixel grid. Where as sprites, like the player sprite, can be shown in between the grid. This means the view moves jerkily when trying to smooth the view movement. Has this been fixed in GM2?
 

YellowAfterlife

ᴏɴʟɪɴᴇ ᴍᴜʟᴛɪᴘʟᴀʏᴇʀ
Forum Staff
Moderator
Since around GM6.0, this could be workarounded by setting camera projection explicitly via d3d_set_projection_ortho (with your view_*view parameters). I cannot recall if you had to store the view coordinate variables separately or not, but this is easy enough to figure out via testing.
 

Nocturne

Friendly Tyrant
Forum Staff
Admin
You can also make the view/camera size larger than the render size, so it will move smoother (Skein does this, with little to no loss in performance). So if the game is 640x480, make the app surface and view 1280x960 and you get sub-pixel movement.
 
Top