Posts Tagged ‘python’
Resource file generator for Actionscript 3

Command-line tool that generates a single *.as file containing all the embeds of the folders passed.
An example of what this tool can make is found here.
This will help you if you, like me, like to store all your embed on a single “Resources.as” file. Every time I make a couple of assets I don’t want to add them by hand, so I run this application and it’s automatically done and embedded. It also handles *.tff (setting fontName and embedAsCFF=false as optional).
Usage
You can run resmaker -h to get the available list of parameters, but it’s really simple: you specify a bunch of folders where your assets resides (separated by comma), and where is the file Resources.as (will be created), and it will recursively iterate the folders. Remember to use always absolute paths.
For example, the sample I linked above was done using:
resmaker c:\Projects\LD22\assets -o c:\Projects\LD22\src\Resources.as
If you use it, let me know! It was originally made as a Python exercise, but as I found it very useful, I decided to share.
Viktor the Vampire lives on
We did not manage to finish our vampire platform game in time for the Jam, but we like the idea and have some nice art assets, so we’ll continue working on it over the holidays.
What went well
- We created a lot of art assets that we really like
- We came up with a cute game idea (vampire boy searching for teddybears in scary vampire castle), despite the challenging theme
- We even created some sound effects, although they are not in the game yet
What did not go so well
- Map creation and tile engine – we initially used Tiled for map editing, but had problems with implementing game physics on the loaded map data (some of our tiles are large (256*256), while others are smaller, which caused headaches). Eventually we wrote a tile engine and game physics from scratch, with some map generation code, but by then there was not enough time to finish the game.
- Not enough time to actually get to implementing the game logic..
What we will do differently next time
- Use an existing tile engine, or write basecode for one before the competition starts. There is enough work in game-specific code, no point in re-writing tile engines for each competition.
- Map creation in Tiled was straightforward, but time-consuming. We are trying out programmatic map generation from python now.
- Get a simple playable game asap, afterwards add more features and graphics.
Finally, a part of a room in the big scary vampire castle:
Submitted: Carry Meow Home
My game is done and submitted! The last hours were hectic, both in terms of trying to finish the game and because I had some stuff going on in “real life” of great urgency… so unfortunately I wasn’t able to do a lot of updating. Ah well… I’m here now! Here’s the entry link!
Brief summary and screen shots are included with the entry, of course, so I’ll use this space to mention some other things:
First, what went right: Most everything! I made a lot of lovely art, got most-all of my intended game mechanics implemented within the time limit, and got a playable game out of an already otherwise very busy weekend! I learned some new useful programming tricks and now have a MUCH better understanding of how to effectively use SpriteGroups in pygame, which helps greatly with streamlining code. Hooray for me! Also it’s my damn birthday, so double-hooray!
What didn’t go as planned? Well… I didn’t have any time for sfx/music, which would have been nice. I also wasn’t able to add all the text screens I wanted for a narrative, but that’s actually less than 10 minutes additional work there, so I’ll have it for a post-judging version. A few other little details: Cars on the road, maybe some time/score mechanism, possibly even predators? Hadn’t put any thought into that last one really… just an idea that existed. There’s also still some awkwardness with people’s movements that wasn’t fully polished and makes the games slower and more frustrated than it’s meant to be… I really want to redo some of their pathing logic when I get more time. I also didn’t have time to add a few little in-game decorations I was considering adding… wouldn’t have really made much of a difference except visually… and without the improved navigation it would have made things slower, so maybe it’s for the better.
OH YEAH! I also need to mention! Did you notice?! All the maps in the game are procedurally generated! Isn’t that awesome? Yeah. I’m bad-ass like that. Random roads, trees, buildings, ponds… people navigating between them… it’s pretty dang awesome. Sometimes you start out right next to Mommy… sometimes insanely far away; I would like to make that less random and perhaps make it something like a difficulty setting? Changing the map size and the number of each thing in it is trivially easy, so I could easy adjust for desired complexity.
Anyways, yeah. Please play my game if you haven’t yet! And vote on it! And more importantly, give me some feedback! I want to make the best games possible, so comments and constructive criticism are incredibly helpful for me. Thanks
How has it been eight hours since my last update?!
Where’s the time going?! I haven’t even slept! I need to do that soon… but my birthday starts in 17 minutes and I don’t want to miss it!
Game’s making reasonable progress – Player can move, and be moved… now I need to get map generation working, and various obstacle mechanics… and then the ‘plot’ narration and I should be about done? Oh…maybe sound at some point too?
So tired…
Here’s a couple screenshots:
Nap Time?
I’m starting to see posts about people waking up. This is probably a god sign that I should go to sleep, huh? I’ve got a lot of the code base put together now… but I still don’t have a solid idea of what my game will be! I do, however, have a solid idea for a project to morph whatever this is into after LD is over and I have more time? Go figure. Sleep usually helps clear up my thoughts, though, so… good night! And good luck!
Working alone and making progress!
I think I’m moving more quickly than I ever have before! I have a lovely screenshot!
The thing is… I don’t actually know what my game is about yet. That’s also not a real title… probably. Need something catchier. The real thing I’m trying to show here is that I not only have graphics up, but I have those little dudes! Who move around by themselves, and deal with colliding with one-another! It’s pretty sweet…
And here we go!
I’m getting started a bit late… got caught up in an important meeting at Occupy Tallahassee. Alone is the theme, eh? …I kind of hate it. We had “It’s dangerous to go alone…” only 2 LDs ago! Ah well, I’ll work with it regardless!
Just realized I forgot to state what tools I’m working with here! This LD, like my previous two, will be completed with Python, using PyGame, for all programming. For sfx I’ll probably use bfxr, though last time I also used a cheap mic and made some crude noises of my own. Music will probably not exist. Art is MS Paint, with the possibility of some minor Gimp work of I want to get fancy. That should be about it! I did ABSOLUTELY NO PREP for this, so I have almost no food or drink in my house, and many other inconveniences. GRAAAAAAAAAAAAAAAAAH! Brute force game design!
Good luck everybody!
What’s all this talk of kittens?
AAAAAAH!~ Why is LD always on the most weirdly-timed weekend? The first time I participated I was in the middle of moving! Last time I was just about to start a new job! This time… Sunday is my birthday! Yet…. I’M IN! That’s right, folks – I’m spending my birthday making an LD entry!~
So… Like many people, my life tends to be pretty busy, and I don’t much keep up with the LD community between compos. I wasn’t even able to participate in voting this time, except for the final round… and there’s some kind of [joke?] drama about kittens? Fill me in, eh? Or not. Just give me a theme, and I’ll give you a game! ‘Cause that’s how I roll! See you in the IRC room… if my client ever loads?
I’m in this year!
Right, I’m in! This is my first year of ld, so don’t expect anything special.
I’m (probably) going to use:
Pyglet + Pymunk + Python
and I’m developing on Linux
My development will be done in https://github.com/kragniz/ld48-22
Good luck all other contestants!
I’m in for Ludum Dare #22.
This is my second Ludum Dare, I did reasonably last time, so I hope to improve upon that result this time.
Code: Python
Libs: SFML2 with the Cython bindings.
Audio: I’m thinking of making some stuff with my rock band (yes, the game) instruments, if I get the time extra, might be something a little interesting.
Graphics: The GIMP and what little skill I posses at art.
As with last time, I’ll get Linux and Windows builds made, along with source code for those that want it.
This time, I’m actually deciding to do this in advance, so got a timelapse program ready, and done an I’m In video. I’m also at Uni this time, not home, which is actually useful as I have more room here. Just before the start I’ll upload some pictures of my desk space.
Jailed by the Ministry of Project Management – Post Mortem
After having improved the level generator a lot, I think it’s the right time to write a post mortem of my game.
What went right:
- Game idea: At first I was disappointed with the theme, because I had some nice ideas for self-replication and genetics. But with the morning shower there came several interesting ideas. First idea was some sort of swarm attracting rescue game (still self-replication minded), second was a rpg in which you try to escape your chosen role (e.g. only get xp for things you are bad at) and the third idea was the actual one. I chose the later because it was the easiest to implement.
- Tools: After warming up with python and pygame in the Mini-LD shortly before LD21 I felt very secure with the programming. Gimp, bfxr and Musagi also worked great.
- Time management: Almost all the time I felt just a little bit ahead of my schedule which really is a great feeling (should once happen in my everyday job)
What went wrong:
- Final improvements: I head some plans to further improve the game: better soundtrack, improved graphics, more player control over level generation. I even had the time, but as my wife and child came back home on Sunday my time for game development suddenly vanished (that’s not as bad as it sounds
) - Windows executable: Meh, stupid py2exe. Just didn’t want to automtically bind the sound libraries. Actually that’s just a small issue, cause it wasn’t necessary to have this executable at Sunday night, but I was so eager to release it in time.
- Randomized levels: I made a rather late decision to do randomized levels instead of pre-designed with raising difficulty. I am quite happy that I chose the randomized approach but my algorithm was to stupid to have real control over the difficulty (explanation here). I fixed it for now, which I want to illustrate with two screenshots.

