New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draw Before Step #1475
Draw Before Step #1475
Conversation
39c8f46
to
4c2cffa
Compare
Codecov Report
@@ Coverage Diff @@
## master #1475 +/- ##
==========================================
+ Coverage 17.42% 17.42% +<.01%
==========================================
Files 165 165
Lines 17122 17123 +1
==========================================
+ Hits 2983 2984 +1
Misses 14139 14139
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This isn't how you do this. Change the order in events.res
. Although, if this actually solves a problem, we can talk about whether it's worth the new problems it introduces by running before half of everything is initialized.
@JoshDreamland two questions with regard to that.
|
For now, they'll switch it out manually in I'm not initializing anything in the step event. I just noticed you're running this immediately after the normal room load event chain, so this is unlikely to hit problems with uninitialized objects, but that doesn't change the fact that it's going against the flow defined in |
It's possible this could be because alarms are either off by one or that alarms are supposed to go after draw events, not necessarily that a draw event comes before a step event. |
This actually does make a difference if a draw, instead of step, event is the first event after the create and start events. To avoid having to make complicated changes to the event system, my solution in this pull request simply adds a
screen_redraw
call to the end of the load sequence, which gives the same effect anyway. This pull request changes ENIGMA to be more like older GameMaker 5-8, instead of being like GMSv1.4 in this regard.I made a test GMD project: draw-step-order.zip
Practical Implications
I've found one game alone that is directly affected by this and it's the Wild Racing game. Its start screen is drawn in an alarm that is set to
1
in the create event. In GameMaker 8, this means the control information is drawn like a HUD on top of the already drawn scene. In ENIGMA master and GMSv1.4, a step event occurred between create and the alarm, so the alarm event will draw on top of a black backbuffer. This does not entirely fix ENIGMA however because screen refresh differences between D3D and OGL mentioned in #1474 are also related to whether the backbuffer was discarded just prior to the alarm event.ENIGMA master (D3D and OGL)/Pull request (GL)/GMSv1.4
Pull request (D3D)/GameMaker 8/GameMaker 5