Thursday, July 31, 2008

Day 20: You can delete!

It is now possible to delete stuff in your mapeditor! It took me a good two hours to code out the functionality and then debug and fix it. Along the way, I made an improvement to the map engine's camera. You can save it and then reload it to see if it work.

I also learned that integers are immutable. Bumber!

Then the rest of my time are spent on figuring a way to display these characters and items graphics on the object chooser so I can get started on adding support for modifying the map. They don't work quite the same way as the map engine do. By the end of my 4 hours effort, I think I was quite close to finishing the mechanism for drawing these images.

A Roadmap

In order to keep the development of various projects from stagnating for a long period of time as well having a fresh release every so often, I devised a roadmap at the KibaBase wiki to follow.

The roadmap assumed that 28 hours are needed to complete each projects' goal. Thus a week is needed to achieve these goals, which is intentionally chosen for the purpose of having a release every week. Also it alternate between game tool development and game development to balance the need to create games and the need to create tools that will help create games.

This will hopefully achevie a sense of direction and progress as well keep me focused on what I need to do in order to achevie the goal of self employment by writing free games.

Wednesday, July 30, 2008

Day 19: Kept getting interrupted

I kept getting interrupted by my parents for task that they want me to get done. This mean I had to restart the hour I am in before it is an hour to me for sure. Nonetheless, I managed to get the 4 hours done and lot of commits in.

Here is the stuff that I accomplished and work on:

The typing system work now and you can use it to save your file. It even send a message to LoggerUI about the fact that the file has been written to disk.

The object of choice you want to stamp are now displayed. You can even change the object that you want to stamp. I still need to add support for characters and items though.

Tuesday, July 29, 2008

RubyWeekend #2 Postmortem

Here is my postmortem for Playground Wars for the RubyWeekend #2 contest. I hope it will be useful for future RubyWeekend newbies and veterans alike as well present day RubyWeekend pioneers.

What went right:

1. Getting an art partner is a very smart choice, especially if he/she is good. Qubodup is good and he free up my time so I can program. Division of labors kick butt!

2. Prior to the contest, I spent at least 30 hours on the KRPGE engine for the purpose of writing RPG games. Nonetheless, it was quite adaptable to RTS format. Plus, most of the map stuff has been done for me. I had to modify it so it can support terrain images. This free up my time to work on gameplay features. Code reuse ROCK!

What went wrong:

1. Choosing the wrong ideas can be fatal, even if the idea is a good idea. It need to be implementable in a short period of time. I think the lesson is clear here: DO NOT! I REPEAT! DO NOT attempt RTS games in a 48 hours contest. There is no way you're going to implement all the units, the tech tree, the whole 9 yards of features and test, blanace them all, let alone a stripped down RTS game.

2. Do not jeapodrize your contest entry with a bad sleep schelude. 4 hours of sleep each is not enough. Please make sure you get plenty of sleep before the contest start. It might not hurt(Actually it probably does) but you need every bit of energy and focus you can get. I was very tired so I stop coding several hours before the contest end.

3. Communication is hard. Time and time again, I learned that the communication of ideas is rather faulty. For example, Qubodup told me about a bug and I didn't realize what the bug is about after the contest. Qubodup and I had to explain our ideas to each other repeatly or correct misinformation each other have. For example, I didn't realize that Qubodup was asking about the whole map resolution, not the indiviual resolution of map terrain images.

What I Would Do Differently:

1. Write more engine code. Having more code that you can use to create games is a good thing, as well let you focus on writing games instead of writing an engine.

2. Complete the map editor or any other tools that you will need first. It does you no good to have a very difficult map to edit when you got better things to do.

3. Try to choose a less amibitious game so you can actually complete it and have a better chance of rocking everyone's boat.

General Thought About the Compos:

We need a RubyWeekend site, seriously. And advertising. Lot more advertising. We advertise quite a bit more this time around, but apparently that is not enough. We got the same amount of entries as last time(7 of them).

That is all.

I am out!

Day 18: Engine Bugfix and Completed Map Display

For Day 18, I divided my effort among several features of the mapeditor.

First, I worked on displaying the map. Then I wrote the code that eliminate drawing the majority of maps on the object, making sure that it only got drawn on the proportion of the screen. This has lead to engine code cleanup.

