cowboy tower banner

cowboy tower

31 devlogs
76h 6m 28s

cowboy tower is an action platformer hwere you are cowboy!! you need to climb the tower and defeat bosses to reach the top!

theres bandits, lasso-swinging, horses, lasers, lava, wall climbing, monsters and mooooreeeeeeee!!!!!!!

made in Rust with Macroquad. (NO ai)

Repository

Loading README...

msw

Tagged your project as well cooked!

🔥 msw marked your project as well cooked! As a prize for your nicely cooked project, look out for a bonus prize in the mail :)

iris

Added level editing tool to fine-tune camera behaviour

I can now from the level editor adjust the camera’s offset! This is useful for sections in levels where you are moving up / down, and you need to see where you are going. This is done in the level editor with invisible special tiles, but that ive made visible for the devlog to explain.


The camera offsetting tiles utilise the special number tiles that i had created a long time ago for specifying enemies’ attack delays. I had purposefully made that number tile system modular to make future level editing tools like this easier to implement, which really payed off now :>

Attachment
3

Comments

Igelkott
Igelkott 20 days ago

That camera looks really good! I might take some… let’s say inspiration from it muhahahah

sl4shed
sl4shed 20 days ago

this is really cool, altho maybe you could replace this camera control system with something more automatic. i remember making a geometry dash clone where i just had like the camera try to have the player centered at all times but it was kinda smoothed, i think this is kinda like what you’re trying to accomplish here.
i just had like a buffer zone where the player could move and once the player touched a certain area in the top part of the screen the camera would slowly move up/down depending on where the player was

iris
iris 20 days ago

oh, sl4shed, that is exactly how it works, this is just an addition to that system! the camera already has a system that tries to center the player (with a buffer zone), but this system is only reactionary, and sometimes i need to proactively move the camera upwards by some offset, like when youre travelling upwards and i want the player to see where youre going

iris

New level + experimental bloom!

Created a new level focused heavily around wall climbing mechanics. This level, like the previous one I worked on, really sort of pushed the limits of the level engine, so I had to fix a lot of bugs to get it working properly, most regarding the level transition animation.


I also decided to try experimenting with screen-space effects like bloom! (it might be hard to see on the screenshot because of compression)

bloom showcase

I’m not sure how I want to use the effect so currently you can only enable it through a command-line argument. It is a bit overwhelming sometimes, and it cant actually know what is “bright”, and just goes off color, but this can have problems with non-bright white objects, like skeletons, appearing like theyre glowing which looks odd. I’m thinking it could fit in at the third world which is a bit dark and gloomy, but i’m also considering working on a system to only selectively apply bloom to specific objects, like lanterns and chandeliers.


I just really want the game to look polished, and I think experimenting with screen-space effects like bloom, color correction, vignette, etc, could be good ways to get that final bit of polish.

Attachment
1

Comments

Giovanni Nodal -  Hackclub ZRL Santa Meet and Greet Coordinator

digging the lighting. keep on working! this game has a whole lot of potential.

iris

New level and bug fixes

Added a new level utilising the new fog :)


Though i had to fix a lot of bugs for the new level, one thing was lasso hooks being placed next to an enemy path causing a crash on launch. Basically, the enemy path is an invisible part of the map that decides a path that some enemies can move along (like the bats). The problem however was that it thought the lasso target was an enemy and tried to set that enemy’s path.


The new level also needed a way for me to stop projectiles at a specific place, so i also made the projectile-barrier special tile. It also is an invisible special tile that only projectiles collide with.


I also worked on a system of sort of dynamic lighting but I had to stash those changes and will perhaps pick that up later.

Attachment
2

Comments

secretaditzu78
secretaditzu78 21 days ago

UUU coool!

iris
iris 21 days ago

tysm !

iris

Added spooky fog =)

