ACTUAL GAME TITLE SCREEN SCREENSHOT!
I am working on a c++ game with the name HALO v/s CounterStrike
. wanted to see if someone is intrested in making a scratch version of it cuz its all C++
Because the code is easy to understand and i think a lot of intrested scratchers can make this.
So far the C++ Version has ::
1. Team based gameplay
2. Flag taking Maps // Thats u win by capturing the flag
3. Combat Maps // That is u win by killing most peoples u can .
4. AI . a crispy and very intelligent AI which can climb on ladders , Jump to cross a void
make a choice of saving the flag / objective or to shoot at the enemy. And also knows when to run and when to fight.
5. Fast Gameplay.
The game should be out soon
But i want someone from scratch to make a Scratch Based Online Version of it with or without the full features. So i am embedding coding of C++ game without the AI function because its too huge !! i will post it in a separate post if somebody shows intrest init
Btw i think a list of those who should give this a try
Rhy
Paddle2See
Jack08
Pinochio
ChaoticD
PlaywithFire
CheddarGirl (well her version will be beautifully done with graphics if she starts)
JSO
Illusionist
FG123
Not me cuz i am not a scratch coder anymore xD
But well the doors are open my C++ version will be out soon and also this code will be updated very frequently aswell .
So lets see if somebody takes the challenge
Heres the code so far :: (NOT THE UPADATES AND AI LOOPS as its huge)
//************************************************************************************** //DG Games -> HALO v/s Counter Strike V1 //************************************************************************************** //Programmer : Abhishek Hingnikar (Dark¥) //Date:: 28th December 2010 //Uses DarkGDK by Microsoft and The Game Creators //(c)2010 - DG games - All rights Reserved //All code is understandable if you are human x) #include "DarkGDK.h" // To make camera float CamX = 0 ; float CamY = 0 ; // This functions will interconvert Computer Coordinates to the Cartesian Coordinates inline float Conv2CartX(float X) { return X-512; } inline float Conv2CartY(float Y) { return 383-Y; } inline float Conv2CompX(float X) { return X +512; } inline float Conv2CompY(float Y) { return 383 - Y; } //Waypoints of Map and Code struct Waypoint{ int LevelOne;// Initial Level int LevelTwo;// Final Level int Xpos; int Ypos; char Type[4];// Type= J - Jump , S - StairCase; int Link[4];// Index of waypoint Linked to it int UsedLinks;//To tell how many Links outa 4 has been used }; Waypoint MapPoints[100]; int No_of_MapPoints=0;//No of mappoints using in the map so that we dont go on cheaching for all the points // NO LETS MAKE SOME GROUND WHERE WE CAN STAND // class ground{ int X;// Center Coordinates in cartesian int Y;// Center Coordinates in catresian system float C; // The line constant .. that is the Y coordinate at X = 0 u can find this by mathematica float slope; // thats the angle that line makes wiv X axis; float Length ; // length of the sprite In pixels; int ImageID; int SpriteID; public: // I space is a function that returns 1 if the point is touching ground or is on ground else returns 0; inline int Ispace(float h,float k) { if(abs(h-X)<=(Length*cos(slope)/2)) { if(abs(k-(h*tan(slope)+C))<10) { return 1; } } return 0; } //Update is function to print the whole thing on screen inline void update() { dbSprite(SpriteID,Conv2CompX(X-CamX),Conv2CompY(Y-CamY),ImageID); } // Load() this should be called to Load Map block as its relaiable (XD) void Load() { dbRotateSprite(SpriteID,slope); } }; //Now we have got a Template "Sprite" and we can now make tons of sprites of Map from it //but we keeping in rather safe haha. So just Sprite IDs , 4 - 104, are assigned . to map blocks with the image IDs aswell ground Map[100];// This is map sprites int No_of_Ground=0;//This will tell now many sprites are in use so we only refresh them //Now Lets Come to Basic Programming Mehtadologies :D //Our first basic class which looks like a wargame rathern then a ground survilliance system // Ladies and gentle man I present to you the Class Called weapon XD class Weapon{ float Velocity,Angle,X,Y,Dmi,Range; int MyID,ImageID,Ammo,Clips,Capacity,Iowner,SoundReloadID,SoundFireID; public: void fire(int,int,float);//Declared at the end void threw(); void Pickup(int); void reload() {if(Clips>0) { Ammo += Capacity; Clips--; } } int isrealoading() { return dbSoundPlaying(SoundReloadID); } int isfiring() { return dbSoundPlaying(SoundFireID); } }; Weapon Guns[52]; class charac{ public: float X; float Y; float Health; int Weapons[2]; int chosen; int SpriteIdUp; int SpriteIdDown; float dir; int ColiX; int ColiY; char Team; // C - CounterStrike , H - Halo void Damage(float DMI) { Health -= DMI; } int ispace(int h,int k) { if(abs(h-X)<(ColiX/2)&&abs(k-Y)<(ColiY/2)) { return 1; } else { return 0; } } // Functions for BOT and HUMAN are different but only for input // Humans take input by the Human() function // Bots Use AI() and War() and Movement() functions for input. float damageindex(int); void Update() { } }; charac Players[16];//The players in game where 0 is the base player int No_of_Players; void Weapon::fire(int Xpos,int Ypos,float dir) { float VelX= Velocity*cos(dir); float VelY = Velocity*sin(dir); int i = 1; while( i*Velocity < Range) {for(int k =0;k<No_of_Players;k++) { if(Players[k].ispace((Xpos+(VelX*i)),(Ypos+(VelY*i)))) { Players[k].Damage(Dmi); return; } } for(int k = 0; k < No_of_Ground;k++) { if(Map[k].Ispace((Xpos+(VelX*i)),(Xpos+(VelX*i)))) { return; } } i++; } return; } void Weapon::threw() { Players[Iowner].Weapons[Players[Iowner].chosen] = -1; X = Players[Iowner].X + 30; Y = Players[Iowner].Y - 30; Iowner = -1; } void Weapon::Pickup(int ByMe) { Iowner = ByMe; Guns[Players[Iowner].Weapons[Players[Iowner].chosen]].threw(); Players[Iowner].Weapons[Players[Iowner].chosen] = MyID; } // the main entry point for the application is this function void DarkGDK ( void ) { dbSyncOn ( ); dbSetDisplayMode ( 1024 , 768 , 32 ); dbSetWindowOff(); dbSyncRate ( 60 ); dbDisableEscapeKey ( ); dbLoadImage("back.PNG",1); // Map INITIALISATION! while ( LoopGDK ( ) ) { for(int i=0;i<No_of_Players;i++) { Players[i].Update(); } for(int i=0;i<No_of_Ground;i++) { Map[i].update(); } if ( dbEscapeKey ( ) ) { break; } dbSync ( ); } return; }
Last edited by fanofcena (2010-12-31 00:09:56)
Offline
Rik408 wrote:
I really wish I could help. I tried to learn C++, but I had a "BRAIN OVURLOAD!" Moment and gave up. I could code in batch then some fool could translate it to C++? XD
Lol i coding it to C++ u need to convert it to scratch (A) ..
Its fairly hard to learn C++ though but i can teach any1 C++ in 30 mins (if he has got a good IQ and good knowledge of scratch)
Offline
don't close! This is awesome.
Btw, fanofcena, if you can teach anyone C++ in 30 minutes, why don't you create a tutorial? I'm working my way through the code right now, its really simple actualy.
Edit: Just full of functions I don't know of/understand.(And things that I don't yet know of)
Last edited by markyparky56 (2011-01-09 10:16:10)
Offline
markyparky56 wrote:
, if you can teach anyone C++ in 30 minutes, why don't you create a tutorial?
Exams and RADIO are taking most of my time , after my finals end i will have 3 months i will make a whole Series of Lets learn to code thingies teaching C++ and how to make things and stuff wiv programming + how to think computational .. the only problem is time management (I AM OVERBURDENED x) )
Offline
fanofcena wrote:
markyparky56 wrote:
, if you can teach anyone C++ in 30 minutes, why don't you create a tutorial?
Exams and RADIO are taking most of my time , after my finals end i will have 3 months i will make a whole Series of Lets learn to code thingies teaching C++ and how to make things and stuff wiv programming + how to think computational .. the only problem is time management (I AM OVERBURDENED x) )
When do you have your finals?
About the code...
Code:
charac Players[16];2 things:
1. that makes 17 characters, if as you say in the comments next to it//The players in game where 0 is the base player
2. Are these only bots and the Player himself is the 18th? make it a 9V9 game?
Offline
markyparky56 wrote:
fanofcena wrote:
markyparky56 wrote:
, if you can teach anyone C++ in 30 minutes, why don't you create a tutorial?
Exams and RADIO are taking most of my time , after my finals end i will have 3 months i will make a whole Series of Lets learn to code thingies teaching C++ and how to make things and stuff wiv programming + how to think computational .. the only problem is time management (I AM OVERBURDENED x) )
When do you have your finals?
About the code...
Code:
charac Players[16];2 things:
1. that makes 17 characters, if as you say in the comments next to it//The players in game where 0 is the base player
2. Are these only bots and the Player himself is the 18th? make it a 9V9 game?
well my finals are varied starting from 1st march to 4th June (ending wiv SAT entrance test) .. sooo well its long time from now lol
and
charac Players[16];
That makes 16 players sire , with indexes 0 - 15 (where 0 is the initial players number in the array and 15 the last players index in the array) , Now Human Player is 0th indexed object in the list i made the class declarations (that i didnt pasted cuz they were way too big )such that they take input from Key board / Mouse if the Object is player and Automatically Decide what to do if Object is to be a bot . so it saves a lot of pain rather then making different objects also helps in fast and sleek runtime .
Last edited by fanofcena (2011-01-09 10:46:36)
Offline
fanofcena wrote:
markyparky56 wrote:
fanofcena wrote:
markyparky56 wrote:
, if you can teach anyone C++ in 30 minutes, why don't you create a tutorial?
Exams and RADIO are taking most of my time , after my finals end i will have 3 months i will make a whole Series of Lets learn to code thingies teaching C++ and how to make things and stuff wiv programming + how to think computational .. the only problem is time management (I AM OVERBURDENED x) )
When do you have your finals?
About the code...
Code:
charac Players[16];2 things:
1. that makes 17 characters, if as you say in the comments next to it
2. Are these only bots and the Player himself is the 18th? make it a 9V9 game?well my finals are varied starting from 1st march to 4th June (ending wiv SAT entrance test) .. sooo well its long time from now lol
andCode:
charac Players[16];That makes 16 players sire , with indexes 0 - 15 (where 0 is the initial players number in the array and 15 the last players index in the array) , Now Human Player is 0th indexed object in the list i made the class declarations (that i didnt pasted cuz they were way too big )such that they take input from Key board / Mouse if the Object is player and Automatically Decide what to do if Object is to be a bot . so it saves a lot of pain rather then making different objects also helps in fast and sleek runtime .
Now thats just confusing me, why would it be [16] if the base is 0?
Offline
markyparky56 wrote:
fanofcena wrote:
markyparky56 wrote:
fanofcena wrote:
markyparky56 wrote:
, if you can teach anyone C++ in 30 minutes, why don't you create a tutorial?
Exams and RADIO are taking most of my time , after my finals end i will have 3 months i will make a whole Series of Lets learn to code thingies teaching C++ and how to make things and stuff wiv programming + how to think computational .. the only problem is time management (I AM OVERBURDENED x) )
When do you have your finals?
well my finals are varied starting from 1st march to 4th June (ending wiv SAT entrance test) .. sooo well its long time from now lol
andCode:
charac Players[16];That makes 16 players sire , with indexes 0 - 15 (where 0 is the initial players number in the array and 15 the last players index in the array) , Now Human Player is 0th indexed object in the list i made the class declarations (that i didnt pasted cuz they were way too big )such that they take input from Key board / Mouse if the Object is player and Automatically Decide what to do if Object is to be a bot . so it saves a lot of pain rather then making different objects also helps in fast and sleek runtime .
Now thats just confusing me, why would it be [16] if the base is 0?
C++ makes arrays like ::
int Arr[3];// will declare an array of 3 elements
//Such that Arr[0] - First element
//Such that Arr[1]- Second Element
//Such that Arr[2] - Third Element
i think that will solve ur confusion
Offline
fanofcena wrote:
markyparky56 wrote:
fanofcena wrote:
well my finals are varied starting from 1st march to 4th June (ending wiv SAT entrance test) .. sooo well its long time from now lol
andCode:
charac Players[16];That makes 16 players sire , with indexes 0 - 15 (where 0 is the initial players number in the array and 15 the last players index in the array) , Now Human Player is 0th indexed object in the list i made the class declarations (that i didnt pasted cuz they were way too big )such that they take input from Key board / Mouse if the Object is player and Automatically Decide what to do if Object is to be a bot . so it saves a lot of pain rather then making different objects also helps in fast and sleek runtime .
Now thats just confusing me, why would it be [16] if the base is 0?
C++ makes arrays like ::
int Arr[3];// will declare an array of 3 elements
//Such that Arr[0] - First element
//Such that Arr[1]- Second Element
//Such that Arr[2] - Third Element
i think that will solve ur confusion
So it creates 3 elements, that makes sense.
Is this game 2D or 3D? (I'm geusing 3D since its DarkGDK) Where'd you get models for spartans?
Offline
markyparky56 wrote:
fanofcena wrote:
markyparky56 wrote:
Now thats just confusing me, why would it be [16] if the base is 0?C++ makes arrays like ::
int Arr[3];// will declare an array of 3 elements
//Such that Arr[0] - First element
//Such that Arr[1]- Second Element
//Such that Arr[2] - Third Element
i think that will solve ur confusionSo it creates 3 elements, that makes sense.
Is this game 2D or 3D? (I'm geusing 3D since its DarkGDK) Where'd you get models for spartans?
its 2.5 D for sake of simplicity
and getting models isnt a big deal .. when u can make them themselves or you can code something to export .skp files as .x
Offline
fanofcena wrote:
markyparky56 wrote:
fanofcena wrote:
C++ makes arrays like ::
int Arr[3];// will declare an array of 3 elements
//Such that Arr[0] - First element
//Such that Arr[1]- Second Element
//Such that Arr[2] - Third Element
i think that will solve ur confusionSo it creates 3 elements, that makes sense.
Is this game 2D or 3D? (I'm geusing 3D since its DarkGDK) Where'd you get models for spartans?its 2.5 D for sake of simplicity
and getting models isnt a big deal .. when u can make them themselves or you can code something to export .skp files as .x
so its like a side scroller? And I think 2.5D is harder than 2D and 3D...
Offline
fanofcena wrote:
2.5D is easier then 3d but harder then 2D .
2.5D is just 2D with depth. And the camera can rotate on all three axises
Offline
fanofcena wrote:
lol its easier to programm when u need to code AI and wall detection
But less realistic.
Offline
bump.
How long until the game will be done?
Offline
fanofcena wrote:
idk (A) i have exams!
Ok. Just wondering.
Offline