Next, I worked on integrating the map stamp into the engine's camera. There I have to fix a few bugs relating to the synchronization of the objects. I also have to write code for objects that does not inherit the Character class so that the map stamp can work.

Lastly, I worked on implementing the frame rate for debugging and performance analysis purpose.

12 more days to go than my 4 hours experiment will be completed.

Monday, July 28, 2008

Day 17: Resume Work on MapEditor

Today, I resume my work on the mapeditor part of my KRPGE framework.

It now load the map for editing and the editing stamp has been implemented.
Beyond that, I reused the engine code in preparation for display. There is some cleanup work on LoggerUI and the EditMode class.

That conclude Day 17 of the productivity experiment.

I expect to display the maps for tomorrow and start implementing the editing system.

Sunday, July 27, 2008

Release Log #2

Hi, you can download Qubodup and me's RubyWeekend contest entry from the Kibabase wiki.

It is a very incomplete first version of the Playground Wars real time strategy game. I gave up finishing the game for the contest, but I submitted it nonetheless.

Description: The opposite sexes has decided to go to war over the ownership of the playground!

RubyWeekend 2 Log #7 Disappointment

I gave up.

Apparently, I couldn't achieve what I did last time. This contest is a major disappointment for me.

There is probably a lot of reason why I couldn't finish it. Lack of sleep, lack of willpower, too ambitious, etc.

Whatever the case, qubodup and I are too crazy. Maybe someday, I'll be able to code a whole RTS game within 48 hours.

At this point, I am just an angry programmer. I don't want to code more.

RubyWeekend 2 Log #6 Time to Panic?

Now, I am almost finished with the resupply mechanism. I just got a few bug to iron out. Once that's done, it is also done for the girl resupply units as well. I will be adding the resupply girl unit after this.

Today is the last day and I still haven't finished all the gameplay work, never mind pathfinding, AI, state of being, etc. And I got about 12 hours left to finish this game. I think it is time to PANIC!(Code frantically)

Saturday, July 26, 2008

RubyWeekedn 2 Log #5 Progress So Far

I got point and click system almost done. It is just that it needs to notify the player whether if someone is selected or not. I am working on providing that indicator.

I also worked quite a bit on the energy system and the resupply game mechanic that goes with it. The SupplyBoy just needs to know how to retrieve energy source and then deliver it to the intended destination.

Qubodup worked to get all the units done as well upgrade the map. He is currently working on adding the state of units(KO and asleep).

RubyWeekend 2 Log #4: SWEET!

Qubodup finished his terrain map. It got too much water though. I also have to fix rendering and camera issue with my map engine.

Meanwhile, I finished moving around the map with the mouse functionality. It can even invoke a character to respond to the mouse click.

Now, I am working on point and click so I can move these units around.

Friday, July 25, 2008

RubyWeekend 2 Log #3: Do You Seriously Want to Continue This Insanity? You Cannot Save After This.

Qubodup and I have a discussion on whether or not we should ditch the game design. Since we don't have any better ideas, we decided to say yes to the question of whether or not to continue our insanity.

To compenstate for our insanity, we scale down our RTS design. Many of the features are simply cut outright in favor of completing the game in time. We can alway add them back into the game later. However we will suffer gameplay quality loss.

The biggest obstacle we see is probably pathfinding, since I have no experience in writing such system. It will probably be the most time consuming and difficult envendor that I have to do.

I managed to finish the game's terrain system and the game terrain map is currently being designed. But to me, this is not a lot of progress. I felt that we fell behind already. Completely my fault since I have to code all the features.

RubyWeekend 2 Log #2

I am coding support for terrains so it will be replacing the background image. I also have some problem with git but I figured it out. This terrain system will definitely be merged back into the KRPGE codebase.

The progress is painstakingly slow though.

Qubodup has been working on the unit graphics. They are defintely better than what I can do.

I hope to finish the terrain system pretty soon. If not, qubodup and me are in serious trouble.

RubyWeekend 2 Log #1

The theme is Opposites.

The first hour or so, qubodup and I are coming up with game ideas. Then we settle on a game called Playground Wars.

It is about a bunch of kids, divided among gender line going to war with each other for ownership of the playground. Of course the adults all thought it was a cute game and is oblivious to the seriousness of the war.

