Remember remember the 5th of November (OP)
Legendary
Offline
Activity: 1862
Merit: 1011
Reverse engineer from time to time
|
|
August 28, 2013, 01:26:39 AM |
|
I mean, since Antoine Dodson's Bed Intruder song, UCLA Alexandra Wallace and Harlem Shake, there has been for a long while...nothing trollish,racist,meme-like...
|
BTC:1AiCRMxgf1ptVQwx6hDuKMu4f7F27QmJC2
|
|
|
MysteryMiner
Legendary
Offline
Activity: 1498
Merit: 1038
Death to enemies!
|
|
August 28, 2013, 01:59:18 AM |
|
|
bc1q59y5jp2rrwgxuekc8kjk6s8k2es73uawprre4j
|
|
|
Kyle91
Member
Offline
Activity: 112
Merit: 10
|
|
August 28, 2013, 03:41:41 AM |
|
go on 4chan
|
|
|
|
PerfectAgent
Sr. Member
Offline
Activity: 252
Merit: 250
Still the Best 1973
|
|
August 28, 2013, 05:10:50 AM |
|
|
|
|
|
Lethn
Legendary
Offline
Activity: 1540
Merit: 1000
|
|
August 28, 2013, 05:57:34 AM |
|
It's true actually the internet isn't being as original as it used to be, maybe everyones working on news stuff or something, i need to hurry up and finish learning the coding I need so I can make some fun games to play and not be bored anymore lololool
|
|
|
|
b!z
Legendary
Offline
Activity: 1582
Merit: 1010
|
|
August 28, 2013, 10:01:09 AM |
|
the leethecking guides on ED are all from 2003 or something, they're hilarious to read
|
|
|
|
Remember remember the 5th of November (OP)
Legendary
Offline
Activity: 1862
Merit: 1011
Reverse engineer from time to time
|
|
August 28, 2013, 11:34:21 AM |
|
It's true actually the internet isn't being as original as it used to be, maybe everyones working on news stuff or something, i need to hurry up and finish learning the coding I need so I can make some fun games to play and not be bored anymore lololool Already ahead of you
|
BTC:1AiCRMxgf1ptVQwx6hDuKMu4f7F27QmJC2
|
|
|
Lethn
Legendary
Offline
Activity: 1540
Merit: 1000
|
|
August 28, 2013, 12:31:19 PM |
|
Hah! Bet you're not fixing the FPS issues yet
|
|
|
|
b!z
Legendary
Offline
Activity: 1582
Merit: 1010
|
|
August 28, 2013, 01:24:42 PM |
|
It's true actually the internet isn't being as original as it used to be, maybe everyones working on news stuff or something, i need to hurry up and finish learning the coding I need so I can make some fun games to play and not be bored anymore lololool Already ahead of you Looks like space invaders + mario
|
|
|
|
Lethn
Legendary
Offline
Activity: 1540
Merit: 1000
|
|
August 28, 2013, 02:05:13 PM |
|
I know we just hijacked this thread but what the hell maybe we should make a thread just to show off our WIP games , so far I've managed to make my rabbit thingy move across the screen, need to fix FPS and add collision in for it to properly work and of course put in some gravity. The idea is it's a basic platformer and you play as a rabbit that has to jump up clouds to the moon, the stars are either powerups or bad guys depending on their emotions
|
|
|
|
C10H15N
|
|
August 28, 2013, 02:13:57 PM |
|
The Internet is so 90's...
|
Only when the tide goes out do you discover who's been swimming naked. -Warren Buffett
|
|
|
Remember remember the 5th of November (OP)
Legendary
Offline
Activity: 1862
Merit: 1011
Reverse engineer from time to time
|
|
August 28, 2013, 02:31:20 PM |
|
Collision is simple, assuming that your characters are rectangles here is a sample of my old code bool check_collision_rect(Rect *A, Rect *B) { //The sides of the rectangles int leftA, leftB; int rightA, rightB; int topA, topB; int bottomA, bottomB;
//Calculate the sides of rect A leftA = A->x; rightA = A->x + A->w; topA = A->y; bottomA = A->y + A->h;
//Calculate the sides of rect B leftB = B->x; rightB = B->x + B->w; topB = B->y; bottomB = B->y + B->h;
//If any of the sides from A are outside of B if(bottomA <= topB) { return false; }
if(topA >= bottomB) { return false; }
if(rightA <= leftB) { return false; }
if(leftA >= rightB) { return false; }
//If none of the sides from A are outside B return true; } and double distance(int x1, int y1, int x2, int y2) { //Return the distance between the two points return sqrt( pow( x2 - x1, 2 ) + pow( y2 - y1, 2 ) ); }
bool collision_circle(Circle A, Circle B) { //If the distance between the centers of the circles is less than the sum of their radii if(distance(A.x, A.y, B.x, B.y) < (A.r + B.r)) { //The circles have collided return true; } //If not return false; } It's true actually the internet isn't being as original as it used to be, maybe everyones working on news stuff or something, i need to hurry up and finish learning the coding I need so I can make some fun games to play and not be bored anymore lololool Already ahead of you Looks like space invaders + mario Yeah, I was inspired by mario. At first I was going to make so you could walk up,down,left,right but then decided to make it like Super Mario from 84 for SNES.
|
BTC:1AiCRMxgf1ptVQwx6hDuKMu4f7F27QmJC2
|
|
|
Lethn
Legendary
Offline
Activity: 1540
Merit: 1000
|
|
August 28, 2013, 02:49:29 PM Last edit: August 28, 2013, 03:04:39 PM by Lethn |
|
I'm using SFML myself so the code is already there, I just need to implement it all into my game properly which is harder than it looks!
|
|
|
|
FirstAscent
|
|
August 28, 2013, 03:28:10 PM |
|
bool check_collision_rect(Rect *A, Rect *B) { // The sides of the rectangles int leftA, leftB; int rightA, rightB; int topA, topB; int bottomA, bottomB; // Calculate the sides of rect A leftA = A->x; rightA = A->x + A->w; topA = A->y; bottomA = A->y + A->h;
// Calculate the sides of rect B leftB = B->x; rightB = B->x + B->w; topB = B->y; bottomB = B->y + B->h;
// If any of the sides from A are outside of B if(bottomA <= topB) { return false; }
if(topA >= bottomB) { return false; }
if(rightA <= leftB) { return false; }
if(leftA >= rightB) { return false; }
// If none of the sides from A are outside B return true; } and double distance(int x1, int y1, int x2, int y2) { // Return the distance between the two points return sqrt(pow(x2 - x1, 2) + pow( y2 - y1, 2)); }
bool collision_circle(Circle A, Circle B) { // If the distance between the centers of the circles is // less than the sum of their radii if(distance(A.x, A.y, B.x, B.y) < (A.r + B.r)) { //The circles have collided return true; } // If not return false; } Fixed your code. Issues included no spaces between comments and double slashes, failure to put opening curly bracket for if/else/for/while constructs on same line as opening statement, failure to align assignment operator for variables belonging to a group, and excess spacing around parenthesis.
|
|
|
|
Lethn
Legendary
Offline
Activity: 1540
Merit: 1000
|
|
August 28, 2013, 03:30:04 PM |
|
He did say it was old code you know
|
|
|
|
RodeoX
Legendary
Offline
Activity: 3066
Merit: 1147
The revolution will be monetized!
|
|
August 28, 2013, 03:33:10 PM |
|
Old school!
|
|
|
|
FirstAscent
|
|
August 28, 2013, 04:50:54 PM |
|
Old school!
What is old school?
|
|
|
|
Lauda
Legendary
Offline
Activity: 2674
Merit: 2965
Terminated.
|
|
August 28, 2013, 04:57:27 PM |
|
9gag and 4chan.
|
"The Times 03/Jan/2009 Chancellor on brink of second bailout for banks" 😼 Bitcoin Core ( onion)
|
|
|
|
Remember remember the 5th of November (OP)
Legendary
Offline
Activity: 1862
Merit: 1011
Reverse engineer from time to time
|
|
August 28, 2013, 07:05:12 PM |
|
bool check_collision_rect(Rect *A, Rect *B) { // The sides of the rectangles int leftA, leftB; int rightA, rightB; int topA, topB; int bottomA, bottomB; // Calculate the sides of rect A leftA = A->x; rightA = A->x + A->w; topA = A->y; bottomA = A->y + A->h;
// Calculate the sides of rect B leftB = B->x; rightB = B->x + B->w; topB = B->y; bottomB = B->y + B->h;
// If any of the sides from A are outside of B if(bottomA <= topB) { return false; }
if(topA >= bottomB) { return false; }
if(rightA <= leftB) { return false; }
if(leftA >= rightB) { return false; }
// If none of the sides from A are outside B return true; } and double distance(int x1, int y1, int x2, int y2) { // Return the distance between the two points return sqrt(pow(x2 - x1, 2) + pow( y2 - y1, 2)); }
bool collision_circle(Circle A, Circle B) { // If the distance between the centers of the circles is // less than the sum of their radii if(distance(A.x, A.y, B.x, B.y) < (A.r + B.r)) { //The circles have collided return true; } // If not return false; } Fixed your code. Issues included no spaces between comments and double slashes, failure to put opening curly bracket for if/else/for/while constructs on same line as opening statement, failure to align assignment operator for variables belonging to a group, and excess spacing around parenthesis. Those are just semantics, I write clean code, if you see how the MyBB team code it's just gorgeous. Plus if(eval) { // code } is much better than if(eval) { // code }
|
BTC:1AiCRMxgf1ptVQwx6hDuKMu4f7F27QmJC2
|
|
|
|