Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

Little Spy - DevLog, Postmortem, Download & Source Code

A topic by Martin Wimpress created Jun 28, 2021 Views: 857 Replies: 19
Viewing posts 1 to 20
Submitted (11 edits) (+5)

Little Spy

Available on Itch.io

Little Spy is available for Linux šŸ§ Windows šŸŖŸ and HTML5 on Itch.io

Plot

Airdrop into an enemy stronghold, find and recover the stolen intelligence and technology.

Objective

Collect as much stolen intelligence and technology as you can and get to the extraction point before the helicopter leaves without you. Earn a higher agent ranking by collecting more items and complete the mission as fast as possible to earn a higher bonus.

Game Mechanics

  • Little Spy can run and jump. Holding jump extends the jump height.

  • Little Spy is a climber. They can grab walls and slide down them, jump climb up them or wall jump away from them.

  • Like all the best spies, Little Spy has a gadget; a parachute that can stow and deploy itself.

  • Little Spy has a killer flying kick, which can be used to dash, attack enemies or double jump.

  • Little Spy can use all of these skills in combination.

The enemies

Enemies can be stomped or kicked:

  • Guards (no helmet) require 1 hit to kill.
  • Soldiers (helmets) require 2 hits to kill.

Enemies have teleport technology and new recruits will teleport into the game to replace their fallen comrades.

Controls

Little Spy should work with most game controllers. Game control instructions are presented on the main menu of the game.

  • A/D, Cursor Left/Right, D-pad or Left Stick to move.
  • W, Cursor Up, A to jump.
  • S, Cursor Down, Y to deploy/stow parachute
  • Space or B to flying kick.

My First Game Jam: Summer 2021

Little Spy is my entry in the My First Game Jam: Summer 2021.

The theme for the jam was āœØFreeāœØ. My interpretation of the theme is to create a game using only tools that are free software, free of cost, or game assets that are free or in the public domain.

In keeping with the Free theme, I have released the game project and code under an MIT license.

Tools

I used these excellent tools to make the game.

Credits

A big ā€œThank you!ā€ to everyone below who makes their art šŸ–Œ music šŸŽ¶ or sounds šŸ”Š freely available for others to build on. Little Spy would have been shapes and silence had it not been for these fine people:

I published a collection on OpenGameArt.org that includes everything I used from OGA.

Screen Shots

Main Screen Main Screen

Level01 Level 01 - ā€œJust Jumpingā€

Level02 Level 02 - ā€œOne Item Requiredā€

Level03 Level 03 - ā€œDo the Stomp!ā€

Level04 Level 04 - ā€œFloaty McFloat Faceā€

Submitted (2 edits) (+1)

Day 1

I have a character that I can control via keyboard. Physics and terrain detection/collision working. I have dumb, but animated, enemies and 2 small testing levels that use TileMaps. The scenery is layered, some tiles have colliders while others are just decoration.

Submitted (1 edit) (+1)

Day 2

Added a camera that tracks the main character movement. Added a kill mechanic for the enemies and the player has a death condition. Enemies can respawn, the respawn examples I found were overly complicated. I found a very simple solution. Using Autoload/Singleton to track essential player metrics.

Made the game menus and an overlay for the in-game info, score etc. Figured out themes for creating a consistent style to apply, only went as far as font theming. Learned that the AnimationPlayer node is amazing and used it to animate existing graphics via its keyframe system. Iā€™ve only scratched the surface, but this seems like a very powerful tool and eradicates lots of coding for special effects etc. Added in-game music.

Oh, and ā€œFilterā€ when importing any 2D tile/sprite set should absolutely be disabled otherwise you get rendering artefacts.

Submitted(+1)

Day 3

Wrote almost zero code, used the Godot UI loads. Made 80% of my first level using TileMaps/Sets, which made me realise you can set grid size/snapping per scene and this had a bunch of knock-on benefits.

  • Improved how my level backgrounds are rendered.
  • Lead me to properly understand how Camera2D works and camera tracking of my player is much improved.
  • Also realised I made a fundamental mistake by aligning my sprites to the y floor. So recentered all my sprites around 0,0 origin and reshaped hitboxes to make collision detection more accurate.