You can visit the Playground Wars's github repository if you want to see some of the latest changes.

RubyWeekend Contest Goal

Since the RubyWeekend contest will start in one hour(assuming that the contest organizer is not tardy), I decided to write my goal for this contest.

My goal for the RubyWeekend contest:

1. Create a fun game to play.

2. Not rank dead last.

3. Have lot of fun!

And qubodup is my art partner in this contest. I'll also be blogging this contest the whole way like I did last time.

Thursday, July 24, 2008

Release Log #1

Hi, I just released a new version of the rbgooey library in preparation for the RubyWeekend contest.

This version is 0.0.6 and it fix the crash bug associated with opening too many TTF objects.

You can download it at rbgooey's rubyforge page.

Day 16: Mapeditor Progress Report

For Day 16, here is the mapeditor progress report:

I fixed a crash bug in my rbgooey library so the mapeditor program wouldn't crash just because it is refreshing texts.

I also made the input system completely functional. The only thing missing is that it didn't launch into editmode yet.

The EditMode class got a bunch of code addition that won't be used until all the necessary classes are in place. The classes that are necessary are pretty much in place, because I am reusing many of the game engine component for the map project. It is just a matter of integration and getting all the neccessary data into place.

Wednesday, July 23, 2008

Day 15: Restarting Work on Map Editor

For Day 15, I restarted work on the map editor program for my KRPGE framework. However, I did not make much visible progress.

I have a tendency to have rendering problem but eventually that get solved. There were quite a bit of work on the input system and also work on gathering data so it can load files. The class for editing is created but not much is in there yet.

For the last hour of my programming time, I was investigating an interesting bug that crash my map editor after a certain amount of rendering. I found out that all the font that was opened stay when I open enough of them, it crash.

Tommorow, I'll have to fix rbgooey's textrender class so it doesn't create excess files to the point of crashing the program and continue writing my map editor program.

Tuesday, July 22, 2008

Day 14: Engine Release!

The KRPGE engine is finally released! You can visit the KRPGE homepage for more information and download.

Tomorrow, I will be tackling writing the KRPGE map editor.

That's it. I don't have much else to say.

Day 14 is complete and 16 more days to go.

Monday, July 21, 2008

Day 13: Workload More Than Expected

Well, I certainly didn't ancipitate the amount of work it takes to get a framework ready. I could release just the engine but that mean developers have no context from which to work with. With the current workload, it seem that I will finish this in 3 days, not the next day. Never mind that the map editor will probably also take a long time too.

In any case, rbgooey-0.0.5 is released. This library will be necessary for the use of engine.

As for the experiment, I finished 13 days doing 4 hours of programming. As usual, there's a lot of commits. 17 more days to go.

Sunday, July 20, 2008

Day 12: Game Engine Complete

Day 12: 45 commits and 48 hours logged so far.

Well, the game engine is completed and it now have a name: KRPGE(Kiba Role Playing Game Engine).

The only thing left is actually preparing it for release. I have to get rbgooey out the door first since rbgooey was updated for use on the engine.

After that, I will be working on preparing the game engine framework so people can actually use it. It will have blanks placeholder files so people can add their code to it.

Once I am done with releasing the framework, I will be working on the map editor again.

I hope to finish it all before RubyWeekend #2. If not, at least I have some advantage over my peers in term of how much I have to do.(assuming at least I get the engine out)

18 more days to go before I complete my training. :)

Saturday, July 19, 2008

Day 11: Nearing Completion

I like self-mandated work hours. It make things goes WHOOOOOSH!

And it did for me today. Day 11 with 50 commits, marking 44 hours total of development logged. 19 more days to go

Well, my prediction that I won't finish the engine this week, barely. Unless you count Sunday as the end of the week, in that case, I will finish the engine.

Progress so far:

I finished pretty much everything except updating the file format and the player related features. The Player class isn't fully integrated into CharacterTracker class yet. The code, for the most part are there to support the full integration. It is just that there are special assumptions that are made about the Player class that shouldn't be there.

The CharactersTracker class also got some addition to help make life for users of the engine easier. For example, it can display the name of every characters on that map and return that list. The Character class also got an addition, the name attribute. This will make identifying the different characters on the map easier.


Tommorow, I will probably be finished. I hope tommorow will be the release day of the game engine. If not, than it will be Monday. Then, I will start work on the vim inspired map editing tool.

