Jump to content
  • Advertisement
Sign in to follow this  
  • entries
  • comments
  • views

A 2d Pong...for DOS!

Sign in to follow this  


Well... It was fun while it lasted.

I know what you may be thinking...Pong!? That's it? Kind of.

This was more of a walk through memory lane using low level C. Writing interrupts, direct hardware control, and complete access to video memory. It's DOS Pong--In a 2d 320x200 graphics video mode.

This is what makes my version different--and cool[cool]

In this way, one has to write everything from scratch. Okay, the standard library is still available, but not much of it is existent on 16 bit compliers.

My game is not yet complete though. I am just finishing the details, then adding a timer interrupt to create a timer off of. With all of this extra low level code (and quite a bit of whitespace for readability), it has about 1,000 lines of code.

This might seem like a lot for a small game, but one needs to take into consideration that we have to write all graphics code and hardware routines from scratch.

It can support up to a MAX_SPRITES amount of objects so one could add more balls, or even extra objects to make the level more harder.

I tried to keep it as object oriented as I can, and separated routines based on their cohesion inside groups.

Alas, the game also uses double buffered animation.

Showing all of the code here would be pointless considering it is still being worked on, and of it's size. Not to mention, it will explain a little long to demonstrate how the mouse interrupt handler works.

I am thinking of submitting it to the GDNet Showcase when I am done. Granted, it is Pong, but it demonstrates how low level graphics programming works, and Mode 13h--Something I am sure some members may be intested in[smile]
Sign in to follow this  


Recommended Comments

There are no comments to display.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!