![]() It may not be totally noticeable here, but the GUI was stretching beyond the sides of the game, which not only looked weird, but caused some minor distortion to those sprites. Unfortunately, the GUI layer, which is drawn after the app surface (and after the Post Draw event), did not want to behave. ![]() This was the case when I changed my resolution to 1024x768, so I spent more time messing around with the app surface until it was drawing at the right scaled size (with 1:1 pixels to avoid distortion), and centering it. It worked fine on my 16:9, 1920x1080 laptop monitor, but in the past, 4:3 and 16:10 (and so on) have caused the game to stretch or squish badly. With everything moved to the Post Draw event, and automatic app surface drawing disabled, I had it:īut drawing the app surface manually does mean that I don’t get nice, automatic resizing for all monitor resolutions and aspect ratios. Yeah, so it was pretty apparent I had no idea what I was doing.Īfter more consultation with Pixelated Pope, it turned out I hadn’t quite been calling the right functions in the right order. I fumbled around for a bit threw some code together to apply the shader to the app surface, and voila. The palette swapper has scripts to apply the shader to sprites, layers, depth, and so on, but nothing as far as surfaces. So it was time to try applying the shader to the app surface instead. I tried the depth first, and while it worked, it was amazingly, unusably slow. I spoke with Pixelated Pope, and there were two methods I could try: 1) apply the shader to a depth range, or 2) apply the shader to the full application surface. In other words, the shader would never apply. In GameMaker, changing the depth means the object gets put in a temporary layer for drawing, and that temp layer is not accessible via code. Torches and gates, for example, were also on those layers, and they were palette swapping.Īfter a lot more digging, it turns out that the shader was missing these objects because I was modifying their depth. Initially I thought the palette swapper was ignoring certain layers (since I was applying the swapper shader to a specific set of layers), but that didn’t hold up. It took quite a bit of digging to figure out what was going on there. It actually went pretty well, though for some reason it wasn’t hitting certain objects, like the player, or jars and other interactable items. The night palette (the bottom row) only used colors from the day palette (the top row).Īnd so I began the process of working with the palette swap shader. So I tried again:Īfter some more tweaks, I had a new palette ready to go. I took this opportunity to consolidate my existing palette, remove unused colors, and add a few new ones to support the night palette: I started by doing some mockups of how night would look, using some existing images. It would’ve been a lot of work and code modification. Inevitably, I would’ve missed some, or updated one sprite and forgotten to update another. The reason for this was mainly because I didn’t want to create two sets of images for every single piece of artwork in the game. After some conversation, I decided to try a different method, one I’d used a long time ago. It doesn’t adhere to the palette, which isn’t great, and a few people on the Discord server still felt it was too dark. Meanwhile, you would be able to see at night with a light, and that’s what I started work on: I still wanted the idea of scary, dark caves, but it would be way too irritating for everything doing it this way.įirst, I tried to simply fix the lights so that they looked better.Īfter talking it over with a few people on the Discord server, and due to the upcoming item mechanic, I decided to split out the “lighting” into three states:ĭark would be for caves and unlit dungeons: black, unless you had your light, or if there was a light in the room. It was TOO MUCH darkness, especially when large portions of the game would be spent outside at night. My original plan was to just have darkness, with torches and a lantern-like item to help you survive at both night and in the caves:Īs it turned out, this really wasn’t what I wanted. This was quite a journey the past week or so. ![]() Night and torches are now working properly! :D
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |