Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411491 Posts in 69377 Topics- by 58433 Members - Latest Member: graysonsolis

April 29, 2024, 09:16:03 AM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsCommunityTownhallForum IssuesArchived subforums (read only)CreativeThe story of my pyweek
Pages: [1]
Print
Author Topic: The story of my pyweek  (Read 2387 times)
Afinostux
Level 2
**

Forgotten Beats


View Profile
« on: September 06, 2009, 05:26:09 PM »

Well, here you have it. The epic tale of mirth and woe, sanity and madness, blasphemy and sparta! this is:
My First Pyweek Entry: a sordid tale

When I started out, I really had no idea what to make of the theme. In fact, I hated the theme. Feathers.
The LD people had caverns, and both competitions were going at around the same time. Caverns is a much cooler topic than feathers.

"Screw this," I thought. "I'm going to make something which subverts the feather theme as much as is humanly possible"

So, armed with newfound resolve, I decided to make a game about a pimp. Or rather, an idiot trying to become a pimp. You would run through a randomly generated maze, trying to find mystical 'hatbirds' with awesome feathers. The design was as follows:
  • Search for eggs in a random dungeon
  • Pick up a stack of hookers over your head, bible adventures style
  • Pile hookers on top of the eggs to make them hatch
  • The police want to stop you (and are basically goombas)

sounds awesome, right? what I ended up making was nothing like it.


How to fail at levels

I've made a few character and graphics systems from the ground up, so I decided the logical place to start would be level generation, since I'd never really made anything except little prototypes in a box, except in game maker.

Turns out this was actually a logical place to start, since it ended up being the longest part, as I was learning while writing. The real problem was that I thought I could save time by making the levels procedurally generated.

While it may be true that someone with a lot of experience making random level generators would find it easier to make a generator than a map editor, for me it was the opposite. While it did allow me to release the game with arbitrarily large levels in less than 20kb, it also adds about a minute to the game's launch time, and took a whopping 5 days to complete. that just left me two days for the game itself! arghehh!

On the very first day, I had the following demo complete:

I tweaked theProperUndead's random level alg to add connectivity. It exposed a couple big problems with my tileset splitting class, when the pipes showed up with seemingly random connectivity. That burned the whole first day, but by the end I was so happy that the damn thing worked that I spent most of the second day just dicking with the result.

Once I had that all together, I made a room class that would hold the tiledata for each room. I decided to store the tile data using the same 4 bit int strategy I'd used for the map connectivity, just to be consistent, and also so that the tiles would have proper borders:


Now, at this point, I decided I could simplify the collision resolution if I sampled the neighbor data from the rooms, and moved game objects back from borders accordingly. I'd never seen collision done this way, but working it out on grid paper, it looked great! I decided to go ahead with it.

The problem with that is that I would absolutely need to make the neighbor data seamless across all the room objects, since otherwise entities would collide with invisible walls when traveling between rooms. and it WASN'T COOPERATING. mostly due to my lack of experience with tile based junks Embarrassed

I ended up also making the platforms placed manually, using a bitwise or operation based on which walls were connections to other rooms.

Finally, I did get it right:

Quote from: me earlier this week
I'm still on track fortunately. I've never made a random level generator on this scale, so I was expecting to spend most of the week on it. Not quite this much, but my game concept is so simple (EX the random levels) I should still have time to do stuff to things.
LOL NUB

Overworld: two days
Level data: one day
Seamless levels: two days

Total: 5 of 7 remaining Who, Me?


Who is That Dashing Reginald?

The answer: Reginald is an ASSHOLE

He's also the character occupying the first 16 tiles of this sheet.

Fun fact: of this entire sheet, to my knowledge, only the first four frames are used in the game.

I started out with the part that was easiest to me, the physics. I've made a lot of little physics demos in java and C++, and even made a game maker version of Metanet's N physics engine at one point. My record was making a physics engine in java in half an hour. 'cause physics is fiken k00l.

Physics is easy to me, but the collision was another matter:

Quote from: me earlier in the week
Main character in game. Looks great, but he falls through the platform and hangs by his hat. GAR. pencil and paper time.

Remember that collision scheme I mentioned earlier? the one using the neighbor data? the completely untested and unproven one that I've never seen in use anywhere?

IT FAILED ME

I wonder why.

Basically, I didn't realize it at the time, but my connectivity data was working the wrong way around. An empty square would have a value of 15, a square with a neighbor to the left would have a value of 14, etc.

What was happening was that the guy was falling all the way through the platform and standing on the inside of the blocks. After I resolved that problem, I found another problem where you would sometimes go flying really high up into the sky when you hit a platform from the corner. I looked long and hard at this problem, and found that it was actually a problem with how collisions were being detected: since the connectivity map had data on the four neighbors, it had no idea when it was colliding diagonally. Then, once it drifted past a certain threshold, it would detect the collision, and the verlet physics would fling the little bastard to the moon.

Once I had that sorted, there were other difficulties, like reginald getting glued to the ceiling and hanging there flailing.

I ended up fixing the glue bug by padding the top of the collision box a little, and fixing the massive glitch jump bug by adding a little bit of damping and increasing the gravity and normal jump strength to make it less noticeable.

Entities added to game: 1/2 day
Collision response: 2 hours

final score: DAY 7 OF 7 EVERYONE PANIC


