September 2011 challenge: “Mutate!”

Black Rock Games - Please help me work out this bug!!!

Posted by g_nielsen on 2011/09/13 14:29

It's 10:20 am Michigan time. I got up early to see if I could get a working version of my game up, and ran into a rather intresting (quickly reaching frustrating level) error in some of my mob sprite code. Please take a look and see if you can find anything wrong. The sprite is supose to turn right anytime it reaches the screen edge or if it collides with a wall sprite. The code for keeping it on the screen works perfectly, and is shown below.

def update(self, time):
    if time == 5:
    self.lastx = self.positionx
    self.lasty = self.positiony
    self.positionx += self.dx
    self.positiony += self.dy
    if self.positionx > 589:
    self.positionx = 589
    self.dy = self.dx
    self.dx = 0
    self.direction = "Down"
    if self.positionx < 1:
    self.positionx = 1
    self.dy = self.dx
    self.dx = 0
    self.direction = "Up"
    if self.positiony > 379:
    self.positiony = 379
    self.dx = self.dy * -1
    self.dy = 0
    self.direction = "Left"
    if self.positiony < 1:
    self.positiony = 1
    self.dx = self.dy * -1
    self.dy = 0
    self.direction = "Right"
    self.rect.topleft = (self.positionx, self.positiony)

There there is the wall collide function, which sorts things out after the sprite hits a wall. Even though the following code is almost an exact copy of that above which does work, whenever a sprite hits a wall while traveling left or right on the screen, it bounces back the way it came.

def WallCollide(self):
    self.positionx = self.lastx
    self.positiony = self.lasty
    if self.direction == "Right":
    self.dy = self.dx
    self.dx = 0
    self.direction = "Down"
    if self.direction == "Left":
    self.dy = self.dx
    self.dx = 0
    self.direction = "Up"
    if self.direction == "Down":
    self.dx = self.dy * -1
    self.dy = 0
    self.direction = "Left"
    if self.direction == "Up":
    self.dx = self.dy * -1
    self.dy = 0
    self.direction = "Right"

For the life of me, I can not think of a single reason why two nearly identical code sections should produce two very different (one of which is highly undesirable) results. Any help with sorting this out would be appreciated. Thanks in advance.

3 comments

Immune Defender - Beginning of Day Three - Anxiety and Low Hopes

Posted by Akake on 2011/09/13 13:06

So, after looking through the godawful mess I made of my code in the last couple of days (yay coding while depressed!), I need to take what little I had gotten done and start over. The problem I'm facing is that when I try to get down to coding, I feel a really intense anxiety and have difficulty getting anything done.

I know I just have to soldier through it, but it's hard to do anything right now. I keep having these flooding thoughts of self-doubt and it gets hard to think about anything else. I hate this feeling.

I hate this fact, but I'm beginning to wonder why I wanted to do this in the first place. I'm anxious, tired, and depressed. I can't sit down to code because I freeze up and my hands start shaking, I can't think about my idea because my head gets flooded with anxiety and really awful thoughts, I can't really do anything right now.

I am extremely unlikely to finish this game. I'm sorry. :(

--- Akake

2 comments

Gregor Samsa - Creating a story line

Posted by mihi on 2011/09/13 12:39

Creating a basic story line. Finally we have a viable idea.

1 comment

Mutagenesis - Mutagenesis: Day 3

Posted by gcewing on 2011/09/13 12:29

Didn't get anything done about rendering leaves, but did manage to get a basic mutation system working. It may need tweaking later.

Add a comment

Alison In Wonderland - Alison in Wonderland - Day 3

Posted by Hugoagogo on 2011/09/13 11:28

Well i have progressed a bit in the game, i have ditched the flying player sprite that i had before for a much smaller walking player, and have got her to run around and jump and not fall though stuff, but she is able to sick to walls and climb, wall jump off them, which you shouldn't be able to. So that is one thing that needs to be fixed.

I have also sped up the rendering of the game now alot, so that i can comfortably run multiple instances of the game at 60fps as opposed to one at 20fps. This has led to the drawback of all blocks being greyscale for now because i don't know how to color a texture while i blit them to much bigger texture so i need to come up with a solution to that.

Last of all i have scrounged up a sprite for an enemy that is able to lurk in the dark, killing you with a single touch, turn on the lights and it will freeze.


Don't Blink

Thanks to "th3squirr3l" from the Teraria forums who made the sprite.

Add a comment

Mutagion - Day 2.5 - mutagion design is hazy, time to march forward

Posted by saluk on 2011/09/13 10:34

I didn't make much progress today at all. Too busy with other things :( I wish pyweek had been last week, when I was a bit less overbooked. Also, all the time spent thinking up ideas for the other themes last week just made me more disappointed with this one, which is making it hard to keep pressing forward. I'm very close to quitting, but I keep telling myself to just put one foot in front of the other...

My design is still pretty unclear. Yesterday evening and this morning I worked on modelling viruses and populations. It has potential but I am not really seeing how it all fits into the gameplay at this time. Just to get some actual coding started I spent a few minutes putting music and the in game map together for the first real game screen. That made me feel a little better, even though objectively it doesn't really get me any close to the goal.

Tentative plan for the rest of the week:

  • continue with existing virus, people, and cities; get them running on the map
  • add things for player to do to win
  • extend simulation
  • add things for player to do to win
  • iterate until pyweek ends

1 comment

Gregor Samsa - Day 3 Morning - First playable Version

Posted by mihi on 2011/09/13 10:11

This morning we successfully created the first playable version of our little game. Right now there is a small test-story to be played that was mainly written for implementing game mechanics. Major work has to be put into writing/polishing the story and adapting the setting of the game to the story. I'm happy we have at least something working, whether in the end it's fun and nice, I don't know. (I hope so though).
there is a video of the basic gameplay at http://vimeo.com/28979843

1 comment

muntantris - tetris main theme - Korobeiniki

Posted by dotteri on 2011/09/13 09:43

"Tetris main theme" is a russian folk song. I hope that i can use the "tetris main theme"  downloaded from internet.

4 comments

Mutate! - Day 3

Posted by Dash on 2011/09/13 07:10

Not the most productive day since I had to work for most of it, but I did get some features half implemented like the forecast and rain effect. I found a quick and easy particle system in Ian Mallett's PAdLib which I'll use for the rain effect.

I am really resisting the urge to redo all the crappy looking graphics, but without the gameplay being fun yet I will have to stick with them. 

Add a comment

Zeta - End of (coding) Day 1

Posted by john on 2011/09/13 07:08

Due to some stupid bugs that I had then today has been relatively unproductive. Pretty much all I have is a base map class and a base player class and some collision stuff (which wasn't working properly because of redundant code that I forgot to delete).

So I guess targets for tomorrow are to:

1) Stop my eyes bleeding, lets get some better art in
2) Code in mutate boxes
3) Checkpoints

Long term targets:

1) Make lots of levels
2) Balance
3) Add cutscenes
4) Online highscores (can I use PHP for the only part)
5) Add story

Add a comment