pycron

LD15

Hello, World!

I’m very happy to be competing in LD48 this time around! :-)

I’ve competed in Pyweek twice, but that’s all the game development compo experience that I have.

This compo fits rather nicely into my schedule, as well. The last two days before my college classes start! Woo! 😀

I’m a community college student majoring in computer information systems.

I love Python, C++, and occasionally a bit of Ruby. SDL is my first pick for libraries, especially for compos.

I enjoy playing shooters (Though I’m mediocre at them :-/), Mario Kart, and a few other games.

—-

I’m looking forward to the compo 😀

Here’s to fun, games, and having one while making the other.

—PyCron

Preparations for the Compo

Edit: Realized that it would be foolish to assume everyone can run a pygame program, and instead decided on C++

Strategy:

Going simple. Most likely a top-down shmup.

Hoping that flow wins, so I can go all pedantic with Flow Theory.

Going to go with my “normal” sleep schedule, which is very strange, but seems to work well for me. (Bed at 6-8 PM, up at 1-2 AM) (Still technically enough sleep)

Tech:

SDL, SDL_image, SDL_mixer, and… for love, honor, and glory…

C++ 😀

(Well, I’m actually tempted to do it in C :-P)

I’ll use SFXR for sound, I think. (Played with it, really like it :-D)

I’m not sure about graphics. Really depends on the theme.

Either GIMP, Inkscape, or procedural stuff using pygame.draw.

Food:

Overall — Lots of fiber. Helps me think clearly.

Snacks — Cereal bars, high-fiber ones. Also, fruit. Oranges, especially.

Meals — Oatmeal, rice, and salads

To Drink — Water, coffee, and a little bit of soda.

—PyCron

Progress at the 1/3 Mark

So far, I’ve got a little robot that runs around.

She has a gun, but it doesn’t do anything yet.

Here’s a picture:

She can run, but her gun doesn't work :-(

She can run, but her gun doesn't work :-(

I have decided to go with the idea of using more than one theme.

“Cavern” will be covered by the setting (Once the terrain is in place)

“Guns. Big Guns.” is apparent. Well, the gnomes will have bigger guns because they are bigger. My pigtailed android is actually quite tiny, but it doesn’t show because there’s nothing to compare her to at the moment.

Which seques into “Evil Gnomes”. These are the enemies. They are much bigger than you, and can step on you as well as shoot you. They are rather slow, though, and can’t fit into every space that you can. Their guns also aren’t terribly accurate. Well, that will be true once I actually make them.

“Kittens” is a secondary mechanic I’ll put in if there’s time. The kittens will be somewhat smaller than you, but able to attack the gnomes. Kinda like the security guards in Half Life.

That said, the environment… Might be hard-coded, but if it is I’ll place enemies (And kittens if I put them in) randomly.

If I have time, I want to generate them procedurally, where you have to kill all of the gnomes to move to the next level.

All that being said, it’s rather bare-bones now, but I’m aiming high. :-)

———

One of the core mechanics that I’m using is an unusual relationship between the size of the player and the size of the enemies.

This creates an interesting effect, because the player must use their speed and wits to succeed. (Heck, even to survive!)

The idea of size has always fascinated me, I admit. Very large things have an air of power and… Even authority about them.

By contrast, very small things have a charm that I can’t resist. They have a quality of efficiency and grace.

The next upload will have baddies and working weapons, I promise.

If you want a completely up-to-date version, you can get a subversion snapshot at my GoogleCode site: http://code.google.com/p/pycron-ld48

Note that this will be updated fairly often as the project picks up steam. :-)

So… Not a waste, but certainly not much.

Here’s to challenge, triumph, and learning from hardship.

—PyCron

Day 2 Update

I’ve got enemies (Who stand there and get shot…)

They die, though! (Well, they disappear…)

I’ve got a camera, too. It works very well, even not blitting things that are off-screen.

