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

About this blog

The ups and downs of a self taught programmer.

Entries in this blog


Just stumbled on a tool/engine called Unity. It seems really cool and to be able to do 3D in a web browser is really intresting. My cousin and I have decided to use it for our development on our current game. So I plan on keeping everyone posted on Unity and our trials and tribulations with it.

Recently I have been working on a sever system and network engine. Well for the last 3 days I have been fighting a bug while setting things up to receive multiple packets at once. The code looked great but for some reason anytime I received more then 1 message it would corrupt the msg's and/or crash my program. I changed all the code around and messed with it and kept fighting it. Then this morning I just happened to look a the debug output of the test client and noticed a 0 that shouldn't be there. Turns out only my first test MSG was getting its length set properly and so on the server side it read the wrong part of the receive buffer. So I looked for 3 days almost in the wrong spot. The good thing about this is it has taught me to keep a broad thought process when you have a ugly bug because it could be caused elsewhere. So time to finally move forward and not make that mistake again.
Well today was a great day for coding. Got off work early and was able to really hit it hard. Today I took on function pointers to help implement my design for my network engine and its message handling system. I understand this may not be a great way to go about things but its a way of doing it and it seems to work.. Well anyway it was my first run in with function pointers and I was a little intimidated by the syntax.. But I got it and it works beautifully.. So now on to more fun subjects inside this little network programming saga... More to come.


Its amazing how things can change instantly in one day. Yesterday I was just thinking about networks programming and reading all i could on that to spending a majority of my thoughts and time looking at houses to move to lol. The people we were going to buy our house from have backed out because they are getting a divorce and the husband wants to move back into our house. So now we are left looking for a home, I look at it as a good thing because we needed the change. But its amazing how time consuming it is. What is nice is that for the first time in my life something un-expected has come up and i have been ready for it financially. So back to reading just wanted to update.
So I finally stopped procrastinating and started teaching myself network programming (where I eventually want to end up). I am reading Unix Network Programming, and its a good book but I feel the choice to write the book filled with wrapper functions. Me personally I feel it makes it harder for someone to learn. I understand how it makes it easier to make IPv4 and IPv6 code simousltly. But so far its going well and hopefully ill have some codes to post up for all of you.

Eric Ranaldi
AKA RanBlade


Well so much for Space Shooter. A lil back history here, This was my cousin's senior project for college and his 2 partners were flaking on him so he asked his adviser if I could help and he said it was cool. So the work began and we tore through it the game was almost completed it was time for refining and polishing as well as adding the story scripting to it. Then his adviser threw on the brakes and decided he was going to take design control and give them assignments on what to do next(this was to make sure his partners did something). But now its pretty much he is making his partners finish the game. So done with that one on to the next on lol.

Were working on the details of a Monster truck race game with network support. Should be fun and Ill hopefully be putting up some war stories on it soon.

AKA RanBlade

Long week

well my cousin and I have been working on a 3-D space shooter for a little while now and we have really started focusing on it in the last week or so. we now have a enemyship that flies around trying to fly towards you. You can fire you main cannon and the bullets collision is setup. Then today we added the ability to fire missiles and cycle through your different missiles.

Its going great and its a blast. Next we are working on a 3D sonar system for the cockpit and a "holograph" picture of your current target. As well as get more levels loaded and what not.
here are a couple screenies

More to come

Eric Ranaldi
AKA RanBlade

P.S. we are using python and Panda 3d Game Engine


The transplant went great my dad's new kidney is working awesome and my wife is getting out of the hospital today. So all is good and its time to get back to work!. Thank God that is over and all went well. more to come

Eric Ranaldi


Well my wife is giving my father a kidney and the surgery is tomorrow. I have been sitting here all day and been browsing around so I figured I would come here and post a journal entry.

This surgery has really opened my eyes in my life to show me how short it is and can be if you sit on your butt and don't work for your dreams. I have the same disease as my father and this is a reality check to me to see this process and to see my dad in the condition he is in. So in the last few months I have really picked up on my efforts(I never stopped just was messing around a lot) to get a portfolio and start getting towards working as a programmer. And it has gone very well. I have been working on my math skills(which are in dire need of help).as well I have been not only working on programming theories and syntax I have been working on making sure that I use good style and clean code that is reusable and portable. And I actually have been programming A LOT in both C++ and python. Started working on network programming in unix and windows. So I am very excited for the future. Actually right now we are working on a project for my cousin a spaceship 3D shooter, and its coming along nicely. After that we have decided to work on a game engine for the practice and for our portfolios. I will be keeping this journal more up to date on what we are doing with our projects. I hope to get some good feedback and maybe even help some people.