Basically, when failing to add clouds to the background, i accidentally created fog and decided it looked really cool and made it so i can paint fog to levels!
I created this effect because i wanted to debug why the clouds werent behaving properly, and made it so the clouds rendered over everything else, and i turned up their density super high, and made them only have 2% opacity. This coincidentally looked a lot like fog. So the fog actually consists of these semi-transparent cloud textures, see the second attachment.


I think it looks really cool and fits into the spooky theme of the third world. (but im also open to suggestions!!!)


note: i still havent gotten clouds working lmao

Attachment
Attachment
2

Comments

Igelkott
Igelkott 22 days ago

Fits the theme wonderfully! Looks very intriguing and spooky!

secretaditzu78
secretaditzu78 21 days ago

Nice details!

iris

Added raycasts for lasso swinging

You can only perform a lasso swing now if you actually have a line of sight to the hook/target. Previously you could actually target a hook on the other side of a wall and swing from it which looked really buggy, though this only was a problem on one level that I know of. I implemented a simple raycast that solves this though!

Attachment
1

Comments

Igelkott
Igelkott 24 days ago

Cool !

iris

Made laso-swinging possible by holding the JUMP button while mid-air

Previously, you could only lasso with a dedicated lasso button. I’ve now added that you can hold jump again while mid-air to perform a swing. This feels a lot more natural on controller in my opinion.
I hope the attachment makes sense

Attachment
1

Comments

hack.clubber
hack.clubber 24 days ago

That’s super cool

iris

Added spawn region outside the tower

Now on the first level of the game, you actually spawn outside the tower in a little deserty environment. The entire rest of the game still takes place inside the tower but i just thought this would be a nice little touch !


It was kind of rough to add, seeing as a lot of code uses the horizontal boundaries of the level, for things like drawing the rest of the tower and for camera bounds and transitions, and this level would now need an exception to that, seeing as its boundaries are not the same as the tower’s.


I struggled a lot with the blend between the tower and the ground, and some minor details of how it should look, and im still not sure whether im happy with it yet or if im going to revisit it later, but i think it looks good enough for now.

Attachment
2

Comments

secretaditzu78
secretaditzu78 about 1 month ago

Uuu, Nice!

iris
iris about 1 month ago

thanks!

iris

Added controller/gamepad support!

I figured this game could work really well on a controller so decided I would try implementing support for it. Thankfully, finding a Rust crate that could handle interfacing with the hardware, wasnt particularly hard. The problem, however, was getting it to work. I could get it to work on local builds, but when compiling for web (which is how the game will be released), it wouldnt detect my controller.


This was odd as i know the JS gamepad api should be able to detect it. I dug into the plugin code for the crate, i.e. the part that interfaces with the browser, and realised it was skipping my controller, as it had a non-standard mapping. I simply removed this check and everything works great!


also how do you like my knockoff snes controller?

Attachment
2

Comments

sl4shed
sl4shed about 1 month ago

what do you use to build your game for the web with rust? i was wondering if something like emscripten exists for rust the other day

iris
iris about 1 month ago

rust can build for WASM natively, and the graphics library i use has full support for it! you just need a bit of boilerplate html and JS, then load the .wasm file !!

iris

Three levels + web support

This devlog I worked on three levels, one of them was new. I redesigned one of the first levels in the game, to have a unique theme! Previously, it had just reused some generic assets from the first world, but now it has a sort of old western bar theme with unique tiles. The two other levels were on the last world.


I also set up web builds! (see attachment 2). I’ve made web playable games with rust before so i expected it to be really straightforward, but I ran in to some issues, mostly because of the shader i had written for the sky, which had some incompatability issues.

Attachment
Attachment
2

Comments

secretaditzu78
secretaditzu78 about 1 month ago

looks cool but you should add shadows to objects

iris
iris about 1 month ago

oooo good idea ill try that later

iris

Wall Climbing!

I added wall climbing! Some surfaces on the third world are now marked with white and can be climbed on and jump from to perform a wall jump! I want each world to have unique appearences, enemies, and movement mechanics, and this is a movement mechanic unique to the third (and final) world.

