Copyright © 2023 Roxy CyanSorcery
Working on Cosmogelica has been trickier than I originally anticipated, and I found out that the original style of development I was going for wasn't working. However, changing it brought its own challenges...
Note: I've written about much of this recently already, but it was in disjointed Discord and Mastodon posts (the latter of which will soon be lost) so, while this may not be anything new for some of you, it's now presented in a much more organized way. Also, because of the blog format, I'm able to elaborate much more than I can on social media or chat.
The intent with Cosmogelica, originally, was to try to create something small and arcadey. Shield Cat is nice, but the scope of the project is most likely too big to complete on my own, so while I try to figure that one out, I figured I could do a little thing and get it out there. This is especially important because, as of writing this, I haven't actually released a finished game yet. This kind of thing would be very important for any potential publishers of Shield Cat (if it goes that route,) as I could go "Look, see, I'm capable of creating and shipping a game. You can totally trust me with your mega bucks."
I think, in a way, I was trying to follow in the footsteps of Fábio Fontes and his excellent Buck Up and Drive. If you haven't played it, it's an arcade style game where you just get in your car, go really fast, and knock the cops off the road who are trying to stop you. There's also a fighting game mode, which Fontes literally came up with while in the shower.
He started the game as a fun little experimentation, which ended up becoming a full game, using a list of potential things to put in the game, and completing it when it had enough things in it. This seemed like a pretty straightforward method of development, and I was tired of working on Shield Cat and wanted to give it a break, so I went, "yea sure I can try this out." But, what I've found out over the past couple months is, filling out a checklist of items to put into the game and saying it's done when it feels done... doesn't really work for me. When do you know it's finished? What do you define as "enough?" I think the answers will be straightfoward to many reading this like, "oh yea you just specify how many of each type of thing you need, and that's it." I wish it was so easy for me...
Here's a video of Cosmogelica, with a little glimpse at the in-development boss + transition to the "boss phase"
If you haven't played Cosmogelica, the general idea is that you're traveling through space blasting gel and enemies, with the background, stage music, enemies, and color themes completely randomized. It's a good concept, which people who have tested it out found to be really fun. In someone else's hands, it could probably come out really well just sticking to this formula. However, this game is in my own hands, and while developing it I've learned my own strengths, and more importantly, my own weaknesses - The most important one here being that, without any sort of structure, I'm lost. Also, I have a lot of ideas for the game that don't quite gel (heh) with a randomized Endless mode, which is "finished" pretty much when you lose.
I can appreciate games like this, but unfortunately, I really like to have a bit of structure and finality - To be able to just play the game, beat it, and go, "yea, I've beaten it alright. That was a lovely experience that I've had." I didn't realize how much this played into my game development skills, since Shield Cat is and always was intended to be a more story-focused experience, and so had structure from the start. As I write this, I realize that it probably sounds like I've got it all figured out, but it actually took me a while to come to this conclusion. I like to let the game inform me of what type of experience it wants to be, and sometimes, I get it wrong. I'm still not sure if this is the best approach for it, but it's the one that I feel like will work for me. It's much better than the alternative I was considering, which was scrapping the project and reusing the code I wrote for it for something else.
I've made broad strokes about the story mode above, but I'll now go into detail on what it should be. My current plan is to do something similar to Star Fox on the Super Nintendo, where you have a variety of stages you can visit, with branching paths, but overall you visit about 6 stages. It would be something more in line with a traditional shmup, but I would like the variety offered by the branching paths. Replayablity is very important to me, and is why I wanted to do the Endless mode in the first place. However, I don't want to simply throw a bunch of stuff in there and hope that the player has a good experience.
The question I'm sure you're asking is this: Does this mean Endless mode is going away? Not at all, quite the contrary in fact. With this newfound structure in place, I'm able to go, "yes these are the stages I want, with these types of enemies, this color scheme, and this music and overall aesthetic." It's like an advanced version of "list of items to check off in Trello," that I feel is going to work much better for me. Also, all of the things that I put into the Story mode can be reused for the Endless mode, including additional enemies/sprites/music/etc that I make that ends up not getting into the Story mode. Ideally, nothing goes to waste.
Special note: When I say "Story Mode," the "Story" will most likely just be, "your name is Monica and you are blasting gel in space!" Nothing too deep or serious, I've got Shield Cat for that.
A video demonstrating a test of Cosmogelica's story mode system.
Implementing the story mode system, which more-or-less involved me telling the game, "hey, instead of coming up with what to do, I want you to do this instead," was actually much easier than I anticipated. Now, I'm able to load in a predefined stage, complete with event/enemy triggers (demonstrated by the points where the background changes suddenly when I reach a specific point in the stage) and a pre-defined gel layout. The benefits of this system are already making themselves clear, even in this prototyping state - I have ideas for stages with collectibles1 that you can get throughout, but you have to do special challenges/complete the stage a certain way to get them. This also allows me to craft a more unique experience for people to enjoy, who are like me and like games with a definitive "start" and "end," while also offering the Endless + other modes for those who enjoy that type of gameplay.
I should also mention, since creating a structure I want to follow and saying, "ok this is what I want in the game," I've realized just how much I've already gotten done, and the path forward is much clearer to me. Rather than saying, "is this enough songs?" I can go "ok, I want to have roughly 10 stages2, so I need 10 stage songs," and then I look and go, "wow I've already got like several songs here, and a few more that I'm working on. I'm really set up with this!" and it becomes much more encouraging to me.
As you may have noticed by now, Cosmogelica is a relatively low-res game. In fact, the base resolution for these pictures I've been sharing is 320x180. That's very small! When blown up to a 1080p display, each pixel of the game is 6x the size of normal, so when they change, it's very noticeable. However, this wasn't that apparent until I started working on the story mode above. When I had the gel scrolling by itself with its wiggly shader, and the distant parallax in the background, it wasn't a problem. Now, however, I'm introducing many more elements - including a foreground layer that scrolls along with the player and gel. Suddenly, it's very obvious the differences between the scrolling speed of all the elements and when they actually move. I decided, then, to try out high-resolution rendering.
Before anyone can get upset with me about breaking the pixel grid, you can toggle the game's resolution and keep a true pixel grid, if you're into that sort of thing. Also, I'm aware that you can maintain the pixel grid and simply do subpixel movement of the camera, but with the amount of parallax involved, it does not seem like an optimal solution for me.
The initial test of hi-res rendering. You can tell it's something I whipped together real quick by the fact that everything is on the left side of the screen.
This presented a new challenge: The higher resolution made it much, much smoother and easier on the eyes. However, now the gel and meteors in the back (which are 3D objects) were being rendered at high resolution. The mismatch between the low and high resolutions is something that nobody on earth would ever let me get away with. Trust me, enough people have written to me about the 3D gears in Shield Cat for me to know this. Also, to be clear, I didn't like how it looked at all either. The gel looked quite strange, and the meteors didn't have that dithered shading inspired by Star Fox on the SNES.
Here you can see that I've fixed all the resolution mismatching. Horray! I also demonstrate how you can toggle the drawing method between pixel perfect and subpixel movement.
After looking at what I had done in the story mode, I knew that I had to work this out. The gel was pretty simple: I simply created an offscreen texture, rendered the gel to that, and then drew that to the screen. The trick here is that, in order to allow smooth subpixel movement, the final draw of this texture is always at a subpixel Y offset. This allows it to move smoothly on the playfield while maintaining its low resolution.
The meteors were trickier. What I ended up doing with these was, I created a 512x512 offscreen texture (which can be seen in the video above as an overlay, where the meteors are drawn in blue.) Each 3D object is assigned a space of 64x64, in which it can draw itself at a low resolution. Then, I can chop up that texture and draw them as "sprites" to the screen. They also have subpixel movement, allowing them to look smooth while maintaining their low resolution. With drawing them all in a single pass to one texture, and then drawing them in a separate single pass as sprites to the screen, it's also quite efficient. I got the idea for drawing them all in a single pass and parting them out like this from Celeste, where they draw all the lighting in a single pass and then draw the parts of the result to the screen. Also, I coded this to be extendable; Originally, I had specified 256 "slots" for 3D assets to be converted to "sprites" on-the-fly, but I realized this was probably too much, so I've reduced it to 64. It'll be quite easy to upgrade this later, if needed.
Note: When the game is using pixel perfect mode, all offscreen textures added to facilitate this are not used, since they're not necessary. This will allow the pixel perfect rendering to be much faster overall, just in case people's PCs can't draw this game for some reason.
As a side note, Cosmogelica's gel drawing is based off Chicory: A Colorful Tale's implementation of marching squares, which is how all the paint works in that game. Part of my reason for starting this blog is so I can do deep dives into what I'm doing with the games I'm doing so that maybe, someone out there can be inspired by what I'm doing in the same way others have inspired me. Also, don't worry; I'll be going back and doing write-ups about Shield Cat and the various things I did for it. It's all quite interesting, or at least I think so. I also want to go into how I'm implementing marching squares myself, but that'll be a whole other blog post for another time.
I'm hoping these changes to the game will allow me to create a lovely experience that players of all types can enjoy, but it remains to be seen. What also remains to be seen is, how well people will take to long, in depth blog posts like this. I wanted to start off one with something I've already talked about, as I could focus instead on how writing into Grav is gonna work, how mixed media is gonna work, and if people are interested in this sort of thing. Please let me know! (Not in the comments below because, again, I never was able to figure that one out, and don't really want to anyways.)
Speaking of mixed media, I want to leave this off with a random MP3 of the boss theme. Can you play it? Can you see all the media in this post? We're all gonna find out how all this works, together.