Saturday, August 20, 2005

*Does it again*

Again I've jumped the gun and gone and gotten myself some more development tools. This time I've acquired the library tools for the Simple DirectMedia Layer, a neat little thinger that has a bunch of graphics related stuff built into it. It was made in the first place so programmers don't have to re-invent the wheel so to speak. It simplifies window creation, plotting pixels, and I assume everything else graphic related. Of course all I've done is create a window using it -_- and plotted a pixel. I've even animated the pixel, and gone so far as to implement a very, very primitive collision detection system. Basically, a block merely bounces around a window, returning from whence it came if it comes into contact with a wall. Err... The edge of the window... There is no special physics, it's bounces remain at a constant 90degrees (imagine if you will, a beam of light, reflecting around the inside of a square-mirrored pipe - if that makes any sense). It isn't something great, but it's something.

I've also begun to read a book on artificial intelligence. The beginnings of the book deal with most of the same things as other game programming books. The basics of Windows programming and so on. I find it quite interesting to read, as different authors explain things in different ways. I've gone through 4 or 5 texts/reference materials where the author goes through the basics of creating a window, and it's slowly beginning to sink in for me ^_^ go me!

But yes, back to the AI. You may be wondering why I'm also looking at learning to program AI... Well... What use is a game if the computer doesn't do anything (without AI, a computer opponent doesn't technically exist now does it)? Now for a simple game like Noughts & Crosses (tic-tac-toe for those who may not know), and possibly Connect4, the AI programming would be relatively simple... Actually, I don't think it'd be very simple for a game like Connect4... But you can see what I mean. 9 spaces to choose from, aim to get 3 in a row, easy. If I had to do something for that right now I imagine I'd use a large CASE statement, either that or a series of large-ish IF statements, or even a combination of both. I know it'd take up a (relatively) large part of the game's processes, and that alone is a bad thing.

I'm still not too sure of what game I'll make first. It has to be simple, but not too simple. That doesn't make much sense now does it? -_-. Noughts & Crosses, Connect4, Memory, games like these ones are what I should be looking at making first off. No need to go and try build the next Half-Life engine now is there? I didn't think so. It also helps to start of small cause then that way you gain little skills along the way that can be applied to projects down the track ^^. Over the coming week or so, I will define my first project. It won't be a game, more a test to see if I can just do a bunch of things.

  • Create a window;

  • Place text in that window;

  • Plot single pixels

  • Display graphics (from file, BMP, GIF, whatever... most likely BMP);

  • Read keyboard / mouse inputs; and

  • Display those inputs as text in the window.

I may get ahead of myself in terms of my readings, but I can't get ahead of myself in terms of what I practice. Since I was 15 I've been saying I wanted to learn how to program games. Odd... It's taken me this long to actually start... Although, I did attempt to program various games. A text-based Monster Battle game. A random number generator to help me pick EmailCash's Guessing Game's winning number based upon previous winning numbers. Another Monster Battle game, this time with an actual interface (in Visual Basic), some sound effects (I think? Using the WAV module from my SDD assignment), still no images and true gameplay to speak of. I designed SketchPad-PRO, an assignment from my engineering computing unit (the only unit I passed last year mind you) which would plot a series of points based on input from a text file. Not much else comes to mind, I guess I didn't work as hard on anything else as I did those things. Most of them were on my older computer which has recently been wiped ;_; all of them are gone, save for the engineering assignment :o I might post that later...

The cool thing about blogging via MS Word is that I can check out my word count and stuff like that, right now I'm leaning towards 800 words I think. My typing is getting better, and I'm trying to not look at the keyboard as I do it ^^. Well, I haven't exactly memorised all the special symbols above the numerical keys, most of time I actually have to look at 'em when I wanna use one of 'em or something. Oh well. I suppose I can only get better with time.

Heh... I can't play games any more without wondering how it's done. While playing some Bomberman Online today, I was so curious as to how the game worked. The puzzles of Chu Chu Rocket were amazing (at least in the HARD mode, I beat normal in like 10 minutes x_x), I hope that one day I can come up with puzzles as good as those. Playing Street Fighter Alpha 3, I can't help but wonder how the collision detection is implemented, or how the animations are all done so well. In Street Fighter 3: 3RD STRIKE, the microscopic collision detection and timing come together to form the parry-system, amazing. And sure, these games all come from professional developing studios with years of experience, and some of the most talented people in the industry working for them... But... It's interesting to see these things implemented so well, and I really want to be able to do something like this one day...

... One day... When I make a game... I'll look at it... I'll comment on how well the game is implemented... But I won't be curious as to how it works - I'll know exactly how it works...

1 comment:

Anonymous said...

Adems a retart!!!!! lol Sorry, im just so bored...
Nice blog!

-bao =P