I also drew a bunch of assets and whatnots!

Attachment
4

Comments

Igelkott
Igelkott about 1 month ago

Those paintings and candle holders look soooo good! And another fun movement mechanic? I’m, so excited to play this!

iris
iris about 1 month ago

yipee!! thanks!

secretaditzu78
secretaditzu78 about 1 month ago

woww, that is cool

iris
iris about 1 month ago

thanks !!!

iris

Made enemies fade out upon death as suggested by secretaditzu78! I’m not sure how well you can see it in the GIF, but i think it adds a bit of polish!


I kind of want to work on the sky again and add clouds! I also want the very first floor to be on the ground, and i imagine you wont actually spawn inside the tower, and rather outside it in a desert-y environment, and youll walk in to the first level. So i might work on this next!

Attachment
3

Comments

secretaditzu78
secretaditzu78 about 1 month ago

Woow! NICE

Igelkott
Igelkott about 1 month ago

That looks so good, love the skeletons!

iris
iris about 1 month ago

ty :D

iris

Previously enemy spawners only spawned based on player proximity, which made it impossible to sync several enemies spawning at once. Now I also added a new level design tool, the trigger-based-spawner! It allows me to draw a trigger zone, which when the player enters, will make enemies with spawners tied to that trigger spawn. The spawners and triggers are colour coded, so I can create different groups.

Attachment
0
iris

Created skeletons that arise from tombstones!


Previously, all enemies in the current level were immediately loaded, but now i can create enemies like these that dont “activate” until the player gets close enough.


Something I still have to do is to maybe add a way of syncing the spawning of multiple enemies? As you can see in the video, the three skeletons all start emerging at different points in time, as i move closer. I would need some way to sync multiple enemies to make them all trigger at once.

Attachment
2

Comments

secretaditzu78
secretaditzu78 about 1 month ago

Sick! Tip: use a goast effect when a skeleton dies, so it did not disappear like magic, it will make a difference. GL!

iris
iris about 1 month ago

oooo!! good idea! will try that out!

iris

I added a gradient for the sky! Instead of being a solid blue color, it instead gets darker the higher and higher you climb !!

The sky is now a GLSL shader, and i wrote a simple gradient function that allows me to enter arbitrary RGB steps. Making the shader took me quite a bit, but it was made easier by using shadertoy, which allowed me to see the changes in realtime. I also had to make sure the sky you see through windows also followed this gradient, previously the windows just had blue colored pixels.

I also drew more assets for the third world, mostly different furniture. I took some inspiration from old antique victorian era kind of furniture, as i want it to feel kind of old and creepy i guess?

I also added BLOOD that you die in!

Attachment
Attachment
0
iris

This devlog i worked on correcting player mistakes. I added:

  • Coyote Time
  • Jump buffering
  • Horse mount buffering

I realised that some levels were really infuriating because you had to perfectly time mounting a horse while in mid-air, and if you pressed space a few frames too early before being in range of the horse, it wouldnt work and you would die. I decided to add a few frames of leeway, such that mounting is instead active over a span of a few frames.
Following that, i decided to add the same thing for jumping. When you are just about to land, and want to immediately jump again as soon as you land, it can be really hard to time that second jump. Now, if you press space a few frames before landing, it will still issue that jump when you touch the ground.
I also added “coyote time”, which basically means that for a few frames after walking off a ledge, you can still jump. When you are trying to jump as long as possible, you’ll want to press space at the very last moment, and timing this can also be really frustrating and the jump is often failed, so this also adds a bit of parkouring leeway.

Attachment
1

Comments

Igelkott
Igelkott about 1 month ago

Sounds neat!

iris

Added a new enemy movement type that follows a predetermined path! In the attached gif you can see bats flying along two seperate paths. The green and red markings are obviously just debug information and wont be present in the actual game, but i think it illustrates pretty well how this works.