Submitted

Day 4

Completed Level01 design, itā€™s a fully playable level. Spent more time in AnimationPlayer, I love this tool. Also using AnimationPlayer for some sound effects in the game. Love that sound effects, animations and level design are all zero code. Favourite new feature is enabling sync scene/script changes in the debugger so you can play your game and edit levels or change settings live, itā€™s a huge time saver.

Added lots of sounds, either via code or AnimationPlayer. Game is much more engaging with noises. Making use of co-routines to defer execution in some functions. Discovered an ace animation technique completely by accident when I disabled game physics for the character collision layer. Like it so much, Iā€™ve kept and made it not accidental. Improved the in game UI overlay to display game status/progress. Added raycasting to actors so they can observe their surroundings and make (very) simple decisions.

Submitted(+1)

Day 5

Refactored input handling, much simpler now and controllers work properly as a result. Folded common code from Player and NPCs into the base Actor class which enabled me to quickly add NPC variants with different attributes. All animation events are triggered in the base Actor class now; trying hard to keep it DRY. Added more music and sound effects. Tweaked Level01 to include multiple variants of NPC.

One of the fonts I was using is not fully free, so swapped it out and retouched all menus and overlay UI. Tested exporting the game. Seem to run fine on Linux, Windows and web via Itch.io.

Submitted(+1)

Day 6

I spent way too much time making the animations run when the game is first loaded. Tightened up input handling by moving all input processing to a single function, rather than across three functions. Implemented jump buffering and coyote time. Softened velocity when jump-cutting and added subtle acceleration/deceleration when running. Added detection of landings which results in character sprite compression, dust animation and sound.

Completely refactored the Actor base class and the Player and Enemy classes that inherit from it. Much clearer organisation and will be easier to maintain and extend.

(+1)

Can't wait to play it!

Submitted(+1)

Day 7

Add dashing and wall jumping to the player. Dashing is presented as a flying kick and also doubles up as an attack mechanic. I wanted to get the main character controls/mechanics finalised before I start making levels.

Submitted(+1)

Day 8

Enemies spawn, and respawn on death, into the game after a random delay. Once an enemy is active, theyā€™ll be processed even when off-screen to keep things consistent. Made enemies faster. Tweaked player collision detection to be more fair, so as not to incur double hits. Fixed wall jumping so that you canā€™t wall slide into ground connected walls. The player can now deploy a parachute if falling, limited to 3 per level. Added level count down timer. Added collectable power-ups for health and parachutes.

Submitted

Day 9

Fixed camera judder by lerping the camera to the player position. Added more blocks and scenery to the tile maps. Added alarm sounds at 60 second intervals and throughout the last 30 seconds of the game timer. Add sounds for kicks, hits and impacts. Fix sound effect volumes by using AudioStreamPlayer for everything, Iā€™d managed to randomly use AudioStreamPlayer2D for some sound effects. Tweaked player friction when airborne, steering the parachute feels suitably ā€œfloatyā€ and jumps have a little more reach.

Submitted (1 edit) (+1)

Day 10

Made Actor CollisionShape a capsule so if you stray too near a cliff edge, you will slide off. Optimised animate_actor() to call only animate.play() when the animation has changed. Tweaked the player friction when jumping. Fixed parachute sounds continuing to play when chutes have been stowed.

Moved game timer code to the UI which now updates the PlayerData singleton. Added toggle fullscreen via F11 and cycle window resolution via F10. Added control instructions to the main menu. Added sounds for health and parachute power-ups. Replaced the clock spite in the game HUD with a lift icon.

Added camera shake effects for hits and damage and sprite echoes (ghost) when doing the flying kick. Changed some of the collectable item sprites so they stand out more clearly. Enemies spawn a bit quicker and impact on kicked enemies is higher, making it possible to push them off ledges.

Submitted

Day 11

Player can carry over health and parachutes earned in previous levels or starts a level with a minimum of 3 for each. Reviewed the sounds and changed/updated several so they have more presence. Refactored PowerUps to share common code. Added additional properties to PlayerData singleton for tracking player metrics. Enemies make a teleport sound when spawning into the game and are passive for 1 second after spawning and canā€™t inflict damage during this time.

