Sign in to follow this  
  • entries
    2
  • comments
    3
  • views
    2556

Finally, some progress!

Sign in to follow this  
dimitri.adamou

886 views

It's been a big night for myself. I can say am I actually proud. I've been reading books for close to 3 months now without writing a single piece of code - after finishing "Introduction to 3D Game Programming with DirectX 9", I finally said "Fuck it, lets just do it."

I decided to go ahead and begin my journey into 3D Pong. I never understood how to do it in the past, while I've always been captivated by C++ - I never had an actual reason to use it. I regret that I never actually tried before... I couldve done this four years ago - but I learnt soo much more as a programmer at least! I've been working in PHP (which I'm starting to loath.. but thats a different rant) I can say I'm fairly confident in that 'language' (if you even wanna call it that) - but as a wise one once said "bla bla bla.."

Anyhow, I tried to do too much straight away, I was going to write my own renderer interface so I can swap between OGL and DirectX with ease, but after getting deeper into it - it made less sense sad.png I would of had to write a massive interface and 2 wrappers for OGL and DX classes ! Not to mention I have no idea how to convert between Left Hand and Right Hand Coordinates (yet). Unless I misguided myself and there is an easier way of doing this? Regardless, I cut out my 'renderer' class and wrote a nice comment - DONT TRY TO DO TOO MUCH ON YOUR FIRST PROJECT.

I've never done anything like this before, so its a scary new (but very exciting) learning ground. I had no issue getting the display set up atleast, but then it came to the camera... that damn thing. I didn't understand how it worked - reading wouldn't of prepared me for it. But...

I blame my exhausted mind, I answered my own question and kept doing the same thing wrong,
"How come when I change my X position, it only rotates around 0,0,0?". I spent 20 minutes trying different x,y,z positions...

I had to end up writing the coordinates to my screen - and it finally clicked! "Change the target vector idiot!"

its a start.png

I finally understand how to strafe atleast! Huzzah. The endorphines were released, I'm a step closer to finally understanding 3d smile.png

I can try explain how I'm going to structure my classes atleast, any objects that exist in the game are inheriting class entity (which only really contains 3 virtual functions [setCamera, render and setup] and 1 matrix )

I'll eventually refactor my global variables to sit inside my pongGame class (which I guess you could say is the massive overlord controller)

Anything derived from Entity will be stored in an array that will be iterated each loop and rendered.

So, by my current judgement there are 4 entities. The 2 rackets, 1 ball and the world.

The world is rendered in 32x32 'tiles' (maybe its my prejudice from all the 2D programming I did back in the old day). Each tile has its own Matrix because I want to try make dramatic effects out of it - and possibly add some pinball into Pong.

With the camera, I aim to be able to give the user the ability to switch between as being the player [or rather as being a 3rd person racket], looking from the ceiling with style, or the seizure inducing ball.

Hopefully this will be a realistic goal, and my next journal entry isn't how I am sad and bitter from not getting it right.

Regardless, I will finally do this!

And when its worth it, I'll of course release the source code and hopefully a few years down the track someone generous will be happy to go through and point out the flaws and how to fix them smile.png (If only lol)

Anyhow, cheers have a good one! I will call it a night for now... big day down at the office tommorow
Sign in to follow this  


3 Comments


Recommended Comments

It won't take long until you do some real fancy graphics, I can tell you that. It's all about motivation.
I, too, should have started 3D programming a long time ago. Although I'm nowhere near pro, feels great to be
able and decode some crazy academic papers and frostbite presentations ;)

Share this comment


Link to comment
The "just do it' thing really hit me. Some people in the know in this community emphasize that when they sense someone is stuck.

This field in general reminds me of playing Chess. It will let you know a lot about character such as patience and so forth.

Thanks for posting your thoughts and feelings. It gave me a "heads up" to be ready for the trenches. LOL

Share this comment


Link to comment
@fanwars, I can't wait to get to that stage :) It makes you feel special when you actual understand what they write instead of saying "Oh yeah...". Baby steps really do help.

@3Ddreamer, yeah I don't know why I never just did it in the beggining. I'm glad I finally 'broke the water' (so to say lol)
Speaking of Chess I've always wanted to try that to :P Am I suddenly gonna become a Nike figure head?

Thanks for reading guys! I can't wait to get back into it, time for work :(

Share this comment


Link to comment

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