Skip to main content

On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Achie's Devlog - Shmup Game

A topic by Achie created Oct 07, 2022 Views: 267 Replies: 8
Viewing posts 1 to 9
Submitted (1 edit)

Socials

Ko-Fi 🐦 Twitter 📷 Instagram ⌨️ GitHub repos

I’m gonna jump in with a bigger one for starters as I just joined the jam!

Story Behind the Project

I wanted to try my hands at some real open-source games, as I saw several projects collecting them and the HacktoberFest shirts are always amazing drips. If you know my work, you should be surprised as all my code is available on GitHub, free to take, but the PICO-8 engine itself is not free. This makes my stuff not really open-source as for contributing or modifying you would need to purchase PICO-8. That is why I turned to another engine in a similar style to PICO-8.

TIC-80 and Devtober

TIC-80 is a free and open source fantasy computer for making, playing and sharing tiny games, with similar but much looser restriction than PICO-8 and it is totally free to take! One little problem is that I know absolutely nothing about this engine so the first few steps were rough, but this is the birth of a new project!

Still in the mood of Lina: Witches Of The Moon (the gameplays of the Showcase event is still running here!) I settled on a shmup project to try on this new turf.

Since TIC-80 also supports lua, which PICO-8 is based on, the basics were kinda in my head from the start, but the API is a bit different here. That said a quick base starfield and ship was quickly thrown together.

The starfield is nothing more than a collection of points moving downwards, few of them with higher speed and white, some of them dark and slower.

The plan is to have different enemies swarming from above, killing them grants experience which we use to level up and gain upgrades to our ship!

The only tricky thing in this system is the level up selection screen and tracking which upgrade to draw/choose/keep. For this we use a very simple method that is not the prettiest, but is very easy to setup and expand upon.

First step, draw the first upgrade and leave ample space after it for more upgrades down the line. Here I choose sprite 16, drew a rocket and a few other upgrade illustration. Exhausts, magazines, shields, repair bots and turrets.

Next we create 2 global collections, one for the tracking over time, and one for the level up screen. This is relatievly simple process, just track what the selection hand is pointing at and increase the global collection that track what upgrades we have!

Link for code over here

And boom we have a working upgrade system! Now we only need to increase the drop random selection by one for each new upgrade we add! Handling them is not harded by any means, we have the colelcted numbers for each upgrade, if we have more than 0 then we execute code based on the current upgrade. For ex, rockets grant us target seeking rockets every 2 second! For each upgrade we spawn a new one!

After this only enemies remain, and in the last devlog I got heavily into that, these enemies are even simpler as they don’t have state machines, just velocities they move by.

Added quite few of them already, some just bullet fodder, some fight back for their life!

My plan is to have a few variations so you’ll have to build around what the game bring spawns, so created many variations (as of now only sprites) and let the code loose!

There are 3 main families, the Circles, the Triangles and the Squares. I hope I can give them their unique stats and abilites so no two colors from different families feel the same!

And of course we have to have effects so quickly threw in an explosion system to the game. Each enemy will use it’s own colors to poof out of existence.

Kinda wanted a game jam to submission and interact with so looked around. Started this project a few days ago and found the Devtober 2022 jam! I hope we’ll have a good time brainstorming around!

That is all I have today and if everything goes well I’ll post regular smaller updates.

Submitted

Devlog 2

Today was a bit of a lazier one, nothing really groundbreaking or such was added, only graphical enhancements.

First I was inspired by Warwind an open world shmuptroidvania with amazing art that relies on heavy outlines for it’s style. Looked into how to achieve such thing in TIC-80 and found a pretty easy solution.

You basically change all the colors in the memory for the choosen outline colors, draw your sprite 4 time, which is the shape of your sprite but all pixels colored as the outline, offest to the left-right up-down and you have a big blob, that contains all outlines. If you then reset the palette and draw the original sprite, you end up with a really cool outline effect!

After this I remembered, that Health is a crucial information in roguelikes for target priorization, so created a function to draw a health bar with custom colors, and just insert it above an enemy if it was hit in the last 3 seconds.

The last two little things I added is a dot particle after the missiles so they have a trail signaling their movement and a little shield indicator that shrinks accordingly how full your shields are.

Submitted

Devlog 3