I made it so the level itself, on load, finds all these path-loops, and links all adjacent enemies to it. This is what took most of the time of the devlog. I also had to work out how to get the loops to always be stored in clockwise order, but thankfully it was easy enough.


You can see in the second attachment exactly how i create these in my level editor. I have a special layer for adding things like enemies, but now on that layer i can also paint these paths.


Next, i’m kind of interested in making the outside sky color change, the higher you get in the tower, and to add things like clouds perhaps?

Attachment
Attachment
0
iris

This devlog I worked on making each world somewhat visually distinct. Previously this was only done within the level design, while the exterior tower background and elevator design remained constant, but now these are all custom for each world :>


This actually took SOOO long to get working, see, when you move to the next level, the camera doesnt actually move up a floor, and rather the camera position stays pretty much at the same XY-coordinates relative to the current level. So what i needed to do is track what your actual “climb-height” is, i.e. how far up you have moved. This is so i can properly know what the color exterior of the tower should have at any given place. This also makes it possible for me to ex. make the sky get darker along a gradient, the higher you climb, or add clouds that get more frequent the further up you get.


I also drew some assets for the third world of the game! See the second attachment for what I have so far. I want this world to be a bit grim and maybe spooky?


Will work on enemies for this new world now!

Attachment
Attachment
2

Comments

Igelkott
Igelkott about 1 month ago

Pretty goddamn nice looking windows gotta say!

iris
iris about 1 month ago

thanks!

iris

Added badges that you get for defeating bosses! I think it looks pretty good and it gives some visual progress to the game :>

note: it currently shows three badge-slots though ive only made two bosses/worlds thus far, but i’m aiming to have at least three.

Attachment
2

Comments

Igelkott
Igelkott about 2 months ago

Badges look so clean imho!

iris
iris about 2 months ago

thanks igelkott!

iris

Added Fireking boss for the second world! He has two different attack phases, and he’s only damageable for one of them. I really liked the way he turned out and the arena itself. This boss fight is what the majority of the time of this devlog was spent on.


I also created two new levels for the second world itself, and made a system for setting a specific spawn and end position for a level. Previously the game itself just figured this out at runtime, but for many levels i want more control over this. Implementing it properly took quite a bit of time to do since ive hardcoded the old spawn point system at so many places in the codebase, but i think it works now.


I improved horses a bit too, making them easier to mount while upside down, and made the camera smoothly lerp to the new position when mounting, as opposed to the abrupt teleport which is how it was earlier.

Attachment
Attachment
1

Comments

mrsiuuuu_x1
mrsiuuuu_x1 about 2 months ago

Wow!

iris

I worked a lot on the visuals of the boss battle (see the second attachment), i made the dialogue UI smoothly glide in, and i added cinematic bars that appear during the boss fight. I also added dust effects when he lands. Other than that, i also added decorative piles of barrels, so when he throws barrels at the player, he is no longer just pullign them out of thin air.


I also improved the lasso visuals, made it connect to the actual ring, rather than the centre of it, and change the texture of the hook when the lasso connects, to show the lasso wrapped around it.


I also decided to sort levels in to different “worlds”. I dont really want to call it worlds as its all in a single tower, but they just correspond to different visual themes of levels with different relevant mechanics, like the second world has machinery, pipes and lava, and introduces the horse mechanic and lasers.
I want each world to end with a boss battle, and the boss i previously made is now the boss for the first world.


I also spent roughly 2 hours debugging some visual bugs that i only got on Windows. On my linux laptop which i have been developing the game thus far, everything looked good. But on this windows computer, there were flashing at the edges of some tiles, there was a gap between the player’s torso and legs, and pixels werent pixel-perfect. I havent really fixed the root of the issues, but at least i fixed the symptoms of it, so i think its fine?

Attachment
Attachment
1

Comments

Igelkott
Igelkott about 2 months ago