So keep checking back in and read what I got. I may not have all the savvy programmer terms for stuff and it may seem weird how I describe things but I will still try and keep a log and journal of my adventures for your amusement.

Eric Ranaldi

New Baby!

I also forgot to mention with all the stuff going on around here.. On Nov 5th 2006 my daughter Haylee was born. A healthy 9lbs 1oz baby girl.!!
I have gone through my books, searched the net, changed my code around but I just cant get it to work.

I have my engine as one project. then I created Fantasy Battle as another project and Iam including the files. for some reason i keep getting unresolved link errors that all the things on the web say that its caused by declaring your function but not defineing it.. Well I have defined it so Iam doing something else wrong. The only thing I can find is this damn "failure to define your functions stuff" and thats not my problem..

game.obj : error LNK2001: unresolved external symbol "public: struct SDL_Surface * __thiscall Surface::LoadImage(char *)" (?LoadImage@Surface@@QAEPAUSDL_Surface@@PAD@Z)
game.obj : error LNK2001: unresolved external symbol "public: void __thiscall Video_System::DrawSprite(struct SDL_Surface *,int,int)" (?DrawSprite@Video_System@@QAEXPAUSDL_Surface@@HH@Z)
game.obj : error LNK2001: unresolved external symbol "class Video_System Video" (?Video@@3VVideo_System@@A)
game.obj : error LNK2001: unresolved external symbol "public: struct SDL_Surface * __thiscall Surface::GetSurface(void)" (?GetSurface@Surface@@QAEPAUSDL_Surface@@XZ)
game.obj : error LNK2001: unresolved external symbol "public: bool __thiscall STATE_System::HandleInput(void)" (?HandleInput@STATE_System@@QAE_NXZ)
game.obj : error LNK2001: unresolved external symbol "public: void __thiscall Video_System::SetProgName(char *)" (?SetProgName@Video_System@@QAEXPAD@Z)
game.obj : error LNK2001: unresolved external symbol "public: void __thiscall Video_System::Init(void)" (?Init@Video_System@@QAEXXZ)
Debug/Fantasy Battle.exe : fatal error LNK1120: 7 unresolved externals
Error executing link.exe.

these errors are in my Fantasy Battle project. The Surface and video function declarartions are in video.h of my game engine project and the defenition is in video.cpp, the state_system is in system.h of my game engine project and the defenetions are in system.cpp ... and so on for the others...

So atm Iam stumped but hope to figure it out soon.

{EDIT} So after furthur testing if I include the .cpp files as well then it will link just fine. But I didnt want to have to include any cpp files. so gota keep looking for how to fix this :/


Well I downloaded Gimp today.. and made my two logos.. now I have a open source image editor. Time to see if i can put out anyhting legiable for Fantasy Battle. Could take some time haha as you can see by those logos.


Well I didnt like how I was handling the game loop. I wanted the game to have control of it and not my engine. But I still wanted the engine to handle all keypresses and whatnot. So I took my while loop out of it and made a Run fucntion in my Test_Game class that calls the new HandleInput() function from my event/state management class.

I know this project is going to look ugly at the end(as much as I try hard to keep it clean and commented) but it is helping me learn so much about the way a full featured game will run and progress. Even though it seems as if it is more then I can chew at times I eventually work through it... Well I have aprenticeship training in the morning so I better hit the bed for the night.


Another Day.

Lots going on these last few days with work..As well with my engine, Not only did i get my state manager working the way I wanted and intented I also got simple logging and timer systems. So its moving right along working with Collision detection now. So Iam pretty excited its all working out atm.

I have been thinking about taking courses at Game Institue. I think it would be good for me to take some courses that are online and not as time consuming as a whole degree. So it seems like it would work well with my schedule of work and family and give me another means to learn and see a diffrent way other then my own. I should also be upgrading my Visual Studio soon and finnally getting rid of VSC++ 6.0..

Lots going on and more to come

Screenshots of my engine and games to come soon.


Well my engine's state system moved forward today. The event system I made while I was working on this a year ago just looped through every current state that handled event and sent it the event. The problem was if two diffrent states used the same key for diffrent things it prossesed them both. So now I have adde some ID's to each of my event handling interfaces and make a CurrentID that is static among all the interface classes so each knows which one is in scope and then the only one that recives messages is the state that is in the focus of the program.

The event handling class:

