Papers 06 May 2003 06:00:46

But Can You Make Pong?

So you want to begin making games, maybe you already started on one, maybe you and a few friends decided to try being a studio. Think you got what it takes? Of course you do, or at least you can learn fast enough during the process. I think you are wrong, or at least misinformed. Making games takes experience, discipline, dedication, know-how, and a driving idea and/or boss.How can you get that experience and discipline needed to tackle any game for years to come? I believe I have the perfect solution. Some may laugh, others may doubt, but here it is: Make Pong.

This is where you go “Eeewww…nono, we want 3D, massive worlds, immersive sound, latest-and-greatest features!” But seriously, why not try to see if you can do Pong? Such a simple game can’t take more than a day to make; maybe two days if you only work on it in your spare time – more like a month, I say. You may even use 3D and immersive sound.

Are you up for the challenge?

Pong (nostalgic)

Bring It On!
Pong. 2 pads and a ball. 2D playing field, player pads on the left and right side, boundaries on the upper and lower edges, with the ball bouncing around inside. Nothing fancy, nothing revolutionary, but it has everything modern games have.

The Rundown
Core Components
Game Logic
Graphics
Sound
Controller Input
Physics
User Interface
Single-Player Mode
Computer AI
Multi-Player Mode
Peer-2-Peer and/or Server-Client
Multiple/Shared Input Devices

Oh my, suddenly the innocent Pong looks quite complicated. Allow me to elaborate…

Core Components: Game Logic
The game logic is the basic ruleset. We have 2 players, meaning one will win and one will lose. Points are gained by shooting the ball beyond the opponents pad. A simple rule such as “first to reach 10 points wins” will do. If you want to further complicate the game you can add (moving) obstables to the playing field, or perhaps bonuses.

Core Components: Graphics
Good old 2D will be more than adequate, yet it won’t hurt to render the playing field in 3D just to get to know 3D graphics APIs. Could also have fancy particle effects follow the ball.

Core Components: Sound
Play me a fanfare when I win and a *doink* when the ball bounces. This is probably the part most would say can be skipped. I admit it’s a small part of Pong, but whaf if I would like to have the *doink* play on my left speaker when it bounces on the left side of the screen?

Core Components: Controller Input
Joystick, mouse, or keyboard? All three at once? One thing is for sure, this is the easy part. You only need to worry about one axis with a joystick or the mouse, and two buttons with the keyboard. The challenge here is to find a good balance between movement in hand and movement on screen.

Core Components: Physics
You’ll need to deal with velocity in 2 dimensions, and physics regarding bouncing. 2D velocity can be expressed using vectors. Bouncing can seem trivial at first, but to make the game fun you could have the ball bounce differently on the edges of the pad as opposed to a clean bounce on the middle. The ball could also speed up more and more as the game progresses.

Core Components: User Interface
The UI has strong ties to Graphics and Controller Input, alongside a weaker tie to Sound. It’s all about showing the menu, presenting the player with his current score, having text input fields for high-score rankings, so on so forth…not the most exciting part, but must be done. A game is not finished until it has a proper UI!

Single-Player Mode: Computer AI
One could argue how much AI applies to Pong. However, the computer player should be a variable opponent; meaning difficulty levels. An easy computer could just move the pad to where the ball is right now, while a smarter computer would attempt to predict where the ball will be. Further subdivions of difficulty levels could affect the speed at which the computer moves the pad. The ultimate computer AI will adjust itself to always be a challenge throughout the game.

Multi-Player Mode: Peer-2-Peer and/or Server-Client
A good chance to use sockets, make up for lag, and learning what to actually send over a remote connection. The old issue of whether to use P2P or Client/Server also shows up, alongside how to combat cheating.

Multi-Player Mode: Multiple/Shared Input Devices
Two players on one computer. You probably know what Multiple Input Devices are from console fighting games. On a PC it’s hardly fair for one to have the mouse and another to use the keyboard. Thus you might want to implement Shared Input Devices, in this case sharing the keyboard.

End Note
Well, there it is. The good old game Pong can be quite a challenge, and certainly not something you finish in a day or two. And this is exactly the reason I believe Pong is the perfect game to test your skills as an all-round developer and/or studio. It’s not overly ambitious, yet it requires a good amount of discipline. Look at it this way: If you can’t finish a simple game of Pong, do you truly think you are ready for the big games?

Pong (modern)

3D &Design 25 Sep 2002 06:00:54

Waterscape

Made in Bryce
Waterscape 3D

Tech Guides 24 Apr 2002 06:00:41

Beating WinME’s 512 MB RAM Limit

I have Microsoft Windows Millenium Edition and I have 2 blocks of 512 MB RAM. Until yesterday I had only had 1 512 MB block installed, because of a limit in non-NT versions of Microsoft Windows (described by MS themselves). I found that a bit of a drag, so I set out to circumvent it in one way or the other. The theory is simple: Install a 512 MB RAMDrive before Windows boots, and use that as Virtual Memory (swap).

Problems

  1. Windows ME skips both config.sys and autoexec.bat in the boot sequence.
  2. The standard ramdrive.sys supports max 64 MB per drive.

Solutions

  1. Install the Real DOS-Mode Patch for Windows Millennium (local mirror)
  2. Use a alternate RAMDrive (local mirror)

