Shoot'em up Witch game | PICO-8 GameDev
Tags: gamedev, lua, showdev
Published: 2022-08-26 07:40:00

> This article was taken from my Ko-Fi page, where you check more of my stuff! If you like what I do, you can support me with a price of a single coffee!
[![ko-fi](https://www.ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/L4L81GBPX)

# The Backstory

Back from a bit of a break I'm bringing you a whole new game, which supposedly will be finished in 2-3 weeks!

If you are following the PICO-8 world you should be already aware of [LazyDev's channel and his amazing shmup game tutorial series](https://www.youtube.com/playlist?list=PLea8cjCua_P3Sfq4XJqNVbd1vsWnh7LZd). Since I've been always interested in those games I always wanted to make one myself, so here is the opportunity. [A showcase "jam" event](https://itch.io/jam/basic-shmup) was also announced for the series so we can hit two birds with one stone! Let me show you what I've been working on!



# Shmups

A "shoot 'em up", also known as a "shmup" is a game in which the you fight against a large number of enemies by shooting at them while dodging their fire and movement. You fight either waves or an endlessy scrolling battlefield and fight bosses with various attack patterns.


![Galaga](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1v6f082rpq8m8ejxgg0q.jpg)

Galaga, a NES smup game, is the most commonly known smup game from the NES era, and most games to this day mostly follow the above said patterns.

Sligth variation in the genre is the way of movement for example Gradius followed the path of moving to the right. This game is particularly close to my heart as I played a ton of it back in the days, so I went with this way of base movement.



![Gradius](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mbqyozv0ypygv80iydnj.png)


# The project basics

I wanted a cute witch game for a while but never really found a great opportunity to make one, because of this as soon as the idea of the project popped up, i went with the witch theme!


![the beginning](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3ab1ou7v6pe2p1397ds4.gif)

A quick demo was quicky assembled to see if i like the general aesthetic and I was quite pleased how it looked so went town on the basics! Drew some sprites, implemented the explosion in my way from the tutorial series and made the first dummy wave to check if eveything works!


![Demo enemies in](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/u93j2mio0hhmx5uyafkj.gif)

The shooting flash on your hands, the light blue bullets and the blue explosions flying off and fading aways quickly created an amazing game feel and helped me to crunch through the first day of implementing more enemies and features! The flash is simply a sprite which we draw upon our character for a short time after shooting, the explosions are a bit more complicated code on them: 
[HERE](https://gist.github.com/Achie72/807a01f56242747e78f8779537c30159)



# Enemies striking back

There is one thing really missing (other than enemy variety) is them attacking you!


![Combat basics](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/43vjiz7s3ag56b6c0jvj.gif)

The attacks are based on a Mission system, where each enemy has a mission to fulfill and follow. The tutorial series has an amazing video explaining it in more depths [here](https://www.youtube.com/watch?v=0UoE_rUl1qc), but the gist of it is we have mission like "flyin" and "attack" and cycle those with timers. After that we can define a unique movement for each enemy. Notice how bats only move forwards while the pesky crows are trying to snipe you from their position sharply turing on you! [Here](https://gist.github.com/Achie72/d672da5ecd047c81883ef07d7c3b77c6) is a rundown on my attack patterns so far.

The only thing we are missing is the enemy projectiles so let's add them to the game! Nothing fancy, bullets have an (sx,sy) vector for their movement speed and they move accordingly. Enemies then are either choosen at their "protect" stationary phase to shoot at you or they have an attack phase that does so. (Ignore the cat in the corner and the blue heart for now)



Now we have the basics down, so how about we create our first boss! 

But what enemy could serve as our equal foe? 

Another witch of course who went mad for some yet unknown reason! 

**Prepare for a witch battle!**


![Witch duel](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dedb02hwsfe5g215hruw.gif)



# Power-ups!

What is a Shooter game without power ups?


![Power-ups](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/yrai8csx2bauk65l9t27.gif)

Of course they won't spawn this frequent, I just wanted to make a cool looking gif for you. We have shields, we have potions, multiple fire types and the screen swiping cat bomb!

As of know the cat bomb doesn't really work the way i want it, but the showcase lasts a month and I wanted a quick powerfull effect in the game!

With the shields I'm quite happy. Alongside their blue circle break effect and the pink puffs when you take damage the game let's you know of danger with style.

Also for the time being there is no weight system added to pickups, so eveything drops with equal chance. That will surely have to change as cat bombs will be far too powerful to drop so frequent.



# What is left?

Actually a lot. While the wave system is complete i don't have that many crafted. More enemies and bosses should also be and lastly sound effects and music.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/yhu74bs3yy1aosdger1s.gif)

Sounds are in the game, but they are all made by me. Asked for a talented friend of mine BeforeYouCloseYourMind ([Soundcloud](https://soundcloud.com/beforeyoucloseyourmind), [Bandcamp](https://beforeyoucloseyourmind.bandcamp.com/)) for some help, if time allows he will help with the project!



For the end, there is an idea of mine to restructure how bosses work, which may lead to a 2 day journey down the code, reworking things but I think it will for the better on the long run!



![Ko-fi supporters](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nikg8u21ga5bgj90v03c.png)


**Big thank you to Csöndi and Sztrovacsek, for supporting my work!**



> _Wanna see your name here? See more frequent updates? Longer PicoShorts? Or you just like what i do? Consider supporting my work with even the price of a single coffee, and if you can please share my work, so more people can enjoy the magical world of PICO-8._


**Other social sites:**
🐦 [Twitter](https://twitter.com/Achie7240)
📷 [Instagram](https://www.instagram.com/justanerdlife/)
🎥 [Twitch](https://www.twitch.tv/achie7240)
🎬 [YouTube](https://www.youtube.com/channel/UCzWXrvo-Pj7_KDv4w4q-4Kg)


**Games and devlogs i made:**
⌨️ [GitHub repos](https://github.com/Achie72)
🎮 [Itch.io](https://achie.itch.io/)
🕹️ [Newgrounds](https://achie72.newgrounds.com/)