You are browsing as a guest. Sign up (or log in) to start making projects!

Addictive Mobile Game

  • 3 Devlogs
  • 18 Total hours

A mobile game

Open comments for this post

11h 4m 42s logged

Devlog 3: Polished up Reload system and added new sceneries

Another update with the game, things are really starting to come together with the game feel and world design

Here’s what I made so far:

Polished UI and Reload animations:

  • Reorganised weapon inventory. Made it into a clean, compact panel so it doesn’t block gameplay view
  • Animated a reload bar underneath the weapons that fill up according to the reload time set in the dictionary. (See previous devlog on how) using a simple tween function
  • Weapon swapping. Updated the knife so the character whips out the knife and slashes the zombies before swapping back to their equipped gun. Similar to Call of Duty.

World Design Landmarks

  • Expanded the map with new sceneries, chunks, buildings to make the map/game more exciting. I aim to do something like where I make a make several chunks, 16 by 16 using tilemaps and Sprite2Ds to make different zones.

I am yet to figure out how to stitch the chunks together.

Enemy and Wave system

  • I just made fairly basic enemy AI that follows the player and added an Avoidance area so the zombies don’t pile up or follow the player in a line.
  • Made a wave system that increases in difficulty as you survive longer and longer.

This is the difficulty logic

enemies_left_to_spawn = 5 + (current_wave + 2)
spawn_cooldown = max(0.4, 1.5-(current_wave * 0.1))

We have a base amount of 5 plus the extra enemies + 2 and the extended time it take to spawn zombies making each wave slightly longer than the previous one.

Possible Issues

#Imperfect spawning of zombies
One thing I am noticing, is that some of the zombies are spawning inside of the bushes and are just stuck there, the player can’t shoot the zombie because of collision layers and the game is ‘hardstuck’ I am yet to work on how to fix it

Bullets not firing?

Something also that I’ve have noticed consistently is that the bullets sometimes not fire that well, it appears that they might be hitting the player and not spawning? I have been scratching my head on this bug for a while, any suggestions will be GREAT!

What’s next?

  • Making Player health system
  • Loot System
  • Making many more chunks and stitching them together
  • Upgrades???

Have a look at the screenshots and comment down below what you think the following structures look like! (This feedback will be very helpful! I’ll tell the answers in the next devlog!)

0
0
4
Open comments for this post

5h 33m 5s logged

DEVLOG 2: Added New weapons and reload system

Just made a new shotgun and a machine gun and a melee weapon to go with the original pistol.

However, this was not the smoothest journey…


Fixing the 360-Degree Aim Bug

The biggest headache was a bug where the shooting worked perfectly in the bottom-left quadrant of the screen but went completely wild in the other three. It turned out to be an issue with local versus global coordinates when mixing the player node’s position and the muzzle position. I fixed it by bypassing the muzzle’s relative math entirely and calculating the trajectory straight from the player’s core global position. Now aiming and shooting are perfectly consistent all 360 degrees around the player.


Reloading States and Auto-Reload

I wired up the static reload sprites so they actually show up visually. The issue before was that the sprite swap was happening after the timer finished, so it never showed up. Now it swaps to the reload frame instantly when you press R, and then swaps back to the normal shooting frame when the timer finishes. I also made it so that the second your mag drops to zero, it calls the reload function automatically without making you click an extra time.

here is how I made the different gun types

enum GunType { PISTOL, SHOTGUN, MACHINE_GUN, KNIFE}


var gun_stats = {
	GunType.PISTOL: {"current_ammo": 7, "ammo_max": 7, "reload_time": 1.0, "spread": 0, "projectiles": 1, "is_automatic": false, "is_melee": false},
	GunType.SHOTGUN: {"current_ammo": 2, "ammo_max": 2, "reload_time": 2.0, "spread": 0.22, "projectiles": 5, "is_automatic": false, "is_melee": false},
	GunType.KNIFE: {"current_ammo": 1, "ammo_max": 1, "reload_time": 0.4, "spread": 0, "projectiles": 0, "is_automatic": false, "is_melee": true},
	GunType.MACHINE_GUN: {"current_ammo": 30, "ammo_max": 30, "reload_time": 2.2, "spread": 0.08, "projectiles": 1, "is_automatic": true, "is_melee": false}
}

Mobile-Friendly Drag and Release Controls

I completely changed how aiming and firing work to make the game ready for a mobile layout. Instead of just clicking to shoot, you now hold down the mouse button (or your finger on a screen) to bring up the trajectory line and aim. For semi-auto weapons like the pistol and shotgun, you rotate around as much as you want to frame the shot, and the gun fires the exact moment you release the button. For the machine gun, it continuously fires while you hold it down but limits the rate of fire with a quick cooldown loop so it doesn’t empty all 30 rounds in one frame. The player also keeps turning smoothly even when they aren’t actively clicking.


What’s Next?

  • Making the zombies
  • The ‘waves’ mechanic
  • Player and Zombie damage system
  • Loot System
  • Polish up the reload UI
  • Add collision rules for house

I also made a test level to get an idea of how the level will be layered out. Check out the video! (if it loads…)

0
0
2
Open comments for this post

1h 3m 20s logged

Just working on the basic player movement as well as shooting mechanic. Looks basic (I know) BUT.

If there’s anything you should know, it’s that you should always, make sure that the mechanics actually work rather than making the game look pretty.

This is going to be a top-down mobile game and hopefully with joysticks. But for now I am using WASD and mouse.

I am trying to go for a Brawl Stars kind of UI, but that will be seen in the future.

Next I will be working on a reloading and magazine system!

See you then!

0
0
4

Delete project?

Are you sure you want to permanently delete this project? This action cannot be undone.

All devlogs, followers, and associated data will be removed.

Followers

Loading…