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

ShinyMist

@ShinyMist

Joined July 2nd, 2026

  • 7Devlogs
  • 2Projects
  • 0Ships
  • 0Votes
Coding novice, but I'm sure i'll knock your socks of (;
Open comments for this post

2h 50m 53s logged

Dev Log #7
.
Another prosperous coding session today!
.
I have added the following features:

Correct bullet orientation
Sound effects
Tiled surface (no collisions)

I also had to change the screen size as its height and length needed to be divisible by 16 in order for my tiles to be used easily.
.
I added the pytmx python library to allow me to use Tiled, a software that makes level creation very simple and quickly repeatable.
.
It should significantly increase my workflow speed when I get far enough in development to actually be making levels.
.
I also did some fine tuning on the strength of recoil, making it stronger but controllable.
.
Additionally, I increased the speed at which the gun rotates in air to make aiming more difficult but still manageable.
.
Overall, 7/10 work day today.
.
By next devlog I hope to have some of the following complete:

Working collision
Finish goal that takes you to the next level
Possible moving colidable tile
Bullet limit and UI to show this

I’m back in business now, regained most of the knowledge I lost from my 1 week hiatus. Wishing future me luck for the next devlog!
.
And all you others out there as well. STAY DETERMINED!!!!!

1
0
14
Open comments for this post

3h 16m 10s logged

Dev Log #6
.
I have made some absolute serious progress!!
.
I have added:
.

Working recoil
In-air gun rotation
Aiming phase and playing phase (turning aiming guide on and off)
Dotted aiming guide

This has by far been my best coding session as of late and had little to no complications…
.
Well there was one… Where my entire recoil system was built on mouse position, a mouse which only controls the direction of the bullet once and never again per level.
.
So that caused me some grief. But I was able to calculate recoil based on the bullet’s movement rather than the mouse’s position.
.
A bullet which would spawn and move forward from the barrel despite orientation, solving my problem and making the rest of the other features added much simpler to implement.
.
In the next few dev logs I hope to have added the following:
.

Make bullet orientation match barrel orientation
Add a start menu soundtrack
Bullet trail
Sound effects (e.g. gunshot, start button pressed)
Complete level (with collisions)

I hope progress continues at the rate it is, because if so, I will be drowning in stardust.

5
0
33
Open comments for this post

1h 34m 24s logged

Dev Log #5
.
I have redeemed myself 10 fold. I have finally added recoil to my game!!!!
.
This moment shows real progress. I have been trying to implement recoil for a while now, and I have finally done it.
.
I did this by using the velocity I calculated to determine what direction and what speed bullets are shot at from the gun:

    def __init__(self, barrel_pos, m_pos):
        super().__init__()

        self.image = pygame.image.load("Images/BULLET.png").convert_alpha()
        self.rect = self.image.get_rect(center=barrel_pos)

        direction = pygame.Vector2(
            m_pos[0] - barrel_pos[0],
            m_pos[1] - barrel_pos[1]
        )

        if direction.length() > 0:
            direction = direction.normalize()

        self.velocity = direction * 10

Passing the velocity into my player group and subtracting it from the player’s centre, effectively creating movement opposite to the direction of the bullets, aka recoil!!!

def recoil(self, velocity):
    self.recoiled = velocity

    self.rect.x -= (self.recoiled.x * 10)
    self.rect.y -= (self.recoiled.y * 10)

I also made it so that bullets despawn once off-screen, optimising performance.
.
Finally, I re-ordered my code, making debugging and overall readability much easier.
.
While my recoil is not fully complete, this is a large step in the right direction.
.
I hope by the next devlog I have a fully working recoil system and possibly a working level. Who knows!
.
Aim for the stars and you’ll at least reach the moon.

0
0
16
Open comments for this post

5h 19m 1s logged

Dev Log Number 4
.
With the amount of time logged, you would think a lot has been achieved. But no…
.
After an almost 2 week long holiday induced hiatus, it seemed I had lost my confidence with pygame, and at some points, felt like i had lost my brain entirely.
.
My attempt to add shootable bullets should have been a simple task, yet it seemed to be impossible. And its not like I could have packed up shop and tried something else, a shootable bullet is esential for a game where the only playable charcater is, well, A GUN!
.
The first challenge was getting the bullet to spawn from the correct location. Initially, the bullets appeared from the centre of the gun rather than the barrel. Obviously that was not the intent.
.
I eventually solved the issue (casued by my own ignorance) and passed the barrel position calculated previously into my bullet class rather than re-calculating this (why would i do this, what on earth was I thinking 😩)
.
With that issue conquered, i then had to do the maths required to shoot a bullet from the barrel to the position of the mouse. Easy enough. NOT.
.
To cut a long story short, I used the code attatched to finally make my gun work.
.
My shootable bullets are far from perfect, they sometimes don’t shoot at all even when the mouse is pressed, their orientation does not match the direction the gun is facing and they are far too small.
.
I plan to fix this by: killing bullets as they go offscreen, adding some sort of rotation to the bullets and for the bullets not being shot when intended, i have no real plan on how I’m going to fix that.
.
I hope I come back to you in the next dev log with some actually real progress, because this is a sad excuse.
.
But with determination and grit and endless scrolling of the pygame documentation, I am sure progress will come as fast as a speeding train [or some sort of blue mammal with quills (^_~)]

0
0
4
Open comments for this post

2h 1m 34s logged

Dev log #3

.
Today I got a bit sidetracked and decided to move all of my code within a sprite class to reduce clutter. As a newbie, this was my greatest challenge (besides my arch enemy recoil physics).

.
This process was tedious and caused my entire code to break completely on multiple occasions. But the risk and complication was worth the reward. I reduced my codes line count by 15.

.
Due to the length of this process, very little was added. However, I did manage to add a aiming reticle for your first initial shot of the gun.

.
As seen in the images below, this feature came with its own plethora of annoyances. Annoyances such as multiplying rapidly and staying fixed on the gun trigger rather than the barrel.

.
I also created a new gun sprite that now faced the mouse correctly.
.
In the next dev log, I hope I come bearing more features.
.
I plan to add:
.Basic bullet firing
.Dotted aiming line instead of solid
.Player start game (in which gravity will be applied)
.NOT recoil, sadly that will have to wait

.
Went back to my roots today and used my beginner tutorial to help me learn how to apply the sprite class, video linked here: https://youtu.be/AY9MnQ4x3zk?si=9UtUnmyWYpsHZ6d5

.
While the sprite class has acted as a roadblock to speed of development, I believe that by the next devlog, my progress will be sure to amaze (I say with confidence 🤞)

0
0
5
Open comments for this post

2h 2m 54s logged

Dev Log #2 – Start and Turn

.
Now with the basics ingrained in my head, my game is beginning to take shape. While I wasn’t able to add the recoil mechanics I had hoped for, I was able to:
.Create a functioning start screen.
.Make my player sprite follow the mouse direction.
.
Today I used a different tutorial to assist me, linked here: https://youtu.be/WnIycS9Gf_c?si=UhNQQ8ekJLdPhRZO
.
While these are small achievements, they will help build a much greater finished product. Thanks to implementing these new features, I now understand the importance of game states and how to apply them, as well as how to track mouse movement and mouse input.
.
The reason I implemented sprite rotation based on mouse direction was to allow the player to aim their initial shot and determine their trajectory.
.
Later, the player will have to use well-timed shots to control their direction rather than relying on this simpler aiming system, making my game’s movement feel more unique and rewarding fast reaction times.
.
By the next dev log, I hope to create a new gun sprite that follows the mouse correctly, make a shootable bullet, and finally implement the recoil effect when the gun is fired, although this still seems to be my biggest hurdle.
.
Progress is picking up pace. Every new feature is another lesson learned, helping build the foundations of what I hope will become my magnum opus. See you in the next dev log. ;)

0
0
3
Open comments for this post

2h 2m 19s logged

Dev Log #1 – Grasping the Basics of Pygame

.

Since I’m new to Pygame, my first goal has been learning the fundamentals and applying them to build the foundations of my game.

.

So far I’ve implemented:

.

.Basic gravity
.Collision detection with the floor
.Upward player movement using mouse input
.Loading and displaying sprites and backgrounds

.

Building these simple features helped me understand how the game loop works, how collision is detected using rectangles, and how offsetting the player’s y-coordinate can be used to create gravity.

.

At the moment, the player is represented with a placeholder sprite, as my focus is on the code behind my game (and art has never been my strong suit).

.

I’ve been using the following tutorial, a learning resource that has helped me greatly:

.

https://youtu.be/AY9MnQ4x3zk?si=x9KrrOI12N1CwT29

.

Now that I have an understanding of the basics, I’m going to start moving towards creating the mechanics required for the actual game.

.

My goal before the next dev log is to have a basic title screen completed and, if possible, implement the recoil mechanic for my player.

.

Progress is slow at the moment, but every feature I build teaches me something new. Hopefully, the next update will be bigger and come together more quickly (as long as all goes well 🤞).

0
0
31

Followers

Loading…