Sunday, 17 February 2008

It's a double-update!

Let's start off with what I did two days ago - level intros! Finally after many weeks of faffing with nonfunctional alpha effects and funky text boxes, I have a properly working level intro display with automatic word-wrapping and everything. You can see it in the screenshot on the right. I've designed this module so that it can be displayed in-game with a mere two lines once it's been imported:

intro_screen = Intro("Level number", "Level name", "Level description") intro_screen.ShowIntro()

Once ShowIntro() is called, the levelintros module takes control until it is destroyed when the user clicks "Start" (or closes the game window), so no event handling needs to be done at all whilst the level intro is running.

The second of today's updates concerns the custom levels system - levels can now be loaded in-game! Over the past two days, I've designed and coded a super-spiffy menu for doing just that. When you click "Load custom levels", a little vertical menu pops up on the right with a list of all the custom levels existing on the user's computer. And just in case they make so many levels that they go off the bottom of the screen, I've also written a method that scrolls the menu in the opposite direction to the mouse (as is used in the horizontal menu at the bottom) so that you can easily access all the items in it without any difficulty whatsoever.

Now, back to building levels!

Thursday, 14 February 2008

Finally, the level creation process begins!

After over two months of development, we've finally got to the level-building stage! And as promised, the levels can be made incredibly quickly thanks to Penuine's design. So far this afternoon I have made two levels, one of which you can see in the screenshot. These are both from the "retro" area, which takes place inside an outdated computer. I'm not saying how he gets there though...

Tuesday, 12 February 2008

Another day, another Penuine module...

This time a class that displays a "Level complete!" message which stays until you press a key. It's called by the levelcontrol class upon completion of a level, and looks very spiffy as you'll see from the screenshot. Pygame's per-pixel alpha capabilities are proving incredibly useful, they make some very nifty effects possible.

But that's not all that's been done! As well as this, I've got a new idea for the level intros screen which involves a cool text scrolling effect similar to the one on the main menu, but this time it's vertical and the text at the top and bottom is slightly smaller than the text where the mouse is. It'll naturally be incredibly difficult to code, but I've already made some progress - I've made a simple text wrapping system that takes a string and splits it into lines which are then made into an array containing text colours and positions as well. I'm hoping that this method will make it possible to animate the completely arbitrary number of lines necessary to display the story. The length of the algorithm for this is going to be ridiculous though...

Monday, 11 February 2008

Version 0.67!

Yes, we now have a version numbering system!
Well, a lot has been done recently. First off, there's a proper character sprite now! You can see it in the screenshot at the top.

Also, after A LOT of battling with Python, character animation is fully implemented! The character now slips, slides and even turns whilst you navigate your way around the levels.This was done by making a module which loads a filmstrip-style image containing all the frames of the character's animation, then splitting them up and returning them as an array. The character then sets its own image to the next in this array every few frames, going back to the first one when it reaches the end, so a cycle begins. When it stops, it stays on frame 1, and when it turns left, right or down the image displayed is rotated as necessary.

And last but not least, Slipinator (the level editor) is almost complete. The levels made with it are now playable in-game as well! So, now we just need a level intros system and then we're looking at the final stretch.

Friday, 8 February 2008

Project Penuine is still alive!

Although it may seem to be dead from the serious lack of updates recently...
So what's been going on to warrant such a lapse in blog activity? Well, not all that much, unfortunately. I've been mainly working on my new music website, Besides that, I've been documenting existing Penuine code with massive amounts of comments to make certain that the code is readable, and also doing some work on the level editor. As the level editor is the only change that is visible, I'll explain that now. Behold a screenshot! And you HAVE to view this one full-size to actually see it properly. Click away!

First, the visible stuff. I've done some new images for it to use, still a work in progress at the moment but they're basically finished. Also added is the option to turn off the grid which is overlaid onto the level. You'll see in the screenshot that there is now a nifty toolbox too, that's where the draggable character and finish point objects will be. You simply drag and drop them onto the grid, and it's done!

As the "Open level" dialog suggests, saving and loading of levels is fully functional too. Loading them in-game will prove problematic until a character and finish point can be added, but that's next on the list. Files can also be renamed, and the current level's title is shown in the window caption.

Right now I'm working on implementing holes, and then I'll finally get around to putting in the drag and drop functionality which will make adding the character, finish point and other objects possible.

Friday, 1 February 2008

Slipinator progress

Slipinator's the level editor, in case you were wondering. And it's starting to take shape! almost three hundred lines in, and we have a functional level canvas class that lets you place blocks on the level (with a grid to make it easier), and also drag and drop other objects onto. At the moment only the block editing is implemented, but it works perfectly! Here's a screengrab:
Click it to view full-size as per usual. At this point, clicking in a square will add a block there and clicking on an existing block will remove it (the latter of which took a very long time to get working). The graphics are still placeholders at the moment, as is currently the case for nearly everything in the game. But graphics will come as soon as level development properly begins.

Anyway, back one the subject of the level editor, the saving system is also working. It can properly create a level folder with the *.slf file inside, and append the name of the folder to a list of custom levels which is read by the game. Editing level properties isn't yet in, though, as we've not finished deciding on those. The basic idea is that there will be a level name and difficulty rating for each one (supplied by the user), and possibly an author. But that'll all come after the main challenge - implementing drag-and-drop!