Friday, July 18, 2008

Day 10: Racing Toward the Deadline

For day 10, I made 54 commits and finished a task completely.

The enemytracker class is now officially cannibalized. It no longer exists and now live on through the characters tracker class. This mean that the characters, whether they are foes, npcs, or players are now managed by a single class.

I also begun work on moving the ItemsTracker out of the map engine, since it also have no direct relation to the map engine codebase.

The adapter class also completed it transition.

MapLaw got a bit cleaned out as a side effect of all the work on the other tasks.

The good news is that I have no consideration for redesign of the engine, for now. This should mean no unexpected delay, bar coding roadblocks. However, I don't expect to finish the codebase by the end of this week unless I pull an all nighter. The goal is to finish it by the time of the RubyWeekend contest. If neccessary, I will do a longer coding session to finish it.

Excluding the RubyWeekend #2 contest(2 days suspension), I have 20 more days to go until I complete my training and productivity experiment. Since RubyWeekend is expected to take all of my time and goes beyond a mere 4 hours, it will not void the experiment.

Thursday, July 17, 2008

Day 9: A Codebase in Chaos

For Day 9, I am continuing my effort to finish the RPG engine. This time, however, the codebase is thrown into chaos.

Several new classes has been created all over the place, as well placeholder code until classes are complete. We also have some bugfixes so that the game can work properly again.

One of the newfanged class is the CharactersTracker class, which track all the players, npcs, and mobs. The class will cannibalize the EnemyTracker class in favor of a more generic version. Along with the cannibalization, it will be possible to "plug" in different kind of characters.

Another happening is the cleanup of MapLaw and GameLaw classes. Documentation are added as well the cleanup of magic variables. It is also planned that the maplaw and gamelaw class will move out of mapengine class and into the game engine class.

We will also have to address the camera's following issue, as the code will have to be refactored to take into account the CharacterTracker class.

That's a lot of work right there. I think this is it...I hope.

21 more days to go until I complete this productivity training.

Wednesday, July 16, 2008

Day 8: The Last of the Cleanup?

For Day 8 of my productivity experiment, I decided to focus on map engine cleanup so I can have something to release by the end of this week.

Day 8 yield two important changes in the codebase.

First, the map engine class is further spilt into two new classes. In this case, the game engine class is managing the map engine class. The changes happen because there were classes that does not have anything directly to do with our map engine code. Since this was not intended to be merely a generic map engine, it was to be an RPG type, so I decided to expand the scope of the engine code. I will be expecting a few new classes and movement of code away from the map engine code as a result of this deciesion. Hopefully, it isn't something I'll regret.

Secondly, further changes were made to de-hardcode the enigne. The MapLaw class is now spilt into two classes. One is the generic MapLaw class, managing common functionality relating to the maps, while another is the GameLaw class, which defines custom triggers and events on the map and other objects. The GameLaw class inherit all the MapLaw functionality and is required by the map engine to function. I still do not know of other way to de-hardcoded it. It is also possible that further redesign and classes spilt will happen before we got the API down.

All of this changes, of course, doesn't in any way impact The CopyPirates' gameplay or multimedia capability. However, the map engine should serve as a strong foundation for the game once we're finished.

It seem that I am on the verge of finishing the engine codebase so it should be released soon. However, look can be deceving and it may take a bit longer than expected. I hope to not be disappointed by the end of this release.

Tuesday, July 15, 2008

Day 7: Slowly but Surely

Day 7 marks another day in the development of the map editor. I am still stuck in the mapeditor's file menu system. The good news is that I am on the verge of moving toward the editing system.

I created three distinct UI element. These are typepad, the logger, and the file scroller. I also used the modal system instead of the regular toolbars. The logger element lists event that has tooken place such as loading files. The scroller is responsible for displaying files. The typepad is for typing. So far, the scroller is the only complete element. Logger's functionality is almost complete. It only lack deleting old messages thus any more messages over 5 will overflow the screen. Typepad is functional for typing but the event triggers are not programmed in yet.

The mapeditor, by design, is modal(just like vim). For example, if you want to type, you have to press tab.(and disable all keyboard functionality except typing) To finish typing, you also have to press tab. When you're finished, all the other keyboard functionality become available.