(I’m glad I’m using a library that I’ve used a wrapper for! The concepts are familiar even if the language isn’t!)

They're Huge! O_O

They're Huge! O_O

Oh, and her gun works now!

Less QQ, More Pew Pew! OwO

Less QQ, More Pew Pew! OwO

I… Haven’t gotten much sleep. I fell asleep in the bathroom last evening, and woke up a few hours later just awake enough to not be able to sleep.

But, it gave me time to implement some things.

Then I tried using MinGW from Code::Blocks. (In Linux, no less)

That didn’t go too well, as the Linux version of Code::Blocks assumes that you always want glibc, which conflicts Extensively) with windows.h, which defines the schmutz that you need from WinMain, which Windows, monkey OS that it is, demands!

I’ll stick in preprocessor bits to allow building on Windows, as well as a Makefile after I’ve got the thing done. If I can’t get all of it done by tonight, I’ll just port it tomorrow morning. The rules allow that, if I recall correctly.

All in all, I can almost guarantee a game by the end. I have very little left to implement, so the only major undertaking will be the world generator, which is actually fairly likely to be done by tonight! Yeah!

Here’s to things working out, despite all of our troubles. :-)

—Akake

Comments

30. Aug 2009 · 12:02 UTC
Looks really nice!

They can Hurt You Now

A quick update, my baddies can now fire their guns. And they can kill you!

My next task is to code up some explosions, and then terrain. Explosions shouldn’t take long, as they are simply graphical. :-)

After that, terrain! Then I actually have a game! Yow!

—Mr. Dude

Down to the Wire — World Generator

I’ve finally moved on to the elephant in the room. (Well, in my room)

The world generator.

It will work as thus:

The world is a square grid that is 600 tiles on each side. The outer 50-cell border is always filled with wall tiles.

The grid is stored as a two-dimensional array of ints. These represent the various objects (Or lack thereof) that may be located on that space.

The generator started by carving out 10 rooms, which are rectangles that are 20-80 tiles on each side.

Each room is limited to its own area in the map, and those areas only have a little bit of overlap. This keeps rooms from clumping together into an uninteresting level.

Then, twenty large tunnels are carved between the rooms. The generator will take care to make sure every room is connected in this way. These tunnels are either vertical or horizontal, for simplicity.

After that, twenty-five small tunnels are carved. Fifteen of these go between rooms, and ten go between large tunnels. These are also either vertical or horizontal. These tunnels are too small for enemies to get into, but the player can easily fit into them.

Then, the rooms and tunnels are carved into the grid.

The generator then puts 1 or 2 enemies in each room, except for one. That one will not overlap other rooms, and will always be 20-40 tiles on each side.

Then, it decides where the player starts. The player will always start in the room without enemies, but the generator decides where in that room the player starts.

Finally, the generator will pick between 50 and 200 tiles to place a passable floor tile on, to add a bit of detail to the cave.

Once the grid is laid out, the generator parses it into a world. It runs through the grid left-to-right and top-to-bottom.

When it encounters a wall tile, it creates a terrain tile object, then checks the area around the point it found the tile at.

If the tile is bordered on every side and corner, it is placed into a vector of passable terrain tiles. These will not be checked for collisions in-game.

Otherwise, the tile is placed into a vector of massive terrain tiles. These are the ones that will be checked for collisions.

The outer edge are always placed into the passable vector. After this, everything is handled by the parsing code.

When it encounters an enemy spawn point, it makes a baddie at that point, and then sticks it into a vector of baddies. These are, of course, your enemies.

When the parser encounters a floor tile, it makes one, and places it into the vector of passable terrain. This simply makes sense.

When it encounters the player start point, it records the point. This is passed to the main loop with the objects, as the main loop builds the player itself. The main loop also records the spawn point for each enemy.

Then, the game begins.

If you die, the terrain is saved, and enemies are placed in their original points. The terrain is preserved.