It is now possible to ā€œcompleteā€ a level with just one item collected. Added start of level overlay and end of level status, including timer bonus, percentage completed, a 00 agent ranking and a medal.

Created two template levels (with scripts) furnished with the raw ingredients to make new levels. Added more blocks and scenery to the tilesets. Created a new tileset for hazards and added detection of collisions between tiles in the ā€œdangerā€ group and the player.

Submitted

Day 12

Made random spawn timer actually random. Improved the main menu and UI navigation when using a controller. Tried, but failed, to get enemies colliding with hazards.

Submitted

Day 13

Hide fullscreen and window size options on the main menu when running the HTML5 version. Created 4 new levels and each level has a name. Prevent the player from incurring more damage if already in shock and allow the player to control lateral movement while shocked. Add more friction when landing on platforms. Fixed a bug causing multiple enemies to spawn when one dies. Enemies stow their parachutes if attacked while parachuting. Player health and chutes are not reset to 3 at the start of each level.

Completely reimplemented wall jumping based on testing feedback. The player can now:

  • Wall Climb (jump to the wall, push into it and jump)
  • Wall Push (jump away from the wall you are sliding down)
  • Wall hop (jump while sliding to hop up, you guide the direction)
Submitted

Day 14

Made Levels 05 and 06, level 06 is the repurposed the original level 01. Tweaked levels 01 to 04. Fixed kicking animation persisting when you get in the helicopter. Fixed player unfairly taking damage when kicking enemies. Removed the parachute sounds, they are distracting rather than helpful. Wrote up a landing page for Itch.io and GitHub.

Submitted (5 edits)

Last Day:

All based on playtesting feedback:

v1.0.1

  • Fix agent rankings below zero.
  • Fix being able to jump after entering the helicopter.
  • Fix jump counter decrements.
  • Prevent players from escaping the boundaries of level 4.
  • Prevent players from activating parachutes on the main screen.
  • Tweak levels 04, 05 and 06.

v1.0.2

  • Disable controller B button to quit on HTML5, otherwise it crashed the in-browser game.
  • Added retry level option. Essential player stats recorded at the start of a level so level retries are accurate.

v1.0.3

  • Fixed retry, so you donā€™t accidentally quit to the main menu.
Submitted (10 edits)

Postmortem

This was my first game jam šŸ™‚ And, the first game Iā€™ve written since the 1980s. My interest in writing games has been rekindled as a result of participating in some coding challenges with friends.

Engine

I met Hein-Pieter v Braam (Godot Developer) at a hack fest I organised a couple of years ago, and ever since Iā€™ve been meaning to learn Godot. Iā€™m a Linux user/developer. Godot is well supported on Linux and I had already started learning Godot about 10 days prior to the jam.

Godot - What worked well?

Iā€™ve loved using Godot. Thereā€™s plenty of room for frustration to overflow into rage while learning something new under time pressure, but Iā€™ve not experienced that. Godot has been a joy to use, the documentation is high quality and there is plenty of reference material, Q&As and tutorials to guide you. I am absolutely going to continue using Godot for future projects as it has plenty more capability for me to learn.

  • The IDE - Particularly the code editor.
  • Exporting to HTML5 - Godot made it very easy for me to target the web
  • AnimationPlayer - Zero code animations and effects.
  • GDScript - Iā€™ve done a fair amount of Python development and immediately felt comfortable with GDScript.
  • Debugger - Syncing scene and script changes into a running game accelerated iterating and level design.
  • Controller support - Adding wide compatibility for controllers was very low effort, and controllers work in the HTML5 export.

Godot - What would I do differently?

  • TileMaps and TileSets - I am pretty sure Iā€™m doing it wrong. I need to go and learn more on this topic.
  • UI - I need learn how to UI with Godot. I kept hitting the limits of my understanding in this area, so my UI is very basic.
  • Game timer - I used a Timer() for the game time limit, which was fiddly to pause when the game was paused. Next time Iā€™d used the built-in frame delta to craft my own level timer.
  • Godot asset library - Iā€™d explore this more deeply to see what is already out there to save some time.