Monday, July 14, 2008

Day 6: Inching toward a Map Editor

For today, I done some work on the map editor's file menu system and the map engine code. In particular, I finished work on displaying the content directory and showing new files via pseudo scrolling. It was tricky, as it require a bit of thought to implement it.

Map engine code is relatively easy, as it is merely a cleanup job. I was dissatisfied by the ugliness of some code so I refactored them. Eventually, it lead to a code reduction as the codebase got ridden of outdated attributes and unnecessary long code. There is still the MapLaw class to go through though.

As for the productivity experiment, I got 24 days more to go.

Sunday, July 13, 2008

Day 5: Roadblock Destroyed

Well, for day 5, I easily destroyed the roadblock that has plagued me the last two day.

As expected, it was my unforeseen silly mistake that has put me into this roadblock situation. Nonetheless, I did get over it.

I think I made lot of progress today. Here is the rundown of what I was able to accomplish:

Like I said, I cleared the roadblock regarding saving and writing yaml files. Then, I finished the transition from ruby file to a map format. After that, I worked on the map file menu once again. Background graphics were created and the beginning of the file browsing system begun to take shape. Before that, it displayed every single files, now it only displays 10 of them at a time. Plus I added control for looking at more files, though the menu didn't display anything new yet.

Well, I got 25 more days to go. The experiment is looking really good.

Saturday, July 12, 2008

Day 4: The Road to Kicking Ass continues!

Well, since I didn't overcome the roadblock yesterday, I decided to focus on writing the rubygame tutorial. You can visit this project at the kibabase wiki.

As you can see, this is called the Rubygame book project, designed to be the ultimate tutorial for rubygame beginners.

I was almost completed with part 1 when I was done with the 4 hours. It didn't look like much but I have to wrestle with the mediawiki extension, which took quite a bit of time. But now the mediawiki have increased functionality when it come to source code, as it should be for a game development wiki.

Tommorow, I am going to hit the roadblock hard and hopefully break through to complete the map engine module project by next week.

26 more days until I start kicking some very serious ass and rock the world with my madz coding skills and discipline..

Friday, July 11, 2008

Day 3: Coding Roadblocks

I finished the third day of my 4 hours for 30 days productivity experiment. 27 more days to go. That's the good news.

The bad news is, I am encountering coding roadblocks for pretty much everything I tried to work on.

First, it was the rake task for generating files. I tried to write rake tasks that accept argument but I got weird bug before I was able to finished it.

Then I spent three hours trying to figure out how to use hashes loaded from yaml file.

These 4 hours are not very productive. However, the important thing is that I am learning discipline. The roadblocks are only temporary. The long term gain will pay off big. I just need to keep doing this experiment all the way to the end.

Thursday, July 10, 2008

Ongoing Experiment in Right Direction

I must say, the early results were promising.

In the past two days, I was able to make in excess of 20 commits per day. And I also made a lot of progress. Here is the rundown for what I did for the last two days.

Day 1: I moved lot of code to the mapengine class and rename lot of variables. I also took time to eliminate unnecessary code and unclear magic variables. One of big highlight of this day is the work on the character class, which incorporates common elements from both Player and Enemy class. This eventually allow me to update both Player and Enemy class with the same code. At the end of the day, the codebase become more modular and less hardcoded.
I also written a rake task to lessen the burden of syncing the codebase to the remote git repoistory.

Day 2: Major work has been done on the mapengine's map format and map file management. I also started work on the map editor, which is a major project in itself. I only got so far to directory list user interface and beginning work on input system. As for the map file management class, I added major features that spit out directory information, create blank maps, as well read certain files from directory. I also created a rakefile to create maps using the new class too.

Wow. That's a lot of progress I made in two days with a mere 8 hours. 28 more days to go before I can make this practically second nature.

Wednesday, July 9, 2008

4 Hours 30 Day Experiment

Today, I am going to commit an experiment in productivity. 4 hours of coding for 30 days straight on any gaming projects that I choose to do.

The idea is that 4 hours is going to add up a lot of completed games and cool game projects, as well money.

I know I didn't find the groove for productivity yet so it may yet be another in a long string of failures. Maybe I get lucky with this one. Who know?

Also, I'll try to blog my development effort with more diligence. It should provide me with extra motivation.