Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

MadButch

Could someone review my HaCKeR source?

This topic is 6081 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I just upped the source code for HaCKeR (multiplayer) to my site. The game is finished, and I wonder if some of the experts on here would like to check out my source code. It's a MS Visual C++ project with all source included. Homepage: http://www.GamePlayHeaven.com Direct Links: HaCKeR (9 Mb) HaCKeR Source (445 K) Any comments are welcome! [edited by - madbutch on April 24, 2002 3:43:32 AM]

Share this post


Link to post
Share on other sites
Advertisement
I haven't looked all the source yet, but there are something like 113 .h and .cpp files. Isn't that a bit much for a Tetris clone?

Its going to take some time to go through.

-EDIT-Plus its missing fmod.h and HaCkeR.ico

Edited by - Big B on June 13, 2001 4:24:24 PM

Share this post


Link to post
Share on other sites
I added those files to the zip...

Because of the object oriented approach there are indeed many files.

For example, each image file (23 bitmaps) has it''s own controller class... that alone are 46 files

And of course it can be done in far less files, but my goal was to write a 2D game engine running hacker. So everything has been written in a well layed out object oriented way.

If it''s to much work, then just take a quick look at the layout... and check out the game. Any comments are welcome... and the ones you just made are valid to... how much files are to many? I don''t know.. I would love to hear some comments on it.
Is OO wanted in games development?

btw. If you want to run the game, you''ll need to download the game itself to... you need the graphics packs included therein...

This is not just a Tetris clone to me.
It''s my life dream taking form... developing games!

Share this post


Link to post
Share on other sites


113 files? thats what you get for OOP''ing it.

Tetris should be like 113 lines ;-)

Share this post


Link to post
Share on other sites
Yea 113 is way too much. I haven''t downloaded the soruce, but clearly there is somehting you are doing wrong.

My tetris game (see GDShowcase - BlockCraZe) has about 14 files, and 5000 lines of code, give or take a few thousand. It''s a VB one, but in C++ there would have been roughly the same amount of files with my design.

Resist Windows XP''s Invasive Production Activation Technology!

Share this post


Link to post
Share on other sites
For example, there probably should be only one image controller class for all the images - and one instance of that that class for each image loaded.

Magmai Kai Holmlor
- The disgruntled & disillusioned

Share this post


Link to post
Share on other sites
Where would you then store all the bitmap specifics.

I have a DDrawLayer class which is exactly that.. my Direct Draw Layer. It creates the primary and back surface and does the flipping.

I have a DDrawImage class. This class has the direct draw surface and the load bitmap code. It also has the blit and fastblit functionality.

For background images (main background, SP background) I have 1 class. They handle the same... they just need 1 draw funtion. So an instance for each background is no problem here.

But lets take the SP game for example. It uses a SPGame bitmap, which contains all the little graphics that have to be blit over the background. Every little graphics part in this bitmap has a place on the bitmap (source rectangle) and a destination X Y coordinate (the place it has to be blit on the SPBackground).
This bitmap has it's own controller class which inherits from my DDrawImage class. It contains all the rectangles for all the graphics within the bitmap, knows all the target coordinates and has all the Draw functions to (like DrawLevelMatrix() and DrawProgressBar() etc...).

This means that in game, my SPLevel class does not know anything at all about what is where in the bitmap... it just tells the SPGame class to draw this or that.

I could take out my DDraw classes and put D3D classes in place, and my game code would not change at all! Want to switch to open GL? No problem... just replace the drawing class...


Again... this is NOT just a tetris clone... it's my first 2D game engine... and I tried to make it very flexible.

What Tetris game has smooth downwards scrolling? Single player, coop and battle mode? Multiple levels? Saving and loading games? Control redefinition?

I'm NOT trying to make my game look great here... but it would be nice if we could drop the "it's just a tetris clone"

I started games developing august last year... I've had some slow periods, but I kept going on this one... If I have to start with a Tetris clone, a Tetris clone it will be! But I will do my best to make it special in someway...
Looks like I won the biggest code for a tetris clone award hehehe

I better not make an Arkanoid clone then


Edited by - MadButch on June 14, 2001 2:21:18 AM

Share this post


Link to post
Share on other sites
ok... you got me....

I never wrote all that myself... I downloaded the Quake source and added my Tetris code to it ;(

lol...

Share this post


Link to post
Share on other sites
Hey MadButch. How long have you been programming and how old are you? Im just wondering because I am 14 and I dont really know how far I am from being able to program something like tetris.

"Ogun''s Laughter Is No Joke!!!" - Ogun Kills On The Right, A Nigerian Poem.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!