Genre

Advice in the Godot community often recommends that platformers are a good first game to make when learning Godot. I like platformers.

Platformer - What worked well?

  • Safe choice - Lots of examples to work from.
  • Tight controls - Adding jump buffering, coyote time and other player bias was fun and an opportunity to learn more about Godot physics, features and GDScript.
  • Players and Enemies are very similar - Lots of code/scene reuse meant less work.

Platformer - What would I do differently?

  • Hazard collision detection - Found a great solution for the player colliding with tiles that are hazards by putting them in a group called ā€œdangerā€. Could not get the enemies (derived from the same base class) to detect hazards in the same way. See my earlier point about TileMaps/TileSets.
  • Clamping the player - Iā€™d put the player in a bounding area early in the game design. I didnā€™t, so ended up having to create completely enclosed (inescapable) levels.

Graphics

The jam theme was ā€œFreeā€ and I decided to use only free software and assets to make the game fit that theme.

Graphics - What worked well?

  • Classic Hero - The small 16x16 characters had loads of poses and actions, which directly inspired game mechanics, such as:
    • Shock/Stunned inspired the Mario-esque enemy stomping
    • Parachuting to enter the game
    • Flying Kick to dash and attack
  • Animated sprites - Very easy to work with using Godot and adds some polish.
  • Pixel-art - Choosing pixel-art made it easier to find assets that fit well together and rescaling them to match was easy.
  • Juice - Adding lerped camera tracking, camera shake and sprite echoes when dashing was some nice visual polish and a great way to learn more about Godot.

Graphics - What would I do differently?

  • Itch.io Game Assets - OGA was great for finding CC0 assets but has a limited selection. Iā€™d absolutely start my asset hunt on Itch in the future, which has a vast array of options.
  • Assets first - Do asset discovery and decide what graphics Iā€™m going to use before the jam starts, as this helps inform game scope and mechanics.
  • Moar juice - Learn particles and shaders to add visual impact and polish.

Audio

I am a lapsed musician. I rarely make music now and certainly wouldnā€™t have time to make music and sound effects during a jam. As with the graphics, I found all my audio assets on OGA.

Audio - What worked well?

  • AudioStreamPlayer - Is easy for basic playback of music and sounds.
  • Co-routines - A common pattern in Godot is to create an adhoc timer co-routine to ensure playback finishes before moving to the next instruction in a method. I used this a lot, not just for audio.

Audio - What would I do differently?

  • Music autoload - Create an autoload/singleton for music playback so I can cross-fade between scenes etc.
  • Sound effects autoload - Maybe create an autoload/singleton for all game sound effects to make it easier to trigger sounds from different scenes. I have some ā€œplayerā€ sounds in the Item scenes for example, which got a bit fiddly to work with.

The Jam

On the whole, I am very happy with how the jam went. I made a mini-game, Itch.io page and learned loads about Godot in the process. I managed to (mostly) resist the urge to try and cram in unnecessary features and submitted the game a day ahead of the deadline. I got a decent amount of feedback and have some ideas about what Iā€™d do to improve as a result.

The Jam - What worked well?

  • Long time frame - 2 weeks isnā€™t loads, but choosing a jam with a decent time allocation made this fun and not stressful. I donā€™t ever see myself entering short jams in the future and will stick to longer running events.
  • Pre-existing assets - I am not an artist and donā€™t have the time available to make music. Using pre-existing assets was a massive time saver and meant I could focus on the game itself.
  • Daily Devlog - Writing a daily devlog, no matter how short, helped keep me focused on making some daily progress.
  • Community interaction - Using Discord and forums to post updates and request feedback.
  • Paused all other hobbies - I paused all my interests and hobbies for the duration of the jam. If I had spare time outside of work and family, I was working on Little Spy. Even when I was cooking, I was watching videos about Godot or game design.
  • HTML5 - Going into the jam, I had no interest in making an HTML5 version of the game. But, the Itch stats show this is the most popular version, and Iā€™m guessing, why I got a decent amount of feedback. Iā€™ll be making sure HTML5 is a target for future projects since itā€™s remarkably low effort.
  • Postmortem - Writing this postmortem has been a very helpful retrospective and Iā€™ve identified actionable things Iā€™d do differently next time to improve.