If you defeat all of the baddies in the cave, there is a short delay and a victory sound plays, then the game generates a new world, and the cycle starts anew.

In addition, if I have time, I will put in a health bar for the player. This should be useful. :-)

Here’s to pulling through in the face of the deadline! 😀

I hope…

—Akake

Byte Vs. GNOME — Post-Mortem

This was a fun experience. Tiring, but fun. I originally entered to warm up for Pyweek, but I found it very fun, and will certainly enter in the next one. (And probably some Mini-LDs :-D)

That said, I dreamed too big, and wasted alot of time.

I stuck with something I knew I could do for my core mechanics, however. In the end, I didn’t have time to put in terrain optimizations (Well, okay, I didn’t have the willpower), and my random world generator became to troublesome for the time-frame.

I’ve discovered a love for both C++ and top-down shooters this weekend, however. I certainly enjoy working with both, and will continue to do so.

Overall, it’s a game. It’s kinda fun, and has something of a challenge to it.

It’s not what I planned, but I’m happy with it. :-)

What Went Right:

  • I stuck to a set of mechanics I knew I could implement
  • I used collision logic that I was familiar with
  • I paid close attention to my pointers
  • I decided to farm out request a Windows port from the community, in the topic PoV put up
  • I never gave up. This was a first for me in a game development compo. Not having enough time to helped, though.

What Went Wrong:

  • I was too ambitious for my lack of familiarity with my IDE, the language I used, and the library I used.
  • I assumed I knew where the several segfault bugs I ran into were coming from, only to discover that the cause was something very simple that I’d overlooked.
  • I had to hit the code with a hammer in a few places, and it shows.
  • I underestimated the complexity of a random world generator, and didn’t leave anywhere near enough time for it.

I’m happy, though. I made a game in 48 hours. In C++. And straight SDL.

This has been the most fun I’ve had in some time! I look forward to the next one! 😀

Here’s to having a good time, even when we don’t succeed.

—Mr. Dude

I Forgot to Add These Last Night…

I’ve uploaded a fixed version of my game.

Late last night, but still well before the deadline, I fixed several bugs, including the segfault.

I also added a few more enemies, and they now respawn when you kill all of them.

This was completed about two hours before the deadline, but I forgot to update the package on my computer last night.

I’ve been told that it’s okay to upload this, since it was done bofre the deadline, so long as I also offer the unfixed version.

—Mr. Dude

Ack!

I realized moments ago why my final submission wasn’t the fixed one.

I had forgotten that Code::Blocks keeps its binaries in a separate path.

That happened with my upload of the fixed version, so I swapped things around real quick.

Now I’ve uploaded last nights fixes! X-D

Why I Don’t Have a Windows Port

No, it’s not some kind of Linxu elitist thing.  😉

I’ve been feeling very ill the past few days. I apologize to anyone who wanted to play my game but couldn’t. I’m really sorry. :-(

I seem to have come down with some sort of flu. I’ll be okay in a few days, I think, though.

I would really love it if a generous person could create a Windows build.

I’m sorry, but you’d have to set up the compile yourself. I used Code::Blocks, and didn’t have time to write a Makefile.

I still had a great time, and I’ll be here again next month, ready to try again! :-)

—Mr. Dude

Comments

mjau
05. Sep 2009 · 13:27 UTC
Hey there Mr. Dude. As I said in my comment to your entry, your source link is broken. Kinda hard to port the game without that..

Source Download Link Fixed

It’s a little late in the game, but I’ve fixed my source download.

This should help my case a bit in getting a Windows port. 😛

Preparing for Mini-LD 12

I know it’s just under a week away, but I’ve got some ideas for my Mini-LD 12 game.

First of all, I’m going to use another programming language I’m unfamiliar with. It’s a fun challenge. This time, I’ll be using Ruby.

I’ve used it before, but not often, even though I really enjoy it. This gives me a chance to really get familiar with it.

