2011-01-23

Double image buffering with a slice of cold

Hello everyone!

The follow days have been spent with two things, java and a terrible cold. Good thing that you don't need to be physically healthy to be able to code!

I've spent today and yesterday coding, mainly learning graphics programming with the use of double image buffers. A double image buffer is basically an image that the computer draws on before it is being displayed on the screen. While it draws on the image not being displayed, it displays an image that it previously draw on the back buffer. Why do you learn this you might ask. Well it's to improve frame rate and quality while animating, you see if you animate with a single image the computer will have to redraw that image around 50-60 times each second. on the screen. Since it draws it at such a rapid rate it might not have time to properly load the image before it is displayed, this results in flickering. I want to avoid that when creating games, therefore i learn to build double image buffers! :D

Apart from double image buffers I've learned to embed a java applet into a web page. Thanks to the guys at www.thenewboston.com for the help!
Please note that the little neat fishes on this page is NOT my creation nor a product of my awesome embedding knowledge. I will however try to bring up a little tech demo later on.


Thanks for reading and stay tuned for future updates!
 //Kurten

2011-01-18

Application or Applet, that is the question.

Hello everyone!

Yesterday i was at the post office to get the books i ahve been waiting for. I've started to read Beginning java Game programming by Jonathan S. Harbour. I thinkt that it might help me grasp a more in-depth understanding of graphics and game programming. When i am done with that book i will start for real in Killer Java Game programming which is a more advanced book. The thing is though that from what i have read Beginning Java Game development is about developing applets, not local applications. Applets is basically like web based applications for those that don't know. The advantage with applets is that they are easier to distribute than applications since you can run em directly from your browser instead of having to download a file, install it, run it etc etc. So, Project Yume will be converted to a web-based applet! :D

While i am learning graphics programming i will put Yume briefly on hold since i am uneager to test experimental graphics code that on my game engine until i learnt to write stable graphics code.

That's all for today. Take care folks!

//Kurten

2011-01-14

Threads n' buffers

Hello everyone!

Yesterday i received one of the books I have been waiting on. i spent about 6-7 hours of today reading about ways to solve the problems i have been having with Yume 0.1.4 but i still have not found any way to get the paintcomponent to work. I have however developed some ideas to improve the code once the paintcomponent works properly.

The things i have planned to implement is, as the title said, multi-threading and double image buffering.

Also, i found chiptune to be awesome programming music!


//Kurten

2011-01-09

Still waiting for books

I am still waiting for the books, i have however dedicated my time to think about game design and underlying messages in games. This is a copy of my text i presented on the total war forums.

I have been thinking a bit recently about what makes me enjoy games so much. I was debating a bit how the depth of games look like. Mainly story. A game can have an incredibly complex story but on the surface it might look like some random entertainment medium.

This might be a kinda long and weird text but i had to get it out of my mind.

The first game i thought of was mass effect. Mass effect got hung out as an "erotic" and "Sex oriented" fan service game by the news media. When one sees the video of the main character making out with one of the in game companions one might think that this is true. If you take time and play through the game on a serious level however, you find out that the game is much more than what the visual image of it first tells you. What Bioware sought to show people by making that scene was that you, the main character, the hero, in the middle of saving the galaxy from a very serious threat, finds time for the people he/she cares about the most. This is in my opinion a very beautiful message.

By combining a very deep story with a prompting dialog for each choice the player makes Bioware managed to blend the shooting and killing in mass effect with messages about how one should care for his or her fellow companions and strangers alike.

Another game that pops up in my mind is the old FPS Call of duty 2. I remember when i first played it. Me, as a Russian conscript went into a room to find a German soldier being tortured and beaten. When he finally tells the Russian interrogator what he wants to hear, the Russians execute him with a bullet in the back of his head. Bastard probably deserved it was my first though. Later you had to defend a couple of buildings from a German assault. It was terrifying, i remember seeing the Russian soldiers die one by one while killing German after German. Bastards killing my friends i though. When the attack was halted i was given the order to counter-attack. Now i was on the offensive and was pushing the Germans back, inch by inch. Suddenly i felt it. I felt the German soldiers, fighting for their lives, they were trapped, just as i were previously and they were dying, one by one. It was just like me and my fellow Russian soldiers. I thought about it for a bit, i remembered how terrifying it was to see my fellow soldiers die and feeling that soon, those Germans are gonna get me. Now i imagined how terrified those Germans were, fighting to the last man in a cold and harsh, ruined Moscow, miles away from home. It was a hidden message i think. Call of duty 2 wasn't just mindless shooting, it was putting the player in the body of a soldier, fighting for his life. Later, as i discovered, it also showed how the enemies were just like me.

What i also discovered is that looking at some gameplay videos and seeing some images, didn't help me grasp any understanding of the game at all. The only thing i saw was shooting, killing and blood. The horrors of war basically. But from playing the game i understood what it ment.

The game didn't say: Here's war, go and have fun killing mindless nazis cuz it's fun.

It said: Here is how war looks like, observe it. Not just your allies, but your enemies as well. Analyze it, what does these images mean to you? When you are done, form an opinion about it.

This is what i think is so great about games and why people that does not play them can't form any in depth opinions about them.

