Monday, October 19, 2009
BlockBreaker Revisited
Besides the problems, the game is working very well. Collision works great when the ball does not strike more than one block at the same time. I can't simply calculate 'first hit', because the first hit may not be the closest.
I want to clear up the problems, but I'm also happy with the progress. The game needs sound and a graphical tweaking. The only real engine coding left to do is high score and the transition between levels.
I've actually considered designing an rpg style breakout game, similar to Puzzle Quest. Breakout does not need to consist only of hitting a ball with a paddle.
Tonight for my coding time, I'm going to look into finding the nearest block, and then into smoothing the ball animation. Maybe I'm still timing everything wrong.
Monday, October 12, 2009
Work on Break Out
I learned quite a bit by reviewing the source code. Most importantly was that there wasn't much code at all. This was a single Java file along with a matching HTML to show the applet. This was important for a number of reasons; the first being that it did not seem to contain as much effort as I remember. Reading the code I realized that it probably was only a few hours work, if that much. The size of the code struck home to me that I did not put as much effort into these early projects as I had thought. I seemed to have given it a bit of a try, and then moved on.
The source code for this old breakout, did not user any kind of timer, it simply ran and painted as many times as the main loop could run; it was timed by the Thread.sleep(x) method. Input was also handled by a direct input method; pressing the right arrow button moved the paddle to the right by it's acceleration. Further the constants for the states were defined, but there were no states. I couldn't help but wonder if this wasn't the latest version of this source code, since I did not have a repository back then.
I decided that this was one of those projects that should be completed. At first I simply cleaned it up a bit and it became a fun little game. Of course, this reached a point where I had simply made 1,000 lines of horrible source into 400 lines of alright source, that simply played the same half-game. From there I added my KeyWatcher, MouseWatcher and Timer classes to the mix; introducing a real game loop, better input and locking into 60 fps. I know based on my recent reading that this still isn't the optimal way to handle frames, but it's block breaker and it will never be heavy on the cpu, etc.
I stopped there and got it checked into subversion, then made a page for it on my private wiki. After writing out a bit of a design, I returned to the code and tore out all of the game objects. Although component (aggregate) based game objects are all the rage, I went with a simple hierarchy involving a base class and an extension for each of the types I would need. Proper state was added, and not based on constants.
I spent the rest of the weekend working on collision detection and resolution. I have never really tackled this problem; I've always tried to do a simple approximation of things bouncing and it has never worked. There was a considerable amount of contemplation on the effect of this on other projects. How many projects had failed or been abandoned because I couldn't get this part right?
This weekend I forced myself to sit and do the reading, review the math, and correctly bounce the ball off the walls, bricks and paddle. With this done I was very proud and felt like I was finally approaching projects correctly. I still need to go back and group bricks (two bricks next to each other shouldn't run a separate collision), as well as add a coefficient of friction to the paddle.
The game needs graphics, sounds, actual stages (it just has one) and some fine tuning, but it is hardly the toy script I recovered from the CD.
It's good to be picking up old projects and finishing them.
Monday, September 7, 2009
More progress?
Even without a real workstation, I continue to make progress. I have gotten my wiki setup on the server. I used the copy of Atlassian Confluence I purchased during there donation week. $5 is a deal for a five user license.
I have also started using Calibre and reorganizing my books. I refreshed my book repository on my prs-505 to be smaller and more targeted.
My workouts are improving too, and I plan to see the trainer this week. I need to get protein first thing in the morning. I need to completely improve my diet.
I am getting anxious about paying off my credit cards. I will suddenly have money to tool with. I'm thinking a boe bot is a good start, but I'm not sure.
Last night I ordered the ram for my 900a and my sling pack. Everything should come together if I can find a suitable iPod or pmp.
For now, it's the holiday and I'm chilling out on the porch. A completed project, btw.
Saturday, September 5, 2009
Organizing?
Interests:
- Robotics
- Programming
- Games
- AI
- Speech control
- Home automation
- Cars
- Fitness workouts, etc
Fitness is the only really active one, with regular visits to the gym.
Projects do not need to be profitable, but it would of course be nice. It's always been a good motivator for me. Getting to work with others is pretty important.
Work on ai through involving it with the other projects, the same with programming. Cars is the expensive project and requires planning, probably prettyy stale until we get a house. So it comes down to speech control, home automation, games and robotics. I need short and long term goals in each. Possibly multiple projects in each category? Home automation is also hard to really have fun with until we own a home.
Think I will start with some chores and more preparation on the travel kit. Going to hit the bank, check my finances and search for my messenger bag. Thinking I need a new duffel as well.
Will continue this when I get back.
Monday, August 31, 2009
Plans?
I've been doing some more thinking and there are some things I would like to do.
What I realize is that the goal cannot be to complete the project, the project has to be part of some goal. I don't have that goal, and I need it/them.
When I figure that out, I'll be able to move forward.
I am thinking I have things I still want to do, mud wise; and I'd like to join the spring rts project. I've also been considering a web based rts. something small, but that would be fun and quick. It would show off my abilities, and look great on my resume. i It would also be very personally rewarding.
I have to do further thinking about this.
Saturday, August 29, 2009
Lost Opportunities
This is a personal post.
I started Animud back in 1995, it's 2009. Over that time I worked on many games and projects (I've made a list), most of which never saw 50% completion. I look back and know that I was always trying to get approval and positive feed back from others.
The mud gave me an audience, a group of friends, and I spent considerable time trying to create things to impress them. I took them for granted, the same way I was taking my real life relationships for granted.
With them gone, I haven't had much direction. The mud being empty has left me pretty empty. With nobody to impress, I don't have the drive to create anything. I'm lost, looking for something to be passionate about. I haven't been coding outside of work, and I haven't brought myself to complete any other projects.
I feel a need inside for short term gratification, because I spent prototyping games, showing off the prototype, and moving on. In addition, I know that I don't enjoy working on things alone - without Scott working with me, I lack drive and commitment.
Video games have been out of the picture - I find no desire to play them, create them or be involved in them. My attempts to play WoW, Warhammer and Starcraft result in little to no success. Although it is good not to become addicted to these things, I am unable to commit to them to the point of getting to enjoy them. I can't keep myself on any one thing for any length of time.
I feel empty because of all of this, and I spent whole days sitting around doing nothing or watching videos/browsing the web.
What do I do with myself? How do I fill this hole? Is there something out there for me?