The Jam - What would I do differently?

  • Plan a jam - Iā€™d look at the jam calendar to find an upcoming jam and start planning/scoping a game before the jam starts.
  • State machine - Iā€™d use a state machine next time. Little Spy is a simple game but the compound conditionals scattered about the place is borderline unmaintainable spaghetti code. If I come back to the project months from now, I think Iā€™ll have a hard time following some of the logic.
  • Streaming - I already live stream, but in the future, Iā€™d stream more of the game development to get feedback and ideas early.
  • Playtesting - I was too cautious about sharing a rough/early version of the game with friends for playtest feedback. Iā€™d do this much earlier so I can make improvements and adjustments sooner. I had a late Friday night completely re-implementing the playerā€™s movement mechanics 2 days before the deadline.
  • Game Page - Make a game page, including art and basic pitch/instructions very early.
  • Level design - Make smaller levels, but more of them. I started by making two large levels, one took most of a Saturday and the other didnā€™t make the final game.
  • Judgement - I might be interested in participating in a jam where submissions are scored/judged. The reciprocal feedback of My First Game Jam is nice, but often not objective. If I want to improve, I might need a cold dose of objective critique ;-)

Will add post-jam

Now I have a ā€œgameā€, there are a few things Iā€™d like to add in order to learn more about Godot.

  • Toggle Music - Got to the point I just wanted to have Spotify playing while testing.
  • Save/restore options - Save state for resolution/fullscreen and music on/off so I can learn how store user data in Godot
  • [DONE] Android build - To learn the process
  • [DONE] On-screen controls -
    • [DONE] Android
    • [DONE] HTML5.
  • [DONE] Snap - Snapcraft is the app store for Linux - Not many games there.

Might add post-jam

  • Player physics - Currently good, but not great. Iā€™d like to have a nice reference implementation for future projects.
  • [DONE] Improve collision detection - Make left/right player hitboxes so collisions are fairer.
  • Windows UWP build - Just to learn the process.
  • [DONE] macOS build - Just to learn the process.

What didnā€™t make the cut

Hereā€™s what I had on my TODO list for Little Spy that didnā€™t get included.

  • Player:
    • Swimming
    • Punching
    • Ducking
  • Enemies:
    • Armed Soldier who fires bullets at the player
    • Ninja and Samurai enemies
    • Simple enemy AI to chase the player
    • Health bar on enemies to show how many hits remain to kill them
    • Donā€™t let enemies get stuck on small islands endlessly looping
    • Gun turrets
  • Platforms:
    • Moving platforms
    • Trampoline/springs
    • One-way platforms
  • Game UI
    • Animate power-ups as they are collected
    • Health, items collected and timer animations in the game HUD
    • Credits screen
  • Levels
    • More of them with a more ā€œpuzzleā€ style
Submitted

v1.0.4

Little Spy v1.0.4 is a collection of bug fixes and also adds some release tooling to make it easier for me to upload new versions to Itch.io.

  • Fix multiple enemies spawning on death.
  • Correctly initialise enemies when starting a new level or retrying the existing level.
  • Change the player starting position in Level01.
  • Hide the Quit button in the HTML5 version.
  • Add a splash screen to desktop versions.
  • Add a new autoload/singleton for project constants.
Submitted

v1.0.5

Little Spy v1.0.5 fixes a few platform specific bugs and also debuts support for macOS šŸ and Android šŸ¤–

  • Tweak the helicopter entry area, so it is easier to jump over the helicopter.
  • Tweak collision areas when stomping enemies to favour the player.
  • Fix rendering quality degradation on HTML5.
  • Donā€™t show Quit on the End Screen for the HTML5 version.
  • Enable on screen controls for touch devices, including HTML5 clients with touch screens.
  • Add macOS support.
  • Add Android support.