I think different worlds is a great idea! So when the player thinks there will never be anything close to as cool as the lasso, you hit them with the omnidirectional horse! And you have in that moment secured yourself a 30x modifier, good on you!

iris

Added a boss battle! The boss has two different attack phases, and you need to shoot him 16 times to kill him. He also has a line of dialogue that he says the first time you fight him. To add support for bosses, I chose to create a Boss trait in my Rust code. All bosses will implement this trait. The trait itself is really simple, just a single update function that receives mutable references to the entire game state.


The reason i chose to make it like this is because all bosses i want to add will have practically nothing in common with eachother, aside from perhaps a position property, but even thats debatable. By just having a trait, it means all bosses have their own struct, their own unique properties and their unique code. Them also having access to the entire game state means the entire boss fight itself can also be managed by the boss, things like raising barriers to trap the player on the arena, or showing particle effects. Everything about bosses is very flexible, is what i’m trying to say.


I spent a lot of the time on the animations itself, and i think he looks alright. A lot of the other time was also refactoring old enemy and projectile code. I also updated the laser beam animation and gave a minor visual overhaul to two levels.


Thats about it!

Attachment
3

Comments

btz
btz about 2 months ago

looks cool!

iris
iris about 2 months ago

thanks!

Igelkott
Igelkott about 2 months ago

This boss fight looks capital S aweSome! The boss look so good and all the moves look like they came out of professional made game! This game couldn’t have turned out cooler!

iris

Added transition between levels! Previously it would just cut to the new level which looked a bit abrupt, and there was no way for the player to realistically know that they had traveled up a floor by the elevator, as you just kind of teleported to another elevator.
This took quite some time to get working right and I had to restructure some code which is why this kind of minor feature took so long to implement. I also had to bother with drawing the entire previous level during the transition when both floors were visible at the same time.

Attachment
2

Comments

Igelkott
Igelkott about 2 months ago

Looks good!

iris
iris about 2 months ago

ty <3

iris

Added LASERS!! I can place laser cannons around the map that fire a laser ray every couple seconds. I think theyre really fun! I also added a new death animation for lasers (see video attachment 2). I also made a new system for my level editor where i can mark the delay of enemies (including laser cannons) which took a really long time to implement but now allows me finer control over enemy behaviour.