This was a semi-active day, with mostly art added to the game. Created 6 more upgrade sprites, with currenly named: Anti-Matter Ammo, Improved Plating, Hologram Module, Explosive Rounds, Tesla Pylons, Bullet Defense.

With so many upgrades came the issue of solving them, so I had to order them in 2 columns. Not sure yet how will I handle them if there will be more than 2 colums of them, but that is a problem for future me.

After drawing them, I stared adding functionality to them. AMA grants you bonus damage, Improved Plating reduces it and explosive rounds grant your bullets AOE damage basically. They create circle shaped areas on hit, and cause damage to any enemy inside. This is somewhat optimised by a stupid code, that check a range before calculating heavier stuff. Here is the code explanation.

This also prompted me to create an invulerability frame system, so enemies can’t take damage in each frame, only after a certain number of frames have passed. This results in several ticks of damage inside the explosions instead of melting everything in a few frames.

Submitted

Devlog 4

Didn’t have much time for programming today, but managed something spicy in my opinion. I’ve used glitch like effects in multiple of my games as I’m quite fond of it, but all of those were applied to the whole screen.

In this game the Hologram Module update will grant you evasion chance, and i wanted to signal it with something along the line of a disturbed local hologram picture.

This of course requires some math, as you will need to convert your (x,y) screen position into the corresponding memory adresess. TIC-80 has it VRAM layout so the screen starts at th adress of 0x0000 resulting in 240x136 = 32,640 4-bit pixels. To convert into this, we take our x coordinate and add y*240 to it, to determine the index of the pixel we want. This then needs to be converted into a hexadecimal number, and now we have a memory addres we can poke().

After this the algorithm is fairly simple, generate a random start and end point on each y level of the sprite, and poke4 the memory adresses of those points with color 11. All this with 50% chance, for five frames after getting hit, and just replace the player ship draw call so we have this truly flashing effect!

Submitted (3 edits)

Devlog 5

Today was an interesting day to say the least. Feature wise the game expanded a bit by allowing enemies to shoot in on-off intervals. This really helps to dial the power level of the spiral enemies in the early game and the full spirals could be reserved for later enemies!

The other feature added is the Tesla Pylon! When you pick it up, it will grant you a small range auto attack against enemies that dare too close to you! It’s nothing complicated, a range check with my janky close enough function, and a super fast travelling bullet, that has no sprite. Instead we draw a line from the ship to the bullett position.

This in itself didn’t feel that great, so particles were added into the mix that really add to it!

And lastly I fully succumbed to late night coding madness and borrowed an idea from KATCH33. In the Shmup Showcase Event he showed us amazing idea of addig onomatopoeia (the words that describe sounds) to shots, deaths etc…

With a little tinkering in the system, I managed to quickly add it to the game and went mad with power adding it to a lot of things. My inner child can’t be happier, neither do I! I may need to add a toggle for those who wish to play without it, but that is easily achievable I hope!

Submitted

Devlog 6

I was pretty much quiet about the project for almost two weeks, but I have a fair reason for it. Started the project in TIC-80 but decided to swithc to Löve, still a lua engine but there aren’t any restrictions like in fantasy consoles. The past dozen days were spent by porting the game to the new API that Löve provides and getting everything back to where it was.

I recently merged all the old stuff written in the new and finally work can begin on new features! No time to rest, let’s add movement to our enemies!

The code behind this is basically the same idea used in Lina: Witches Of The Moon, enemies have certain movement pattern assigned to them and they move accordingly. I added a little flavour to them in the way of stopping enemies in the moment they shoot

For the game to have a releasable MVP I needed to have some scaling so it won’t become easy, a game loop and a better spawner function. Enter the Director. The director is a new object created that handles enemy spawning. It has certain credits it can spend, and every enemy and elite type has a cost attached to it. In the future the director could be further tweaked, to maybe always spawn the biggest thing, keep bigger pauses etc… The enemy span code now will try to spawn a random enemy with a random elite type, checks if the director has enough credits to spawn it and to if it can. This whole process will be tried 40 times before we give up on spawning a new enemy. Upon death now or enemies will replenish the director’s credit count with their respective cost and finally during gameplay we increase the allowance of the director to make the game harder over time.