My library of choice here is Ruby/SDL. I’ll fiddle with gosu/RubyGame at a later time.

Also, I will be using nothing but my netbook for development. I want to see how it fares with development, and Ruby is a good starting point for that.

As far as genre goes, I’m thinking about making a tile-based side-scroller. Something akin to the shareware of yesteryear.

I want to use an 8-bit pallette to give the game that classic shareware look.

I will also be using SFXR (Like most of us, I suppose) for sounds.

I’m not sure about music. I don’t think I’ll really have time, but we’ll see.

I may need a Windows port again, but I’m not completely sure how to convert a Ruby application into a native executable. 😛

I’m looking forward to this one.

—Mr. Dude

Comments

06. Sep 2009 · 12:54 UTC
I don’t know about Gosu, but I’ve successfully built windows executables from Ruby/RubyGame using tar2rubyscript and rubyscript2exe (both exceedingly awesome gems). It’s not the best (e.g. it’s not Py2exe) but it works pretty well.
06. Sep 2009 · 17:34 UTC
I’ve definitely had great luck using rubyscript2exe on Gosu games too.
MrDude
06. Sep 2009 · 19:36 UTC
I’m using Linux. I don’t have full access to a Windows machine.

Windows Version is In!

Many thanks to mjau for porting my entry to Windows!

So far, it’s only been tested with WINE, but it should work okay.

Sorry it’s so late, but my source link was broken, and I was absent for a while, so I didn’t find out until a couple days ago. ^_^;

Still, it’s there now! Yay!

A Post-Compo Revisit of Byte Vs GNOME

Edit: I’ve gotten the GoogleCode page up!

I’ve decided to keep working on Byte Vs. GNOME.

I’ve recieved some encouraging comments, and feel that it could become something really nice with some polish.

I’ve got the following planned:

  • Actually making the random world generator
  • Multiple weapons, including a machine gun and a rocket launcher
  • Multiple types of enemy, including bosses
  • Activators including doors, retractable bridges, and switches
  • The game-type bits that were missing from the compo version, like a health bar and a score counter
  • User-configured key bindings
  • And perhaps even more as it evolves

I’m currently tearing my code apart to allow it to be extended. This is the most troublesome part, after which Good Things can happen.

I’ll be making a GoogleCode page. Once it has gotten reasonably nice, I will likely make a SourceForge page.

Here’s to having a good idea in a crucible, and then refining it into a jewel.

—Mr. Dude

The Plan (Harebrained Scheme) for Mini-LD

I’ve made my decision.

Unless the theme is something really, really interesting, I’m just going to ignore it and do something else instead.

Why not? After all, Mini-LD is just for fun!

That said, I’m more than likely going to ignore the theme.

Instead, I want to make a 2-day roguelike in under 100kB.

I will be using C, NCurses, Vim, and GCC.

I’m very excited about this.

—Mr. Dude

Comments

Tenoch
11. Sep 2009 · 16:46 UTC
Is NCurses portable? I don’t mind, but windowsers will.
MrDude
11. Sep 2009 · 18:18 UTC
No, it’s not. You have a good point.
Tenoch
11. Sep 2009 · 21:50 UTC
Hey, I think PDCurses is what you’re looking for then.
sf17k
12. Sep 2009 · 02:00 UTC
100kB is a lot

The Plan: Using Wikipedia in a Roundabout Way

Because I lack the coding chops to access data from a website in my game, I’m going a different route.

I was in IRC lamenting my lack of ability with regards to the theme, when GirlFlash suggested that I simply pick a topic in Wikipedia and run with it.

With that, I’ve chosen m’topic.

Yes, River City Ransom. A clone of it!

I’m going to make it as true to the original as possible without it actually being the original!

(EDIT: I’m actually leaning more towards Python/Geany/Pygame right now, so I really don’t know ’till I write some actual code :P)

And I’m doing it in C++! In Code::Blocks! Using SDL!