I also made horses omnidirectional (vid #3). They can be placed as such to climb walls, or even walk in the ceiling! I think thats really fun :>

I also made horses return to their spawn point after having being ridden, to prevent soft locks on some levels. I can however in my level editor mark a “no return” zone, where the horse will not return to its origin while the player is inside, because on some levels i’ll want them to stay by the player to for instance boost the player to a higher platform.


I also made a new level utilizing vertical horses and lasers, and as usual ill continue working on more levels!

Attachment
3

Comments

regonold520
regonold520 about 2 months ago

I really love the artstyle of this project

iris
iris about 2 months ago

tysm!! glad you like it

Igelkott
Igelkott about 2 months ago

Woah those animations look sick, my favorite is probably the laser death animation, so clean! And omnidirectional horses, sounds amazing for some vertical level design combined with those cool lasers, so excited to see where this goes!

iris

This devlog i added support for animated tiles which i used to create lava, a fun new way to die! I also added support for different death animations based on death cause ,which looks really good. I also added a new jump animation thats really silly and i love it!


I also added HORSES! Horses stand idle until the player mounts them, at which point they start running, uncontrollable by the player. They can walk on lava (OBVIOUSLY), and when you dismount a horse you also gain a bit of height which can be used to jump higher. Both of these aspects will be utilized in level design .


I’ll keep working on new levels next!

Attachment
2

Comments

Igelkott
Igelkott about 2 months ago

I may be a sucker for horses, but that my friend is one heck of a horse! I’m genuinely so excited to play this game and try out the horse and lasso mechanic, it looks so fun! Different animations for different death causes sounds quite fun as well, you gotta be careful so noone steals that…

iris
iris about 2 months ago

thanks a lot!!! if you steal my idea of different death animations based on death cause i will SUE!!! (i definetily didnt steal the idea of animated tiles from your last devlog (shh))

iris

I added a new enemy that throws dynamite which explodes in a ball of fire !! i really like the way it turned out, and adding this enemy forced me to rework the projectile system to make it a lot more flexible which means i have more flexibility in the future to add cool stuff!


I also changed the ways level progress, since at the end of a level, there is an elevator that takes you to the next floor of the tower, and previously you would always be reset to the left wall of the tower, but now i made it so the next level will always start at the side of the tower that the last level ended on. It’s somewhat hard to explain but i hope the picture makes more sense.

Next I reckon i’ll keep working on pumping out more levels.

Attachment
2

Comments

Igelkott
Igelkott about 2 months ago

Woah that dynamite thrower and explosion looks sick! Really impressive the way you manage to stick to the artstyle!

iris
iris about 2 months ago

thanks !!

iris

This devlog ive worked on levels! I first and foremost added an elevator at the end of every level that takes you to the next level. I also added spikes which kill you, as well as a new bandit (that also does kill you).
I’ve also decorated the levels a fair bit, added windows and chandeliers and more props. I also added tooltips to the first level that show you the controls, like LMB to shoot and RMB to lasso swing.

Attachment
1

Comments

Igelkott
Igelkott about 2 months ago

Woah all that in 3 hours! Love the chaindelier!

iris

Added swinging with a lasso! I can now place hooks like the one you see in the attachment below that the player can swing from. The most of the time of this devlog was spent on the physics for the swinging and the exact implementation details of how it should work, making it easier to use and more arcade-like rather than perfectly realistic.
I also added dying and restarting the current level when you die.
Next I think I’ll work on creating actual levels! Maybe adding more enemies, too

Attachment
2

Comments

Igelkott
Igelkott about 2 months ago

What a fun mechanic! The implementation looks so smooth as well, well done! Looking forward to seeing what awesome levels you can come up with utilizing this!

iris
iris about 2 months ago

thanks thats so nice!! I’m glad you think the implementation looks good, as the bulk of the time spent was just adjusting the physics back and forth to make it smooth. thanks mr igelkott!

iris

Added enemies and firing projectiles! The enemies cant currently fight back and just randomly move left and right. I made the player animation be split in to two animations, one for the torso and one for the legs. This makes it possible to show ex. a shooting animation independently of the legs’ animation.
Will work on making enemies shoot back at you!

Attachment
0
iris

Added player and physics! I could reuse the physics calculation code from old projects, otherwise this wouldve taken like five hours. In Tiled, the tilemap editor I use, i have one specific layer be the “collision” layer, which is the one that the player collides with. The rest are just background or details.
Since this is supposed to be a tower, I made it draw the sides of the building at the horizontal edges of the level, and draw a solid dark color above and below it, which is supposed to be the outside of the building / other floors of the tower.
Anyways, will work on maybe adding enemies or more complex levels next?

Attachment
0
iris

Ive set up level loading from Tiled! Tiled is a tilemap editor software, and ive now added support to load their fileformat to level data in my project. The entire level is also statically rendered to a texture, so when i draw the level each frame, rather than drawing each tile individually, it just draws the rendered texture.
Will work on player (movement) next!

Attachment
0
iris

Initial commit! I set up the bare minimum for loading assets and rendering a little character to the screen! I am using RUST with macroquad as my game engine, ive used it a lot before and i reallllyyyy like it!! The assets i actually load directly from aseprite project files, this is something i learnt some time ago, and it saves SO MUCH time! I can even directly reference specific animation tags! I have learnt alot from my previous games and this is one of the most useful things i started implementing for all my games.

The game will be an action platformer with a cowboy theme or something. thanks for reading <3

Attachment
0