The last thing implemented is the enemy elite type, more preciesly 3 of them. Flaming, Lightning and Freezing enemies are now in the game and all of them have a special attribute. Flaming enemies will leave a burning fire trail behind (the code is basically the Explosion effect we discussed in Devlog 3). Lightning enemies move and shoot twice as fast and Freezing enemies shoot slowing bullets! All of them have a little icon above their sprite, which is not final yet, but it is close to the effect I want.

Submitted

Devlog 7

Still on the road for a MVP (minimum viable product) for this projects and todays agenda was basically a better gameplay loop. Last time I implemented a really basic one, that just restarted the game as a whole, but let’s be real that isn’t really fun. So enter the state machine for the menu system!

The main menu is pretty simple, not sure how I will update it in the future, but for the moment I like it! Simple selection indication and menu points with the startfield background and the occasional straggler alien flying across the screen. In the background we basically have a gameMode variable that is set to different values based on where we are, menu, game, game over, credits etc… and in the code we have seperate update and draw functions of all of these that we switch between based upon the gameMode variable.

For the game over screen is started to tinker around with statistics I want to gather during gameplay that are worth showing in the end. Of course your gained upgrades are shown as well as a little feature that I really really like. The games saves which enemy kills you and shows it on the upper left corner!

But that is not all, as you return to the main menu, the same rascal enemy will fly away before giving space for other to arrive!

If you have any idea or wish for what statistics to count during gameplay, feel free to comment down below!

Submitted

Devlog 8

The last two days were slower in development, I’m trying to gather what I really want for the MVP/alpha release at the end of the Devtober2022 jam. A gameplay loop, playable gameplay and game feel are necesseary and I really do want to include some scaling and highscores so the game has replay values.

Last time we added the gameplay loop to the game, so this time we just refine it a tad and add proper scaling to the game, for which we need a better spawning system first. Enter the Director!

It’s not a really showy part of the code, basically we created a new configurable object, that assign weight values to every enemy and has a certain number of credits that it can spend on spawning enemies when it comes to it. It tries a few random combinations of enemy and elite pairing, checks if it has enough credit for it to spawn and creates the enemy. In the future the director could be further tweaked, to maybe always spawn the biggest thing, keep bigger pauses etc..

The other smaller change is the scaling, now enemies will have more HP and attack speed the later we are in the game, thanks to the directors difficulty scale!

Small changes to the frozen effect, the player now is tainted blue, giving off “brrr” text and is shaking while the frozen status is on from a freezing enemy.

And for last, we got a few new statistics to look at the end screen. The pilot style is calculated very simply yet, based on missed hits and most spent location on a screen area, but I hope in the future we can get more complex with it!

Submitted

Devlog 9 + Post Mortem

Quick update before jumping into the post-mortem! The last thing was to add a better gameplay loop experience with a highscore system and a better menu! For the Highscores I went with a retro type display, where you can select each letter one by one. The feature mostly is prominent in the yet not available binary exports, but runs fine in the build, although it will lose all points upon closing the game.

Post Mortem

This was the first Devtober for me, but definitely not the last! Really enjoyed the challenge and the community behind it and the daily/frequent devlogs will def stick with me. Let’s see where we are, and what we learned!

State of the project:

The game is at a good MVP place. All basic features work, there is replayability and plenty of room to expand. It’s enjoyable in my opinion and will get only better with some feedback and more time sinked in.

What went wrong?

Switching engine mid Devtober was a stupid idea and hindered the project quite substantially, but I don’t mind it in the end. Löve seems like a robust API to work with and the full open source nature of it will open up many possibilities to the project. Could we be further into features? Sure. There are still things that I wanted to put in the game, but either there is no good solution or there isn’t any that resembles the old TIC-80 version.

What went right?

Talking about the above, even though I lost 2 weeks porting the game, Löve opened many possibilities for it. The audio engineer/musician that always helps me out can join once again a game making journey. The community was also amazing, providing awesome feedback from more eyes than I could ever imagine the project reaching!

What’s next?

For the moment the project will go into a feedback gathering pause state, at least until I finish my “A Game By It’s Cover” entry, but possibly a bit more as the Christmas time will soon follow that deadline. Future updates are sure to come as I really enjoy the game and the idea itself, let’s hope others will agree on this sentiment!

Until then you can always follow what I’m up to on my Ko-fi page or on Twitter!