class Event_Handler
virtual void HandleEvent( Event e ) = 0;
void SetID(int tempID){ STATEID = tempID; }
int GetID(){return STATEID;}

static int CurrentSTATEID;
void ChangeSTATE(int TempSTATE){CurrentSTATEID = TempSTATE;}


The main game loop and state manager:

class STATE_System
std::vector STATES;
std::vector::iterator iter;


void DispatchEvent( int Type, int Arg1 = 0 , int Arg2 = 0 );

void RegisterSTATE( Event_Handler* Interface, int defaultstate = -1 );

void ClearSTATES();

void Run();


and my DispatchEvent():

void STATE_System::DispatchEvent( int Type, int Arg1, int Arg2 )

Event e;
e.Type = Type;
e.Arg1 = Arg1;
e.Arg2 = Arg2;

for(int i = 0; i < STATES.size(); ++i)
if(STATES->GetID() == STATES->CurrentSTATEID )
STATES->HandleEvent( e );

I dont know if its VC++ 6.0(I know I need to update) but for some reason it dosent like iterators that much.. maybe Ill play with them later. but for now Iam just indexing everything.

Finnally got a linux distro on one of my computers.. now I should be able to have some more fun.

Ya wife gave me her computer because she hardly uses it and my laptop is dead now.
So I threw a second HD in it and installed Linux. Time to go explore the OS
Iam getting into the middle of working on my GameState Manager and I get called out of the room to do something and come back and my laptop had been pulled off the table and the connector to my battery pack had been broken.. Currently dont have the cash to go buy a new battery pack so I was so pissed that now Iam not going to be able to work on my stuff cept on paper until I get a few more weeks of work in to get some extra cash.

Then I remembered that I had stored all my source code on my wifes computer because my laptop has been acting up.. (the pcima and cdrom died... as well my ethernet port died and a wireless adapter got messed up...)So now I just need to put my compiler on my wifes computer. This is the first time I ever backed up any data of mine and it has really made me think of its importance...

So moral is always backup on a regular basis.. especially when you have a 2 year old son who wont leave your computers alone for anything..
I have decided to go with a 2D side view for Fantasy Battle. I have my Legacy engine I have been working on that Iam going to use for this game. So I should have some screenshots here in a couple days.

Stay tuned for more updates.

Basic Char Info

Well I have worked out a basic stats and info for the characters and classes concering the inital stats for each one so here it goes..

Fantasy Battle V1.0
Basic Character Info


BStr = Base Strength
BInt = Base Intelegence
BDex = Base Dexterity

BHP = Base Hit Points
BMP = Base Mana Points
BFP = Base Fatigue Points

BStr = Base Racial Strength
BDex = Base Racial Dexterity
BInt = Base Racial Intelegence

SCB = Strength Class Bonus
ICB = Intelegence Class Bonus
DCB = Dexterity Class Bonus

Str = Character Strength
Dex = Character Dexterity
Int = Character Intelegence

Str = BStr + SCB
Dex = BDex + DCB
Int = BInt + ICB

BHP = Str*10
BMP = Int*10
BFP = Dex*10

Initial Racial:
Race: Stats:
BStr BDex BInt
Human 10 10 10
Elf 7 10 13
Orc 13 12 5
Gnome 7 14 9

Inital Class:

Fighter Str+3 Int-1 Dex+1
Mage Str-2 Int+5 Dex-1
Rogue Str+1 Int+1 Dex+2

Example of a Orc Fighter ----- Elf Fighter
Str:16 ------------------------- Str: 7
Dex:13 ------------------------ Dex:10
Int: 4 ------------------------- Int:13
BHP:160 ----------- ---------- BHP:100
BMP: 40 ---- ----------------- BMP:120
BFP:130 ---------------------- BFP:110

And a Orc Mage ---- Elf Mage
Str:13 ---- ------------ Str: 7
Dex:12 ---- ----------- Dex:10
Int: 5 ---- ----------- - Int:13
BHP:110 ---- ---------- BHP: 50
BMP:100 --- - - ------- BMP:170
BFP:110 ---- ---------- BFP: 90


Fantasy Battle !

Introducing my new concept
Fantasy Battle

The game will be a text based 1v1 battle with fantasy characters. The goal will to beat your opponet in a head2head battle. It is meant to be a simple yet fun game.

Version 1:
It will be single player pitted against a random AI opponet.

There will be 4 races:

As well as 3 classes

Skills and abilities are still under review.

You will be able to make your player and fight with him. Saving your progress as you go along.

Version 2