Developer's "see all" mode: On the left the old generator on insane. Number of cages and cacti walls are quite random. On the right the improved version. Fixed number of cages and walls with random distribution.
Will there be a post-compo version? Definitely, there already is (not yet online) and I am planning to do further improvements based on the feedback so far. Ideas include:
- Different play modes (e.g. visible cages with other constraints than now)
- Kind of dungeon crawler with inventory and classes
- Integrate the dungeon crawler to a bigger scale exploration game (to prevent stupid descend dungeon levels)
Final words: If you haven’t already:
Go Play
Abigail’s Descent – postmortem
[ Play Abigail's Descent | gameplay footage ]
My game’s a platformer where you descend around the outside of a cylindrical pseudo-3-D tower. It’s nothing groundbreaking (I’ve seen the tower mechanic in at least 2 other games) but I still felt like I put enough into it that it wasn’t completely derivative.
I don’t usually have trouble coming up with an idea that I like. I started on the tower mechanic 21 minutes into the competition, and I had the rest of the gameplay in mind within a couple of hours.
I think I made the right choices about which features to cut and which to keep. Some highlights:
- I’m really happy with the 2.5-D tower. This obviously was not trivial to implement, and it turned out pretty well. I wish I could have made the platforms look better, but nobody has complained yet.
- I like the grayscale characters. It reminds me of Paper Mario. Feedback has been mixed.
- I really like the clouds. Nobody’s commented on them, but I think they do a great job adding to the 3-D effect and they only took 20 minutes to add.
- The dialogue/story is good, but I wish I could have spent more time on it. The knight was originally only going to be in one level, and I had other characters planned.
- I think I got the challenge level just about right. I followed my rule of thumb of making it 1 to 2 levels easier than it seems like it should be. Some players still thought it required pixel-perfect jumps, though in reality every horizontal jump has at least a 14 pixel margin of error.
- People don’t like jumping games, I know. I really like to have as simple of mechanics as possible and make the most out of them. I think if your character can jump, you should have some challenging jumps. I hope that the frequent checkpoints helped minimize the frustration.
- The sound and music are fine. I may some day be able to make my audio rather than just using whatever comes out of sfxr and Autotracker-C. But until that day, I’m grateful for these amazing tools.
I had a great time this LD, and I was pretty happy with how the game turned out! It’s already gotten twice as many ratings as my last LD game did during the whole competition, so I certainly can’t complain about that. So far I’ve gotten very constructive feedback.
Thanks to everyone who took the time!
Strategy Guide and Tech Talk
The compo is over, my game is finished and the rating starts. For anyone trying out my game (if you haven’t yet: HERE), I will explain some strategies to survive, just in case you have trouble with it. Additionally, as I tried to get some advice from my wife for setting up the level generator yesterday evening she wasn’t really enthusiastic, to say the least. So for anyone more interested in the tech behind I will explain, why the level generator currently doesn’t work that good for providing difficulty.
The game mechanic basically works with to values that decrease as long as you are digging tunnels (and even when passing existing ones). The first value is food/hunger. You can find three different kind of food which will give you 5 to 15 points back. Food, if there is any, is only revealed if you enter a cage. By that, it is often necessary to leave the direct path and search adjacent rooms if you are low on food. This strategy also has a second benefit related to the second value, hope.
Hope is generated by spotting new cages around you. So progressing the level is the key to prevent death by starvation. The hope mechanics leads to another point. Often it is better to move to the center of the level because chances for revealing cages is better in free field than at the level borders. This seems contradictory to the aim of getting to the upmost row or the rightmost column which are the only places to escape the level later on. Remeber that you can see 2 spaces horizontally and vertically and one space diagonally (not if you are digging). So if you already are two rows below the top border and there is no cage above, you won’t find any if you dig that direction.
The cacti walls are revealed by digging, so sometimes a tunnel can give further information for planning your path. This only applies if you have enough food/hope left.
To summarize the strategies:
- try to reach upmost row or rightmost column of the cages but pass the center of the level
- don’t dig to places where there can be no cage (2 spaces between player and border)
- don’t hesitate to search rooms for food
- progress to keep your hope filled

Headed to the center and didn't took the direct path to replenish food and hope. Else I would have died short before exit (Difficulty: Hard).
With that you should be able to beat all difficulties after some tryouts. At this point the random generator sets in. The design I used is rather insecure in providing the difficulty level. Instead of spreading a fixed amount of cages for each difficulty, I implemented to check a percentage to set a cage for every field of the grid (e.g. 33:67 that there is a cage on a field in normal mode). Instead of filling one third of the level with cages, this leads to very unsteady number of cages. By that, an “insane” level could have more cages than an “easy” one. Same applies to walls. By that the difficulty selector is a rather vague adjuster. But nevertheless you will notice the difference if you give it some tries (one playthrough is quick; around 15 seconds). So go and play. Good luck.
TL;DR:
Just a game design related teaser for the post mortem coming soon.
It’s a wrap! Or maybe some kind of burrito?
Woohoo! Got it done and submitted on time! See my entry HERE!
This is my 2nd LD, and the first one that was really complete, so I’m quite proud of myself! I was going to do a full write-up, but I’m just too exhausted. Maybe tomorrow?
A few comments though:
The AI needs refinement. There’s only so much you can do under the time limit… and even less when you don’t actually know the game well enough to have a good strategy even for yourself, no less for a machine.
That said, the AI is pretty competent at Defending, despite sucking at Attacking.
I forgot all about running the whole screencap video thing this time! Eek!
Most of the sounds are me screaming or bashing things into my desk.
I am going to look into what it would take to refine this for an android/apple app!
Aaand… yeah! Good job everyone! I look forward to actually being able to participate in the judging this time; something I completely missed out on last time. Hundreds and hundreds of games to review! Eek! Too much fun!
Game over
Escape the Fate, a suicidal puzzle game, is now done with a handful of hours to spare. I’m surprised I made it considering the roadblocks. It was certainly a motivating experience and I’m willing to do it again.
Not right away, though.
Escape the Fate: http://www.ludumdare.com/compo/ludum-dare-21/?action=preview&uid=5551
Jailed by the Ministry of Project Management
My butt is now even taller?
Gettin’ that polish going!~ I’ve added a title screen, as well as a way to control if a Human or CPU controls each of the two sides. Also my AI is getting smarter! It’s still quite beatable; my search depth is… next to nothing really, so it only gets as far as predicting your next move and making some vaguely intelligent guesses as to what kinda of things improve its position. I’ve still got about 6 hours though, and pretty much the only thing I’ve got left to do aside from AI improvements is adding some movement animations to help see what’s going on. I’m actually at a point where I’m about to ask some IRC peoples to help me test. If you’d like to help with that just let me know; I’m Luthwyhn in IRC.
Here’s a shot of my title screen!
I hope everyone else is getting done too! I’ve been too busy to keep with with chat more than occasionally. Keep up the good work, though!
Beaten by my game
Almost won this level after quite a journey. I was running low on food and hope for some time and couldn’t find a way out. Finally I came to a cage which could lead me to my escape. Then I dug into cacti just before the exit right from the green arrow in the screenshot. With hope and food almost at zero there was no chance to get out via another path.
Tall Butt is Completed*!
Yes, you heard right, folks! My game is a completely playable implementation of Tablut as of about 9 hours ago! There’s a few minor things it doesn’t do (warn you for Check/Mate), and plenty of places that can be polished (Movement animations?)… but the game can indeed be played! Currently, though, it only works as a 2-Player game. My goal with the remaining ~15 hours is to implement a mildly competent AI system who can play as the Attack and/or the Defender, at your own choice. Currently the AI moves at random until and unless it has a move that will allow it to win immediately, in which case it takes that move. It’s not much, but it is indeed a start! The visuals have changed just a little since my last update, so I’ll post a new screenshot as well:













