PyWeek 31 challenge: “Cops”

Airlift One - Goals

Posted by Matthgeek on 2021/03/30 15:23

The hovercraft can now complete tasks by hovering over a task marker until the progress bar fills up.


Next up: Keeping track of what's on the hovercraft.


Note: Due to complicated reasons, my screenshots will consist of me taking pictures of my screen with my phone.

Add a comment

PrisonScape - Late start

Posted by YannThor on 2021/03/30 13:05

Started coding tonight, challenge registration today.


As I need a project simple enough to be finished by the end of the week, I'll try to make a platformer as fun as possible.

Add a comment

Cool Cop - Escape Game - First update

Posted by coffee on 2021/03/30 10:29

Due to the fact that this was our least favorite theme for the contest and we had a hard time coming up with an interesting idea, we were off to a slow start. After a while we finally managed to outline a concept that we all thought was doable and would be fun to play in the end.
As we lost a lot of time struggling there we only started development on Monday.

Yet we are making good progress at this point and currently we are able to load a tile map, have implemented a (hopefully useful) architecture and the player is able to move. 

So while we started off slow we now start picking up momentum...


Add a comment

I'll Cop Your Heart - Day 3: Making Art

Posted by doodletaco on 2021/03/30 09:39

Goals
Today's goals were to replace the placeholder art with finalized assets, and try to make it so that the same direction can't be activated twice in a row.

Progress
I did manage to create new assets and implement them into the game. However, I did not make any progress with preventing the same direction being activated twice.

Issues
Real life commitments prevented me from being able to spend as much time on the game as I wanted to today. However, I am still happy with my progress and confident that I can have a quality final product by the end of the jam.

Screenshot
A screenshot of gameplay. It has a circle with a green blob holding a scalpel, with hearts in all four cardinal directions. The right one is larger and colored red.

Add a comment

Copcake Caper - Day 2: Slow And Study

Posted by Chard on 2021/03/30 06:30

We're still getting our core gameplay together. Meanwhile the art workflow seems be working pretty well and we're seeing all kinds of fun character art showing up. This is the first time we've tried to incorporate automated testing into our development for PyWeek and I'm really glad we did because our game model is showing up all kinds of edge cases and it would be very hard to be sure it is working otherwise.

Anyway, more details coming soon. In the meantime if you know what we drew here then please let us know!

1 comment

Chocolate Turtwig - Send Help # 1

Posted by rx on 2021/03/30 05:44

berriescop

1 comment

Gnorman's Copse - What's a copse?

Posted by Cosmologicon on 2021/03/29 22:15

"Cops" was my #5 theme choice. I'm not inclined to make a game about police right now.


"Copse" is a homophone that means a small cluster of trees, so that's what I'll make a game about! I'm expecting the possibility of comments saying I used the theme wrong, but I'll live. As long as it's clear I didn't ignore the theme. Here's some stock image inspiration:

A copse

1 comment

Donut Run - Day 2: Enemies and shootouts

Posted by karx on 2021/03/29 21:56

Today, I added enemies.

The first step was to create a sprite for it. I did this in the free pixel art app called Piskel, which I used to make all of my sprites for this game. Then, I got the sprite into arcade and on the window.

Now it was time to create an AI for the enemies. The first thing I did was to get a line-of-sight algorithm working, so the enemies will move toward the player if the player is not in the line of sight. For actually moving, I had two options:
1. A-star pathfinding towards the player
2. Simply angling towards the player and going in a straight line.

I found both options to be equally effective, except the A-star method was a bit more intensive. In the end, I just opted for the second method. The enemies will check if the player is in their line of sight, and if it is not, the enemy will move toward the player until the player is in the line of sight.

Now that I could get enemies to move the player into their line of sight, it was time to make the enemies shoot at the player. To do this, I made it so that (before adjustment) there was a 1-in-200 chance that the enemy would shoot every frame. After adjusting for delta time using the following code, I had a pretty fair shooting algorithm.

adj_odds = int(200 * (1 / 60) / delta_time)
Code for adjusting odds for delta time

The next thing I did was to make a leveling system. This game is an endless shooter, and the enemies come in waves.
I did this by tracking a level variable and incrementing it when all the enemies were killed. Then, when setting up the new wave, I would spawn in the number of enemies that level contained. For example, if level is 1, I spawn in 1 enemy, if level is 2, I spawn in 2 enemies, and so on.

Combine this all together, and I had a fairly challenging game.

See you tomorrow!

Add a comment

Freecity Patrol - Day 2: I DID IT. ASPECT RATIOS. Well, not really.

Posted by Aimarekin on 2021/03/29 21:22

I know I'm supposed to make a game, but I've spent my entire afternoon trying to make my brain think about aspect ratios.

Every engine I've used so far had some sort of automatic scaling for when the user resized their window. But, python? Yeah, forget about any kind of help.

This was a pain. There was absolutely 0 documentation about how to implement this on Arcade, which is the module I'm using. I want my game to keep it's aspect ratio no matter how the user resizes the window, by adding black bars to the sides. It took me 45 minutes for my brain to use 5% of it's processing power and realize this:

(orig height/orig width) = (new height/new width)
Therefore
(orig height/orig width) * new width = new height
(orig width/orig height) * new height = new width

So simple, but my small brain kept searching for complicated equations, algorithms and formulas that were just not necessary.

Afterwards, I spend a good time looking at the docs. That set_viewport function wasn't even that complicated. But my brain refuses to believe things can be simple. I'm kind of contradicting myself now, aren't I?

That was not the end of it. This is the code I made:

if width <= height:
    # Width is smaller or equal
    r_width = width
    s_width = 0
    r_height= math.ceil((500/800)*width)
    s_height = math.floor((height - r_height)/2)
    self.set_viewport(-s_width, r_width+s_width, -s_height, r_height+s_height)
    print(f"\nResized to {width}, {height}.\nWidth is smaller.\nResult is {width}, {(500/800)*width}\n")
else:
    # Height is smaller
    print(f"\nResized to {width}, {height}.\nHeight is smaller.\nResult is {(800/500)*height}, {height}\n")
    r_width = math.ceil((800/500)*height)
    s_width = math.floor((width - r_width)/2)
    r_height= height
    s_height = 0
    self.set_viewport(-s_width, r_width+s_width, -s_height, r_height+s_height)

It basically tries to make the content inside as big as possible within the space available in the window. But since I'm not accounting for aspect ratios in the conditions, it doesn't detect when it has to switch modes very well. Also, making the width smaller breaks it and doesn't correctly center or scale the content. Here's a picture to embarrass myself.

My failure

TL;DR: Two days and I can't even handle aspect ratios. I better calm down and lower expectatives. Good luck to everyone!

Add a comment

SPI-COP - second day - an Engine for the NPCs .. more or less

Posted by MasterPice on 2021/03/29 20:38

The Engine for the NPCs is there now:
    - it can move,
    - hit the wall ( and react),
    - has some looks to choose from,
    - can change the looks depending on the state ( standing, walking, ..),
    
    There are some managing classes, to take care of some NPC stuff... ( like images to be loaded, size ratios, animation frames, position, wall detection,....):
        - the "Cloth" class // for all the clothes of an NPC
        - the "walker" class // for walking throu the game

There is a beginning of a manager (that is there for):
    - NPCs don't just walk into each other ( in some way ..),
    - NPCs will be stoppable from outside (= the user),

There is a Vector class... // we made it rather simple... not much to say...

Add a comment