Version 2 will introduce network play where 2 players can face off with each other.
As well your character will now gain power and become stronger enabling him/her to do more powerful attacks.


Version 3

Will have a centeral server that whill hold your win/loss and implement some kind of ladder/ranking system.


That is my idea and Ill keep you posted on progress and info.

Long week

Whoa been a long week. Wife is 9 months along now and had a couple false alarms. Cant wait till the new baby actually gets here. It will cut down even more on my programming time.. But o well.

Anyway on to other things I got a lot more work done with a test server and client(cant really do much yet) got it going on my PC tommorow ill move it onto my network with all the computers in my house then ill try and find some people that want to mess around and try and connect to me from around the world. should be a fun week. Maybe Ill have a working chat by the end of the week. who knows.

More updates to come.
Well I cant belive I wasted this time. I finnally broke the addiction called MMO's these last few weeks. Thats no joke I look back on the things I have acomplished in the game and the things I could have of accomplished in programming and game development and it makes me so mad at myself. I could have completed my first few games by now probably and be onto something I would be really intrested in. Anyway Iam pretty sure I have kicked it been almost a week and a half and I havent even desired to play WoW.

But on a better note I sat down and did some programming today and I got my first sockets program to work without a tutorial showing me exactly how to type it out. That makes me excited as network programming is what I want to do. So moving on with that and learning some gfx programming I should have my hands full. Also I got a new Ipod nano, that thing is sweet(kinda hard to get use to at first). So now I should have more moblie music to go around with me and I dont have to keep it stored on my laptop.

Well anyway time for sleep and work. Glad to be back and hope I can keep resisting any urge to play WoW(thinking about it, its really sad how it actually is addicting and I as well as many others have to fight to not play it).



Well time sure can fly by when you dont think to much about it. I went to take a lil break to play some WoW with my bro and friend adn man time flew. I realized today that I have spent a lot of time not programming and I wish I hadnt now. Oh well now that iam out of my stupor of playing that mindless game I should get some more work done. Screens and demos to come I hope. peace


Ok an update on my engine.. its a simple one and I want to keep it that way to make making the simple games easier.

Video/rendering - SDL
Surface Class
Can load BMP
Can set transparency with ease.

Video_System Class
Can Init the SDL video system
Can Draw to the screen
Can set Resolution width and height
Can also set programname and icon
Can updatescreen and clearscreen
The Video system as it stands right now is just a bunch of wrapper functions to hide SDL and make things a easy one call.

Plans for the Video/rendering
I plan on intergrating SDL_ttf in the same way as the surface's to make creating and writing text a simple call. not sure about anything else right now

Sound - SDL_mixer
Effect Class:
Can load a sound effectt
Music Class:
Can load a music file
Can play music/sound effects
Can init the sound system
Very basic set of wrapper functions and I dont think i will get much more into it but we shall see

Event System:
This is a variatey of classes that make the event system not bound by the API but by a defined list of events.
Right now its very primitive and the keyevents have to still be set but the game code is not in the Message pump instead hte message pump dispatchs events to all registered interfaces. Those interfaces then check there list of events and see if they have something defined for that event and if they do they perform the event.
As of right now I have 3 problems Iam working on. Right now each interface is sent every event so say if someone uses the up down left right keys as movement in there game interface and then want it to do something in there menu interface like scrolling the options it will try to perform all of those.
I also want to setup a keybinding system so that the events bound to a key can be variable and change at a glance without going into the engine code.
And the 3rd problem is tied directly into the second in the fact that each event is hardcoded to a key and I would like to change that.
This is where iam working right now and will be for awhile and Iam actually having fun here.

For the future
In the future I plan on adding a mapping system. My goal would be to make it versitile enough to have a simple map that can be used as a board for a board game and it will also be able to do a fairly complex based tile map/Isometric tile map.. we shall see

Also as I learn more about it collision detection, animation, physics as I will eventually be making a RPG or shooter or something that requires atleast collision detection..

A Timer system for the various issues of timed abilities and FPS counters and all that jazz...

As well give the engine file i/o capabilities for the maps and settings of keybindings and whatnot... in the end i would love to go from a simple engine that can do things like tictactoe and conect four to do a RPG..

With this approach iam hoping to be able to be able to change to say OGL or D3D or something in the future with very little changes for the games...

This my friends is the Legacy Engine. As soon as I get off work ill make up a lil demo so you can see it (even though it is so simple)

As well Iam making a hangman game with what I have right now.
Sign in to follow this  
  • Advertisement