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

Legacy GM problem restarting a 3d game (DOOM style)

F

Filipe Valente Mendes

Guest
Hi everyone,
I tried to look for a solution here to a similar problem but I could not find, so here goes

When I reach the objective of my game BOON (on ggj 2019) and restart it, it is flipping the images/textures that does not belong to the game rooms itself. I have already tried to kill every event at the end of the final room but there was no result. Even when I put a loose image on a new room, it does not work either.

here is a few images that illustrates what I am telling above:
This happens when it restarts the game, the edge engine logo is flipped;
bug01.jpg

This happens when there is a image after the final room but the object is flipped on the other one;
bug02.jpg

And this is my title screen after the last room;
bug03.jpg

This is the code that I used on the object at the step-step event that finishes the game and restarts it using an alarm event:
Code:
//step event     
if place_meeting(x, y, o_player)
{
    room_goto(splash);
    instance_deactivate_region(0,0,1280,720,r_five,0)
    alarm_set(0,30)
}

//alarm 0 event
game_restart();
Thanks on advance
 
Apparently game_restart() does not reset all settings relating to the gpu.

You can resolve this problem by setting a projection before drawing in those rooms.

An example: d3d_set_projection_ortho(view_xview,view_yview,view_wview,view_hview,view_angle);

In gamemaker, then you use built-in orthographic projections, you are using a right-handed coordinate system. And when you use built-in perspective projections, you are using a left-handed coordinate system. The switch from one to the other causes the world to appear mirrored on your screen. When you use d3d_start(), gamemaker automatically switches to a left-handed perspective projection. And apparently game_restart() doesn't set it back.
 
Last edited:
Top