Why do i enjoy strategy games then? Do they present these kinds of messages?

I am gonna use two of the total war games as examples. In Empire: Total war i was kinda amused by the swedes. Since i recognized what they were saying, i found it humorous that CA included Swedish voice actors, speaking old Swedish. This was a miss by CA though in my opinion. What the Swedish voice actors did in empire was presenting war as something that is fun and silly. It made it humorous to hear them fighting and dying. Empire was still a great game since it was fun to play but i think the underlying message was a bit misleading. This was however, greatly improved in Napoleon: Total war. Just to see if the Swedish voice acting still was in that silly, kinda humorous style in napoleon i played a skirmish battle the day i bought it. I gave a Swedish army a couple of regiments of line infantry, i myself had an entire army of howitzers. The moment i began bombarding the swedes i got amazed. They screamed, they cried, they called for mom. It was really authentic. I almost felt sorry for bombarding them.

Empire made me think like this: bombarding these guys is kinda fun. I'll prolly win this battle, another territory for me, yay!

Napoleon like this: Ok, i am hitting these guys kinda hard, must have been like this but worse during the real Napoleonic wars. Glad i wasn't born during that time.

See the difference? In empire, bombarding swedes or some other faction is just a part of the game, no real feelings behind it. In napoleon, fighting an enemy is a grim, dirty and bloody affair. This makes it realistic and people that experiences this stop for a moment and think. Well, at least if they like to think which i take it they do if they like strategy.

This is part what makes strategy games enjoyable for me as well as RPG's and some shooters.

With that i say thank you and hope it wasn't too horrible to read all this ^_^

//Kurten

2011-01-01

First day of 2011

Hello everyone!

Today is the first day of 2011. 2010 has been a very interesting year for me. It's gonna be a bit attention whoring in the beginning of this little text but it's just in the early parts.

At the start of 2010 I was really lost. I knew what i wanted to do with my life, to become a game developer, but I didn't know how. Well learn programming of course but I failed to see how game development really worked. I despised math above all else, worthless numbers without any form of practical usage I though. Why do I have to waste time learning these meaningless equations and formulas? I didn't study math serious at all during those days.

Sometime early in 2010 my dad took me to a university his friend worked at. A game development university. There I got to walk around, listen to what the teachers had to say about game programming and game development, I even got recommended a program to start developing games in. Suddenly, my motivation spiked. The program i got recommended is called Game maker. It uses a built-in scripting language called gml (Game maker language) and is very simple. An idea popped up in my mind. What if I, my friend William, and my other friend Sohrab made a game? I'd do the programming, William would do the graphics and Sohrab the design. I presented the idea and we started to work on a 2D fighting game. It was really fun even though it was really simple stuff. I spent the lunch hours debugging the simple script source code and I found out that I really enjoyed it. By starting to program in gml I learned that math was really, really useful. It was critical in programming. Thus, I began to focus harder on the math, passing the course, barely. The game we developed was never completed, a scrapped project. Doesn't matter though, what matters is that it opened my eyes to the world of programming and game development, a world I want to be part of.

March 2010, I sold my computer and decided to build a new one. This was the first time I built a computer from nothing but loose components. I managed to get it to work though and I now have a really nice computer that suit my needs while gaming, programming or watching movies. This was also an important step in 2010 since it helped me to develop a more in depth understanding of computer components.
 
For those of you that are curious about the computer, here is a video I made to preserve the memories of building it.



During the summer in 2010 I spent my days on a peaceful island called Gotland. One has to balance the amount of country and the amount of urban areas one dwell in. When I get tired of the city, I go to the countryside. When I get tired of the countryside, I go to the city again. On Gotland I had a really great time, me and my friend Linus, which I lived at, played Napoleon: Total war during the afternoons, after getting home from the fields. When Linus's parents got home, we started to work again, making dinner, walking the dog, etc etc. T'is was a great summer and I really want to go working there this summer as well.

After the summer ended, school started, and so, E/PoF started. Thus, the events after that is already covered by other posts.


Now for my recent activities.
Since I encountered the problem with multiple paintComponents i rewrote the code to use a single paintComponent that painted images from polymorphic image arrays. The idea will work since it worked with two paintComponents, unfortunately I lack more in depth knowledge about graphics programming and paintComponents. To solve this I ordered two books for the money I received on Christmas. Since the delivery companies between United Kingdom and Sweden is a bit slow, I am still waiting for those books, estimated arrival time: January 6th. Until then i am afraid i can't tackle the problem. I suspect Yume 0.2.0 is well on it's way though since I have basically rewritten the entire image inheritance system including the paintComponents(s).

//Kurten

2010-12-27

Yume, continue testing

Hello everyone!

Due to some recent discoveries i have begun testing some alternative methods to draw graphics. My original idea was to have several paintcomponents that drew different parts of the layout. Turned out it was a bit more to it than call dit dat and dat dit. I have now semi-scrapped that idea and have instead begun testing on using a single paintcomponent that draws stuff from different classes instead. Programming is about solving problems you just want to bang your head against the keyboard when you see, but somewhere in it, it is fun. Just as GLaDOS said: Continue testing.

And continue testing i will.

//Kurten