PyWeek #23 challenge: “The Lesser of Two Evils”

The evolution of evil - Making a little progress

Posted by Unicorn Markets on 2017/02/24 02:17

I have been making small steps in the right direction. However, I didn't really know much about pygames coming in, so it's been a steep learning curve.


I will say a few things. The feedback loop with pygames is terrible. Instead of the beautifully simple feedback loop of a REPL or notebook, pygames feedback loop loads the pygame screen, and at times, crashes it which requires a force quit. Sometimes, as in the case of loading a tmx file, the stacktrace gives very poor information about what is happening. I haven't seen many games that are included in these challenges include any sort of logging or testing code as part of the project. I'm not sure how complicated that would be...


Coming up with an idea is tough. The most simple and interesting games, may be neither simple nor interesting when implemented. I keep trying to come up with a game that could fit my limited knowledge at this point, since it may be better that trying to expand my knowledge to create the game. Although, a bigger map might be beneficial, more game with less code. Let's just say I'll be lucky if I push out a game in the next 46 hours.


All in all, I am learning a lot. I have worked with python a decent amount already, but I am seeing situations while developing here where Object Oriented Program is a necessity, rather than a nice to have feature of clean code.

Add a comment

A Death at Sea - Day 5

Posted by mauve on 2017/02/24 01:49

Today's effort went into polishing the dialogue system, then into starting to write dialogue. Progress is good. I'm about 40% of the way through the story's critical path, and the dialogue system is working well - conversations evolve naturally as you learn more.

A brief diversion was to create a save/load system - this is a must for writing a state-drive story like this - so that you can restore to the same point with code changes. This turned out to be much easier for this game than it was for Legend of Goblit, though. You don't have an inventory as such, and you simply acquire knowledge by engaging in dialogue. So restoring the location you are in the ship, and the things that you know is basically all there is to it.

I made it autosave every 5 minutes just for peace of mind. Not a very interesting screenshot, but there it is:


Add a comment

Lunar Patrol - Intro, Ammo, Sound and Score

Posted by prake on 2017/02/24 01:12

Did work on a scorekeeping mechanism, an ammunition stock, on sounds, on the intro or attract mode.

Add a comment

Wing Craft - Day 4 & 5

Posted by xmzhang1 on 2017/02/24 00:39

Ok, I am busy doing my work these days (I mean my job, I have to live rely on it)


Anyhow, I am struggling about try to finish my 5-stage game in plan, I have to stay up these days. Or I just finish 3-stage game, polish my code, fully tested it and try to modified all the errors and bugs. For myself, I still want to finish the 5-stage game according to my schedule, because I want to do some challange, and also I know, if I just finish 3 stages, the stage would  be 3 stages forever...


And I think 5-stage is fine, I can generate the stage enemies randomly by computer, I just creat the boss class. In fact, boss class is fine, bosses are seperate classes, if one class can not solve the problem, use two classes. But I meet problem on bullet class :) there are many conditions on bullet, I use pygame.sprite.Sprite, Bullet, EnemyBullet classes to manage my enemy bullets. It is really a mess, and with  a lot of copy and paste, I do not think I am OOP. Anyhow, first let my code work, then clean it :)


I want to post my code tomorrow, for one thing, I am not sure I have time to test my game, maybe other people run it can tell me the error, then I have one day to fix it, for another, If I know tomorrow is the deadline, I will go straight to the theme, though I still want to make a clear how the Rect.colliderect in pygame works, is it use quadtree? is it fast than boundary comparison?



Add a comment

Glory_hole - Day 5 some Critical bugs fixed

Posted by Buffalo974 on 2017/02/23 23:56

A little bit light in the darkness... it goes a little bit better today.
I added some little features today after having been stuck a longtime because of display troubles due to my lack of renpy experience.

I have plenty of dirty parts to clean, it won't be pedagogic anyway. I just want it to work a little bit to show its potential.

I have to implement national budget, glory points, army power, commercial roads etc.

2 days left, ouch !

Add a comment

leStack - Day 4 and 5....

Posted by leStack on 2017/02/23 20:47

It's been pretty busy this week (non pygame challenge).  But I still have hope that I'll get something working before the challenge ends.  It's the halfway through the 3rd quarter, I'm hopeful that a few touch downs is near by.  


Keep clam and code:)

~leStack



Add a comment

"It'll Cost an Arm or a Leg" - Well crud

Posted by pmdevita on 2017/02/23 17:45

So because of homework and other projects, we haven't even really started. As I was showing Clarissa python and cocos2D, I realized cocos had quite a few shortcomings. So I'm going to try and subclass some stuff to fix it. Which is another delay.

I dunno, I'm really worried that we aren't going to make it

Add a comment

ObPortum - Few thoughts, part 2

Posted by cauch on 2017/02/23 13:05

4) "I will write nice and neat code": yeah, sure!
Before the challenge started, I was planning to care particularly about the coding style. But as soon as I'm working, what matters is just making it work. Don't get me wrong: my style is not the worst (too many cryptic variable names such as "ess", "lkn", "lll", ...). I will probably do a lot of cleaning during last day. Same goes for the code quality: as the code evolves, one realises maybe a different strategy should have been used. For example, I have two objects for the units, one for the sprite and one for the core code (independent of pygame). I could have done something nicer (maybe I will if I have time).

5) sea urchin.
Why are sea urchins called "sea urchin" ? Is there "non-sea urchin" ? If yes, I would like to be informed, this is a major safety issue.

6) gameplay: I like it, but I hope the special features will be noticed.
I was worried about the fact that the final game never looks like what you have in mind first. Also, "the lesser of two evils" was not my first choice (maybe I will end up coding my other ideas later). At the end of the day, I am happy with the game I've made and I think it has good quality. There is a "long game" aspect, where you can try to beat the game by getting all the achievements, and a "casual" aspect, where you can play a short game just to beat the latest time score (in hard mode, it should be difficult enough to be a quick game). There is no level, but: 1) adding new achievements is quite easy (without touching any other part of the code, thanks to the power of python), 2) there are several things to explore: trying achievements, trying to get a low or high number of enemy, different ways to keep the balance, ... But again, at first, maybe some of those aspects are not visible. I'm afraid people will just "kill them all" without caring about the balance. Maybe I will do something about that.

3 comments

A Death at Sea - Day 4

Posted by mauve on 2017/02/23 00:53

Today I finished off the majority of the art needed to complete the plot. The plot has had a few tweaks over the last couple of nights, ranging from swapping characters entirely to changing what proves what - hopefully that means it has fewer loose ends.

With the art and a few bits of sound and music complete, I have three days now to write all the dialogue. Obviously the dialogue that lets you complete the game is the first target, but I'd hope to write a fair bit of incidental dialogue to tell the backstories as well.

No new screenshots tonight as it'll be too spoiler-y.

Add a comment

Glory_hole - Day 4 : beginning working on algo and thinking post-mortem

Posted by Buffalo974 on 2017/02/22 23:54

Since 2 hours ago, i just start working on interesting side of coding games : mecanism !
it's very basic but it draws possible future of Glory_hole.

It does now take account of time dimension, so you can promise money or some diplomatic / commercial / secret action ; if you don't respect on time
what you promised, it's very dangerous. But thanks to this you can delay from impossible situation,
It gives possibility to anticipate expected earnings for exemple when you can not immediately satisfy a request.


I want to put an interactive map but it will be hard i think.

I wonder how i can design to easily feed an hypothetic event engine and event handler.

You interact with peason, nobless, aristocracy, clergy and your war ministry.

3 days left... it will be a kind of demo / proof of concept rather than a little game.

1 comment