Ginger Moonshine

I learned how to make homemade ginger ale this summer. I'm on my ninth batch, and have never had any significant problems. Why is this significant you ask? because I had a friend over on saturday to show him this, and we drank a batch that had been in the fridge since the beginning of the week.

This batch had been sitting long enough to develop a little bit of an alcohol content.

I don't drink at all, so I'm a huge lightweight. There was barely any alcohol in it, but it was definately enough that I felt it, and it was making it hard to concentrate.
Quote from: me earlier this week
Oh god there are like three hours left. and I'm still totally not finished. BARGH

let's recap:
Level generation is good (if boring)
you can walk around as the player
all the areas on the map are reachable
there are no enemies
there are no birds
there is no way to win

I think I allocated my time slightly wrong this time :L

After writing the above, I bashed together a simple bird collectible, basically a token that you would pick up, and made them show up as yellow dots on the minimap.

No hookers, no police, no picking things up over your head.
Quote from: me this morning
I'll probably make a postmortem at some point, but for now:

AWESOM THENG:
the game is under 20 kilobites!
the character physics worked correctly on the first try!
the levels are more fun to explore than I thought they'd be!
cool open world game!

FAEL THENG:
no enemies!
no saving!
had to cut out the egg opening part!
really obvious collision detection edge case!
a rare case where it generates over 9000 birds in the map!

all in all, the AWESOM:FAEL ratio is about 4:5, so I'm happy enough for a first time entrant.

Here's my contest page:
http://pyweek.org/e/GremHammer/


I've released it public domain, so if any of the generation stuff is interesting to you, feel free to have a look, and/or copy it for your project, but be warned that it is a dense rat's nest of hacks.

Got questions about the techniques or whatever? ask away!


Now if you'll excuse me, I'm off to drink the rest of that ginger moonshine Beer!
Logged

Afinostux
Level 2
**

Forgotten Beats


View Profile
« Reply #1 on: September 06, 2009, 05:28:11 PM »

Bonus content: the original title screen. This is the last time you'll see those cops:
Logged

ElijahKatz
Level 1
*


View Profile
« Reply #2 on: September 07, 2009, 11:18:42 AM »

I really enjoyed reading this. At least you worked out some of the more complicated stuff first and I'm guessing you learned from your experiance. Maybe next time do pyweek with a partner  Wink
Logged
FatHat
Level 1
*



View Profile
« Reply #3 on: September 08, 2009, 12:54:58 PM »

Nice post! Its always interesting to read people's postmortems. I entered too: http://pyweek.org/e/MurderCrow/.

Also, agreed on the theme being TERRIBLE, it took us two days to even come up with a decent game idea.

I think you had the right idea with a level generator. Levels take up so much time to make in general, and then you have to deal with loading/saving and making GUI's and its just a mess. I ended up hard coding the two levels I had in my game, along with a lot of other things.. I hope nobody looks at the code  Embarrassed

Animations are the other huge time sink. We just ended up skipping trying to do them at all (Nobody on our team is a good artist) so we just applied forces to the rag dolls directly, which looks incredibly weird, so I just told anyone that asked that the people were zombies ;-). It does allow for some cool interactions though (it's funny watching ragdolls trample each other Smiley, or limping along with one leg )

Honestly I think the hardest part of doing pyweek is just identifying time sinks and figuring out how to avoid them. But it's pretty useful overall, because you learn how to prototype ideas much quicker, and find creative ways to cut corners.
Logged
Afinostux
Level 2
**

Forgotten Beats


View Profile
« Reply #4 on: September 09, 2009, 03:23:06 PM »

Thanks for the protips and such. I think next time I might enter with a partner, but this year I didn't know anybody who was interested.

On level creators, a friend showed me this pretty much the day after the competition. Probably wouldn't have helped much with your game, but it was pretty much facepalm city for me.

On cutting corners: I think my game is a mathematically perfect sphere by now :D


Also, agreed on the theme being TERRIBLE, it took us two days to even come up with a decent game idea.
Seriously? some of the other themes looked way more fun. Even 'reception'. My vote was for 'what big eyes you have' though. I had a bizarre idea for a giant robot version of little red riding hood. Feather, though.

I really enjoyed reading this. At least you worked out some of the more complicated stuff first and I'm guessing you learned from your experiance. Maybe next time do pyweek with a partner  Wink
It was a lot of fun to write. I'm going to call this a learning experience for sure.

also, the ginger ale recipe: http://biology.clc.uc.edu/fankhauser/Cheese/Ginger_Ale_Ag0.htm
don't make the mistake I did -- drink it in the first 3 days Beer!
Logged

Epitaph64
Level 1
*



View Profile WWW
« Reply #5 on: September 16, 2009, 09:46:28 PM »

:O That arraypainter program is AWESOME. I was actually thinking of making something similar after competing in LD 15.
Logged

v21
Level 0
***


View Profile
« Reply #6 on: October 22, 2009, 07:51:04 PM »

Just popping by to say: that was really fun to read. I'm not entirely sure what lesson to take away from it besides: if you do things you don't know how to do and that are hard, you may well take some time. Um, which I have noticed previously. But I enjoyed reading about the pain you suffered...
Logged
Pages: [1]
Print
Jump to:  

Theme orange-lt created by panic