Undo/Redo and the documentation
September 27th, 2009Progress is being made on the map editor. The September 30th release still looks good. The catch is that I’m going to have to call it a beta release. I’ve run my project through epydoc, so there’s now some nice developer documentation for the project. Undo and redo has been mostly implemented. I just need to add support for a few more operations and it’ll be good to go.
Map Editor Update
September 5th, 2009Most of the internal rewrite is complete. The tile drawing tools, layers, and resize features are complete and debugged, now on to the preferences dialog, properties dialog, parallax backgrounds, and physics drawing tools.
The Map Editor
August 24th, 2009New file I/O system written. It’s now extensible so that you can add any new file format simply by overriding some methods. Updating of the GUI and such to use the new modular design is in progress.
Textadept
July 11th, 2009I finished several scripts that extend the source-code editing capabilities of Textadept. See the link on the left for more info.
Art and Math
June 29th, 2009
So let’s say you’re making a 2d side-scrolling game and you decide to make the graphics in a 3d program. A problem you’ll run into is how to set up the camera and objects so that they render into those nice little 32×32 tile shapes. Here’s the solution. It involves math.
From the diagram above you can see what I want. a 32×32 tile with a 32×16 top section. For the sake of this diagram, t = 32.
First, the camera angle. This is given by theta in the diagram and is found by using tan
-1(t / 2t), or tan-1(0.5). This works out to about 26.565 degrees.
Next, the length of the sides of the “cube”. Because the camera will be above the “cube”, we’ll have to change the depth and height. The width will remain constant as the camera won’t be angled at all left or right. The depth and height end up working out to sqrt(5(t/2)2). I did this the easy way and just assigned the width of my cube to be one unit in the 3d modeling program. (I use Blender for this, so it’s one blender unit.) With the width being 1, the depth and height of the cube, x, works out to 1.11803. The camera positioning for this can be tricky, but once you get it, it will give good results. Note: be sure to set the camera to Orthographic mode, or this won’t work.
Result:

Graduated… At last
June 13th, 2009If I could give my past self some advice, it would be “Don’t graduate in 2009.”
Anyways, I managed to escape school with a degree, a minor, and honors. It’s hard to put into words how great it is to not have to even think about homework. When I go home for the day, I’m ACTUALLY DONE. Even though I’m working overtime it still feels like I have lots of free time. (This is mostly due to the warped definition of “lots of free time” that school gives a person)
Due to the economic downturn and the completely unpredictable nature of aviation, I have ended up working as a dispatcher/scheduler for the flight school instead of an instructor. Whatever. It pays the bills. I’m looking into programming jobs since nobody seems to be hiring pilots.
I had always known that the user interface of ETA (Made by Talon Systems) was horrible, but I had never known just HOW horrible it was until I tried actually being the schedule manager. I ended up writing a scheduling program using PyGTK and Cairo. It was about three or so days worth of work, but due to the constant distractions of being a dispatcher (fueling planes, beating ETA into submission, etc…) I finished the program after about a week. It now runs on the dispatch computer in the hangar and gives everyone a nice visualization of the day’s aircraft schedule. (Note to future employers who may check this blog: I have written software that saves businesses time and money.)
This project confirmed what I already knew from making my game’s map editor: Python, Cairo, and PyGTK are amazing pieces of software that make programming GUIs almost trivial. It’s just so easy to get useful custom widgets up and running. I had actually planned on the program being a nice way to learn to use Windows Forms and C#, but none of the development environments or libraries will install on a machine without administrator access.
Speaking of Development, Textadept is my new best friend. More on that later.
Who really believes in Darwin?
February 1st, 2009Something occurred to me as I was driving back from the airport today. The stereotypical left-leaning person believes much less in Darwinism than the stereotypical right-leaning person. Look at welfare, both on the individual, corporate, and BIG FREAKING BANK BAILOUT levels. Does the conservative republican or libertarian think these are good ideas? No. Of course not. These things mess with the natural ecosystem of money; they violate the principles of “survival of the fittest.”
The atheist liberal stereotype, on the other hand, states that the principles of Darwin explain the biological world. The things that were not fit to survive perished, leaving the stronger, more fit species to survive. Along this line of thinking is that the Earth as a whole is better for it.
The same people that say “don’t feed the animals” in the wild are the biggest supporters of welfare. Don’t perpetuate the failed banks. If they made poor decisions, let them be responsible. Don’t punish the U.S. citizens to a dozen generations (assuming that in the future we will ever try to pay off the federal debt) for the stupidity of the financial sector. Don’t feed the bears; they’ll become dependent and aggressive.
So what are they going to do? Mess with the system, feed the bears, meddle in complex systems they don’t understand in almost exactly the way that we are told not to mess with the complex systems of nature.
So who REALLY believes in Darwin?
DSixB, Blaze, The Map Editor, and Flight Instructing
January 25th, 2009I’m certainly doing a good job with keeping my “infrequently updated” title accurate. Anyways, stuff that’s new/exciting:
DSixB: I wrote a mass and balance calculator for my Nintendo DS. It currently only calculates numbers for the Cessna 172R Skychicken, but there’s code in place for it interpolating landing distances, takeoff distances, climb rates, and calculating pressure altitudes. The hard part is writing a user interface for it. The math is easy.
Blaze: I’ve started work on the Greate Blaze Documentation Project (or GBDP for those of you who enjoy inpronounceable acronyms) My goal is to bring the documentation of Blaze up to the level achieved by Tango. It’s a nice physics library. The world just needs to know how to use it effectively. (That and I feel I haven’t really done enough to call myself the project maintainer, even though I am.) Progress on that will likely be slow.
The Map Editor: More work needs to be done. I’ve only got one or two items left on the list of features needed to call it a version 0.2. My main obstacle at this point is time.
Flight Instructing: Easily the best job I’ve ever had. THEY PAY ME TO FLY AIRPLANES. Just take a second to let that sink in. The one or two of you who actually check this blog/website will note that I’ve added an aviation section to the link bar on the left. Right now it’s just a convenient place for me to organize links relevant to certain Flight Science 1 labs, but I plan on adding more stuff later.
Map Editor 0.1
December 1st, 2008After a Thanksgiving break and roughly 2,300 lines of Python code, version 0.1 of the Yet-To-Be-Named game project’s map editor is finished. The only requirements are Python, pyGTK, and pyCairo.
Features:
- Create maps from PNG tilesets
- Unlimited layers
- Writes to and reads from an XML file format
- Support for drawing collision detection information