Here’s hoping…

—Mr. Dude

More Idea Waffling

I’m still having trouble deciding on my idea. >_<;

The RCR clone may not really be what I want to do.

I’ll post again when I have something to show for my efforts. Until then, I’m going to refrain. I just thought I’d get this out so I don’t feel so obligated. 😛

—Mr. Dude

Remaking My Game in Ruby

I’m currently working in Python, but I’m finding more and more that I kinda… Dislike it.

I’m going to start remaking my game in Ruby. I don’t have a whole lot of code right now as it is, and I’d be much happier working in Ruby.

That said, there’s a pretty good chance that I won’t finish in time. I’m going to try to have something by the deadline, though.

Edit: Using Ruby/SDL instead of Gosu. Prefer raster to sprites-on-polygons… :-/

I’ll be using Ruby/SDL for my graphics, sound, etc. SDL is one of my favorite libraries, and has yet to let me down. I’m not sure how it is with rubyscript2exe, but it should be fine.

Read on for more explanation, if you’d like.

I have found myself more and more draw to Ruby as of late. It’s strange.

I’m not sure why. It’s… Beautiful.

Maybe I’m getting too emotional about this. I feel very strongly about this, though.

I’m going to be coding more in Ruby in the coming weeks. I want to see if this is really for me.

In other news, I’ve decided to remake Byte Vs. GNOME in Ruby, as well.

The code is just too hairy to do much of anything with.

Work on Byte Vs. GNOME will continue alongside OpenRansom after Mini-LD is over.

I’m not going to make huge plans at the moment. I’m just going to start working, and try not to look too far ahead or too far back.

Here’s hoping.

—Mr. Dude

Rethinking Ruby and Romancing About Languages

As the title would suggest, I threw away a good portion of the day on my romantic, emotional choice to redo everything in Ruby.

I… had a wakeup call. Using Ruby/SDL was my reality check.

In short, the thing threw tantrums at random, denied having methods that the manual listed, and generally misbehaved.

I’m not going to sit here and rant. I’ve got things to do. I just want to take back what I said in my last post.

I’m sorry for all this emotion, but I get alot more wishy-washy when I don’t feel as much pressure. (IE: When the game doesn’t count for a score, and I plan on working on it past the compo anyway)

I’ma shut my trap and get back to work now.

Peace.

—Mr. Dude

Comments

philomory
14. Sep 2009 · 12:36 UTC
If you’re still interested in trying out ruby, but want to drop Ruby/SDL like a bad habit, I highly recommend checking out Gosu: libgosu.org
philomory
14. Sep 2009 · 12:39 UTC
Aaaand I realize now that you already considered Gosu, but chose Ruby/SDL instead. Me not reading previous posts FTL.
ippa
14. Sep 2009 · 18:21 UTC
I was about to mention Gosu too since it’s fast and very poweful (used it for my entry) .. and then I read philomorys comment. What exaclty do you mean by “Prefer raster to sprites-on-polygons” ?

Forfeiting Mini-LD — I’ll finish my Game Tomorrow

I’m forfeiting from Mini-LD. It was fun, but I’m tired, and likely won’t get a game together.

I had alot of fun, once again, but this time I just lost too much time dicking around with things that didn’t work out. :-/

Oh well. I’ll be posting a link to my game tomorrow, once I have an actual game.

I got alot done, all things considered. I got a 3D collision engine, mapped 2D images to 3D collision boxes, and got a little dude running around, punching and kicking.

Tomorrow, I’ll add enemies and a camera. Then, a scoring system, and so on.

Today, though, I’m just too tired. I need to rest. I’m not happy about it, but it’s just gotten to be a real struggle for me.

It’s been very fun. I’ll still be around on IRC, and will probably post updates on OpenRansom as I add to it. Less frequently than I did over the course of today. ^_^;

Well, it was fun. Time for me to call it a day.

—Mr. Dude