Showing posts with label productivity. Show all posts
Showing posts with label productivity. Show all posts

Thursday, August 14, 2008

The 30 Days Postmortem

My 30 days 4 hours a day programming challenge is officially a success. It has propel me to new heights in such rapid pace not seen in the 2 years I been programming. I also learned what it meant to be a disciplined programmer and learned a few new tricks as well.

During the 30 days challenge, I worked on the game engine and the map editor for the KRPGE project, Playground Wars, Space Fighter Ace and the Rubygame Tutorial project.

What I Learn:

I have learned through the 28 hours workweek why my game development projects has been so slow to progress in the past. They just took a lot of work. Even with the 28 hours work week, I still felt that progress is very slow. Nonetheless, I managed to finish the KRPGE's engine proportion in about 14 days. The Map Editor is finished in about the same timeframe.

What went right:

Of course, I was able to keep the schedule despite interruption by parents and outside events. Best of all, I was able to progress phenomenally fast in comparsion to my usual pace of development.

What went wrong:

If there is any wrongdoing, it is that I was undisciplined when it come to designing my game engine's codebase. Although it was easy for me to use, for others, with no documentation, cannot use it. There are several releases of KRPGE but nobody use it except me.

What I would do differently:

I would learn unit testing and set up a bugtracker for each projects. I would also package all my games as gem. Also, it would be nice if I know more about optimization technqiues as my games tend to fall below 30.

What I gained from this challenge:

The most improtance gain is productivity, above all. I finally broke the cycle of procrastination and no game development. I tried many schemes but none work as well as the enforced work hours, in which I was driven to develop under pressure. This build upon my experience from the first RubyWeekend contest. I will continue to use this concept to help keep game development going.

I also gained a newfound apperciation of the difficulty of writing games evidenced by the slow development cycle.

Still, all of these sucess would mean nothing if I don't keep on the pressure on myself to continue game development at this kind of level. That's the next challenge.

Sunday, August 10, 2008

Day 30: Performance and Tutorial Work

Today, I spent time trying to optimize my game's FPS from a pitiful 15-20 FPS to acceptable 30. Though, it still seems to suffer from having too many objects in the game, which may make large scale battles impractical and possibly limit the game to a few fighters and objects.

For practically 90% of the increase in FPS, I merely eliminate most of the 900 map objects, it would still pose a significant problem if a users were to add lot of map tiles though.

It seem that the engine is improving during this iteration of game development. So much, that I decided to port the engine code back to KRPGE sooner rather than later. See the roadmap for details.

However, I soon hit a roadblock on my optimization problem because I don't know how to optimize further and the lack of available immediate help. So I decided to focus my development effort entirely somewhere. For that, I choose to work on my Rubygame Book.

The development work was especially fruitful because I finished part 3 and started work on part 4.

I still hope to return back to game development work because I got a gloomy feeling about Space Fighter Ace's development cycle. I feel it will be a long slog before I finally complete its development goal. For this, I estimated at least a month.

Well, this is the last post of the 30 days challenge log! A postmortem of the 30 days challenge will be written soon.

Saturday, August 9, 2008

Day 29: Space Fighter Ace is Slowly Being Built

Today is Day 29, so tomorrow is the last day of my programming challenge to code 4 hours a day.

With 4 hours a day, I am slowly crafting Space Fighter Ace game mechanic, with some markup in difficulty in comparison to previous projects.

Today, I finally accomplished the death mechanism of spacecraft and bullets collision, although it have no special effects. I believed it took me two hours to accomplish this task. Another hour is spent on trying to futilely finish the movement code to no avail. The rest is spent on miscellaneous task such as trying to debug the mapeditor program, writing FPS display code for the Hud, and improving the game's FPS.

Tuesday, August 5, 2008

Day 25: Cooking up Movement Code



The second day of development is all focused on getting the movement code for the player right.

So I spent much of my morning hours writing movement code and rotation code, although I still have to take care of fixing crash bugs because I forgot to include a few files in the mapeditor program.

The rotation code is pretty much complete. You can rotate counterclockwise and clockwise as well stop. The movement code, is on the other hand, have incomplete physics. Although you will go faster with accelerating and then you will continue to move even after you stop, it doesn't take into account the angle of movement.

This will be rectified the next day, I am sure.

5 more days to go!

Saturday, August 2, 2008

Day 22: Finished MapEditor and Doing Tutorial Work

Well, I finished MapEditor's rendering bug and made it ready to be released. For that, I spent 1 hours getting nowhere and the finishing it relatively quickly the next hour after being confused for 10 minutes.

Since I have nothing to do, I decided to work on my tutorial. I completed part 1 and even managed to start working on part 2.

Tommorow, I will start work on KRPGE 0.0.3. For now, I must release my mapeditor in the form of KRPGE 0.0.2

Friday, August 1, 2008

Day 21: Wrapping up Mapeditor Development

Today, I finished both the map stamping option scroller and the editing system as well. So you can edit maps and cycle through the options that you want to stamp.

The only thing left is writing messages for the logger and fixing typing rendering bug, as well writing the README for the map editor.

It will be released as KRPGE-0.0.2 instead of a standalone application. After that, I'll be working on the next version of KRPGE, incorporating any useful stuff leftover from the playground project.

9 more days left! :D

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.

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.

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.

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.


Plan:

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.