Learning To Make A Game banner

Learning To Make A Game

17 devlogs
20h 27m

Making a tag game where you have to run away from the person who is it, a two player game that you can play with one keybaord.

Demo Repository

Loading README...

dhruvil_patel

I added one more power up to the game. I tried to find a way to add the pause button did not find one as it uses the start time and that changes even when it is pauses. I cant think of another way I could do the timer.

Attachment
0
dhruvil_patel

Shipped this project!

Hours: 19.97
Cookies: 🍪 78
Multiplier: 3.9 cookies/hr

This is my first time using pygame I have used python before but this is my first time acc building something with a GUI. I started with copying a tutorial and was planning on making a different game but then I realized I wouldnt really learn from that so i used it as the backbones and branched off and created something else. I have learnt a lot from this project and how to code. This game has also given a lot of memories with me and my friends playing it.

dhruvil_patel

I added the final sound effects for the game and cleaned up the game. I did this by trying to find a way to make a random map generator work better by finding better cordinates. I added a starting screen for when your first lanch the game. Added that when you click 0 instructions pop up on the screen telling you how to play the game.

0
dhruvil_patel

I added sound effects cleaned up my code, made the game end when it got to 15. Fixed all the little bugs i had. Experimented with different ways I could go about doing it, and tested the game with my friends to find anything I neeeded to fix.

0
dhruvil_patel

Made the game componet of it and also that tagging system that makes it work. The score keeper the timer. Made it able to switch maps and also have map number 3 be able to random generate when you press it more than once. I was having trouble extacting figuring out wether to use the pygame clock or if I should import time from another python libary and then settled on used the interal clock given by pygame to make this game work, with a combination of the libary. I couldnt really find a better way to this.

Attachment
0
dhruvil_patel

This is where I started working on the scoring system and how if one person tagged the other the game would still countinue and you had a set amount of time to get the most taggs possible however that didnt work due to the lack of coding experience from myself. I Had the score being displayed and it worked however couldnt figure out how to get it so that after time elpased the player would switch.

Attachment
0
dhruvil_patel

I added another character that works with WASD, and make sure you can jump on the platform now I am trying to make the acc game part of it with the score. I had it work where if you player 1 tagged 2 then it would day player 1 won and then player two would have to chase. However that got boring fast and was to easy for the tagger so now I made it you have to tag the other person as much as possible in a given time and that is what I am working on. As well as working on a way to create different maps that I can add.

2

Comments

Jahaan
Jahaan 13 days ago

Damn that’s cool random person

dhruvil_patel
dhruvil_patel 13 days ago

Thank you random person

dhruvil_patel

I figured out how to do it so you only need one line of code to add another platform making it easier to code and also made sure that the gravity works for all of them. Porblmes I fixed:

  • Wasnt able to jump while on platform
  • Gravity didnt work and just kept the sprite moving down and then put it back to the top
  • The ground didnt appear
  • Functions didnt work for the recentangle when I added the gravity
  • Couple of other things I can remember
Attachment
0
dhruvil_patel

I tried to clean up my code by making functions that make it easier to draw the platforms so I dont need to put it over and over again. I got that working and I wanted todo the same thing to create the physics for the platforms and also trying to solve my player going through the bottom of the platform and have it only be able to go around. I havent got the physics working yet and trying to find out how I should make it work and if I should give it the y position, or having a true and false statment telling it could jump.

Attachment
0
dhruvil_patel

Finally figured out the gravity and how to make it work and to handle people jumping from directly below the platform I just added another rectangle so that if collided with nothing would happen.

1

Comments

Jahaan
Jahaan 14 days ago

WOW, great job. I love see people that i dont know do wonderful things. Your gonna go a long way Kiddo

dhruvil_patel

I have been trying to add gravity and trying to understand how it work but I dont really get it and now am stuck with a sprite that stay floting in mid air when I dont hold the up arrow, so i am trying to fix that.

Attachment
0
dhruvil_patel

Instead of just copying a tutorial I decided to learn how pygame acctually work and branch off and create my own game like “Together” execpt its one computer and works like watergirl fireboy and you have to work together to get across.; I created the movement using left and right keys and also up and down but now I am trying to find a way to include gravity with it aswell. I started by just setting y = 0 but that gave it a very limited motion. (That small thing is supposed to be a ghost)

Attachment
1

Comments

Jahaan
Jahaan 15 days ago

SO AMAZING. This is crazy, I am really proud of who ever you are to be able to do this. WOWZAA

dhruvil_patel

When I came back to my project everything didnt work so I tried to slowly erase everything to see what the problem was and re do it to find out the problem but couldnt so I decided to start over. Which then I later realized that the version changed for my pygame but my VS code’s python was on the older version creating an issue which I just figured out.

Attachment
0
dhruvil_patel

I added boundaries and a timer that isnt functional yet. It took me a while to find out why the boundaries weren’t working.

Attachment
0
dhruvil_patel

I added a character and had it move using the left and right keys. I also added a tick timer where you can control the speed of the character.

Attachment
0
dhruvil_patel

I found a background for my game I could used and upload it as my background instead of having a plain black screen.

Attachment
0
dhruvil_patel

First time learing how pygame works. I learnt how to make a window using pygame.

Attachment
0
dhruvil_patel

I’m working on my first project! This is so exciting. I can’t wait to share more updates as I build.

Attachment
0