But, that still didn’t quite solve my problem. Sure, I used all 1024 MB RAM, but Windows complained about “Not Enough Memory” when starting a DOS prompt. So, in addition, I used both of the tweaks from the MS article and added some lines to my system.ini:

  1. Under the section [vcache] I added MaxFileCache=131072. This will make Windows use max 128 MB RAM for file cache, which in all cases is a good thing. If you want more, just set it to the full 524288 (512 MB).
  2. Under the section [386Enh] I added MaxPhysPage=80000. What this should do, is to make Windows use at max 512 MB RAM. For some reason it is in MB, so I actually told it to use 524288 MB RAM, but it works nonetheless. If it doesn’t for you, use MaxPhysPage=200 or MaxPhysPage=512 instead.

The line I used for my RAMDrive in autoexec.bat is:
XMSDSK 524288 R: /T /C1 /Y

Notes

  • I use a 512 MB RAMDrive because I have 1024 MB RAM total (1024 total minus 512 limit is 512 left for drive), but for people with 768 or 640 MB RAM total, or similar, then a smaller RAMDrive is probably better. Also, a RAMDrive smaller than 256 MB should not be used for Virtual Memory.
  • Doing it in this way, by essentially patching the boot sequence, you probably break your Microsoft Windows Millenium Edition license.
  • For users of Microsoft Windows 98 or 98 Second Edition, the Real DOS-Mode Patch for Windows Millennium would not do anything, and should not be installed. Asides from that, the XMSDSK should work with 98 and 98SE, as should the system.ini changes.

Essays &Philosophy 07 Sep 2001 06:00:06

Do You Believe What I Believe?

An essay about my feelings towards religions. This was originally written for a Danish class, but I wrote it in English and subsequently translated it as the idea of writing such an essay had been on my mind for a while.

I am angry. I am actually furious. At who? So called religions; institutionalized systems grounded in, and with reverence for, a supernatural power regarded as creator of the universe. I am angry that people kill, rage, ravage and plunder in the name of a supreme being. That they slaughter others for their god is for the most part against the holy scriptures, so they act for their own will, sake and beliefs, and not their respective god. That they kill themselves, well, that is plain fanaticism, and being fanatic is bad, regardless. They may achieve a certain martyrdom, but what’s good being a martyr when you are dead? You certainly won’t serve your god any longer. Another trait showing fanaticism is that no matter how good arguments you have against their ‘holy actions’ they won’t stop, even if they agree it’s basically wrong, because they must serve the gods will. Of course not all are fanatics, but that doesn’t mean they aren’t in error either.

Churches, synagogues, mosques, temple and the likes; houses of the ‘God’. These buildings today hold the common sense that it’s where you are nearer your god. What a load of manure, to say the least. Why would a supreme being, creator of the universe, ever consider a pile of rocks to be more worthy their presence than, say, my pocket? A supreme being is omnipresent, everywhere all the time, so there wouldn’t be more of ‘God’ just because you walk through some big fancy gates; you can’t exactly lock up your god or its essence. People worship their god in these houses, or do they? I say they actually worship the altar, the figurine and the book; the things they can see in front of them. They might once have truly believed, but at some point they can’t believe without having their symbols of their deity around them. That is weakness of mind.

I am disappointed. I am actually aghast. Yes, with the same religions as before. Some places it has gone so far that people are brainwashed into a stupor and are imprinted with a ‘truth’ that’s very far from this world. These poor souls I pity more than I do others. They are deprived all options of advancing technologically and of extending their knowledge. They are blinded by belief. Belief so strong that it is their truth. That’s not all, though. They bring the same blindness unto their children, and they never consider the possibility that maybe the child should have a better life than they should; it’s just passing on the strict code of behavior and thoughts.

The same blind people have a tendency to seclude themselves from any ‘infidel’ or ‘heathen’, meaning everyone but their own closed circle of max a thousand ‘true’ believers. They will not accept help from outside their circle, and they will not accept anyone leaving the circle. Blind and deaf, what a loss of minds and a waste of time. A twist to this blindness is that the few who are, against odds, broken from their rock solid belief, and shown they have been wrong all along, are devastated to the core of their being. All they have lived for was a lie. I’d not wish that to be the case for my worst enemy.

In a vastly different neighborhood we see people elevating themselves to supreme humans or even gods. How dare they? How can a mortal man ever consider him or herself to be so much more than their fellow humans? Some do it for fame, others for money; both quite good reasons. The rest do it because they actually believe themselves to be supreme. And they are proven wrong time and time again, mostly by a bullet.

I am glad. I am actually thrilled. Still at these religions. It provides some people with great strength to get through the day, and to perform extraordinary good deeds to please their god and secure their place in the afterlife. Religions have a code of honor and a code of solidarity. The followers are expected to behave nicely and show an outwards good image in order to attract more subjects. Some religions also require people to help others, even others of different beliefs. This is all good.

Another thing is that if enough share a religion or belief, then they share a bond. They can go everywhere in the world, meet any race of person, but if they at least believe in the same god then they stand together against the, in some cases hostile, world around them. The unfortunate side effect of this is that these small groups of equal-minded will be secluded by the established society around them.

I am sad. I am actually dismayed. Religions. The negative side of religions can be avoided, and the positive side can be attained without ever believing in any supreme being or creator. Which brings me on to the final aspect: Every human being alive today has its own vision of what exactly ‘God’ is. We all have somehow pieced together a personal religion from other religions and systems of belief. Since no one actually believes the exact same thing, all religions are false.

3D &Design 10 Jun 2001 06:00:49

Global Warming

Made in Bryce

Global Warming 3D

« Previous PageNext Page »