M
Mylon
Guest
Hi, I'm new to Game Maker but not to programming.
I'm currently at step 1 of the Turn Based Strategy tutorial (https://forum.yoyogames.com/index.php?threads/turn-based-strategy-101-video-series.3428/) but I went a little off the rails. Rather than limiting myself to a grid drawn at the size of the window, I wanted to make a bigger battlefield. So I added a camera object and made it respond to keys so I can scroll up/down/left/right so I can see a bigger area.
Now this little experiment has left me with a million questions as I'm learning the quirks of GM, such as:
* why does "view_xport[0] + 10" move the view to the left rather than the right? Same behavior seen with view_yport[0].
* Is there a way to not play animations by default? I want a button with a unpressed, hover, and pressed graphic. Are using frames within the same sprite not the right way to do this?
* Why does my button draw twice? If I comment out the draw_self() line on the tile->draw->execute code script, the tile does not get drawn. But my button seems to get drawn during the draw step and the draw_GUI step!
* Why is the area outside of the room black? How strictly are the room boundaries enforced?
* Why is the room not larger? I tried setting the size to 10240 x 7680 but the bottom right corner ( at 1025,769 ) is still black and not the expected background color.
* Attaching code to various objects at various stages seems like it can get crazy to manage and code can end up hidden everywhere. Is there a better way to see/organize my code?
But the real obstacle I ran into is when I scroll up/left, everything is fine. When I scroll down/right such that the top-left corner of the room is no longer visible, all of the tiles disappear! What makes the top/left corner so magical to the "tile->draw->code->draw_self()" step?
I'm currently at step 1 of the Turn Based Strategy tutorial (https://forum.yoyogames.com/index.php?threads/turn-based-strategy-101-video-series.3428/) but I went a little off the rails. Rather than limiting myself to a grid drawn at the size of the window, I wanted to make a bigger battlefield. So I added a camera object and made it respond to keys so I can scroll up/down/left/right so I can see a bigger area.
Now this little experiment has left me with a million questions as I'm learning the quirks of GM, such as:
* why does "view_xport[0] + 10" move the view to the left rather than the right? Same behavior seen with view_yport[0].
* Is there a way to not play animations by default? I want a button with a unpressed, hover, and pressed graphic. Are using frames within the same sprite not the right way to do this?
* Why does my button draw twice? If I comment out the draw_self() line on the tile->draw->execute code script, the tile does not get drawn. But my button seems to get drawn during the draw step and the draw_GUI step!
* Why is the area outside of the room black? How strictly are the room boundaries enforced?
* Why is the room not larger? I tried setting the size to 10240 x 7680 but the bottom right corner ( at 1025,769 ) is still black and not the expected background color.
* Attaching code to various objects at various stages seems like it can get crazy to manage and code can end up hidden everywhere. Is there a better way to see/organize my code?
But the real obstacle I ran into is when I scroll up/left, everything is fine. When I scroll down/right such that the top-left corner of the room is no longer visible, all of the tiles disappear! What makes the top/left corner so magical to the "tile->draw->code->draw_self()" step?
Attachments
-
73.6 KB Views: 17
-
37 KB Views: 17