October 2018 challenge: “Flow”

MrOnion - Copy

Posted by capturts on 2018/10/22 15:03

I copied a lot of stuff from my last entry from 5 years ago. It's given me a place to start.

I haven't done any pygame for a few years, and not much python in general. Mostly I use php and getting into the mind-set of a continuing loop is rather difficult. Mostly in php you start at the top, go through in a mostly linear fashion and output html at the end. I use sql as well, which is also useless for this.

I've done a few small games on the tic-80, which is more useful, but I don't have much time to do things like this.

Add a comment

Just Flow - Day 1 - Treez

Posted by chrisyan2000 on 2018/10/22 13:51

And here goes a randomly generated tree......

Add a comment

Alien Toy Factory - The first proper factory!

Posted by AnthonyB on 2018/10/22 12:40

Ok, time for bed now, but I've just added the first machine to the game, which stamps copper ingots into circuit boards. A couple of conveyor belts and voila! The first working factory. Sure, it's pretty simple, but adding extra types of machine shouldn't be too hard (tm). The more ambitious goal is to have different machine *parts*, ie. 2, 3 or 4 boxes, which make different stuff depending on how you arrange them.

Tomorrow I'll have a clearer day, so I might be able to chew through some more features. Top of the list is making the UI just a little more intuitive, which has been bumped mainly because it's making the game hard to test. If *I'm* finding it annoying to play, what hope does anyone else have? :D

Add a comment

Crossing sea! - Day 1

Posted by yarolig on 2018/10/22 12:23

There is two obvious things I can do next. Physics. And gameplay.

Gameplay is more important. Now it is time to think about implementing port interface, quests and races. I have a poor ui code. I think I should use it to make a interfaces for quests, cargo and timers.

I enjoyed using the Tiled (https://www.mapeditor.org/) last pyweek. Why not use it again?

I studied about the Perlin noise this summer. I may use it to make a few planets :)

But quests are more important now.

Add a comment

Crossing sea! - Day 1

Posted by yarolig on 2018/10/22 12:08

I count Monday as the Day 1. Now is 15:06 UTC+3.

Searched for a good boat models. 3D model sites listed in http://www.pygame.org/wiki/resources are worthless. Registration required and licenses are not clear. Found a good model with a good license on https://opengameart.org.

I am using https://www.pygame.org/wiki/OBJFileLoader as a library to load the file.

Three boats in the void

5 comments

Time Chicken - Hello, world!

Posted by haker23 on 2018/10/22 11:42

Time Chicken from Chicken Coup will be made in 5 days. 


Because I gave myself yesterday off. I never claimed to be smart.


python -m pip install pygame

Add a comment

Alien Toy Factory - Loading docks

Posted by AnthonyB on 2018/10/22 11:24

Loading docks are now in the game. Currently they just act as an item sink - they'll accept items pushed into them every ten seconds.

I also added a few more conveyors so that you can actually reach the other side of the screen, which helps. See, playtesting your game is important, kids :)

Add a comment

Crossing sea! - Day 0 evening.

Posted by yarolig on 2018/10/22 10:02

Watched some YouTube videos about flow. Liked one about divirgence and curl. Now I want to make a boat racing game.

Spent some time looking for a good ui library for Python and OpenGL. Everything I found looks unreliable or not convinient. I will make my own ugly ui. Main menu is ready.

Main menu


Add a comment

Alien Toy Factory - Success!

Posted by AnthonyB on 2018/10/22 07:06

The coins on the conveyor belt go round and round, round and round, round and round...

The coins on the conveyor belt go round and round, Iiiiii fixed the bug!

After some thrashing around, I realised that I'd left a stray "self.grid_y - 1" in one of the conveyor pushing calculations, and conveyors now push things around. Yay me! This is one of the core mechanisms of the game, so I'm glad it didn't take too long to track it down.

From here, I'll need a couple of other things:

  • A sink for these items (ie. a loading dock to ship things off to customers)
  • Machines that'll convert some combination of items into something else.

Once those are done, then the basic core of the game will be working.

After that it'll just be a Simple Matter Of Programming all the rest of the things - a big list of recipes, fixing the UI, adding machines somehow and then adding displays to those machines so that you know which bits convert or produce or sink what items.

Add a comment

Flowing Magic - Day2 - We haz a model and a view!

Posted by saluk on 2018/10/22 06:01

Kivy view + dictionary model

Today I put kivy frustrations aside, and set about working on the model. I'm going for a slightly weird approach, being that I want to be able to quickly implement the multiplayer part of the game. If the model can be represented 100% as a python dictionary, then it should be feasible to just pass around json strings representing the model changes. The interface for modifying the model is also reduced to specific string arguments to a function call. Here is the object I want to manipulate, and here is what I am doing with it.

To test that the model is working, I have a small unit test, and also set up my kivy client to talk to an in memory version of the model. When you drag a card and let go, it passes the request into the model. If there is an exception - which represents some change request that the model has rejected - the view simply animates the card to return to where you dragged it from. Otherwise, we make sure our widgets are updated to the positions that match the model, adding and removing cards if necessary. The animation system makes it easy to have some pleasing player feedback even though the model change was very discrete.

For this "game", on your turn, you can play a single card into the other player's hand. And then the turn automatically passes. In the above video, you can see that I have set up this simple test in a hotseat mode, where the current player the input is targeting switches when the turn switches. The white section is the current player's hand.

I am a day or so behind my original schedule, only accomplishing the first of my listed tasks :)

So I'm already preparing myself to lower my expectations. Nothing in the game yet resembles flow, and I haven't really done any game design yet (although I have an idea) So I'm going to strive to at least have the client working how I like it. If there isn't much of a game to play, so be it! I didn't realize how frustrated I would be working with kivy. I'm so much more experienced with pygame, and pretty out of practice at game programming. But I'm not sure I like how kivy is designed outside of the main use case it was designed for (apps with standard gui).

(Also I have a new cat, and she is quite a needy one so far - always wanting attention and not letting me sleep!)

To further the primary online goal, my plan for tomorrow is to have the client connect to a server that is running a single ever present game. Api something like:
/join - returns player1 or player2
/play/card_id - sends the command to play a card (which automatically ends the turn). Also returns updated state.
/getstate - returns the current game state

If it's not our turn, the client can just call /getstate once every couple seconds. If it's our turn we don't need to call it, we'll just get the state when we play the card.

1 comment