Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
Unknown Quality Score

No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.

~27.0K People Reached
PC Specs
I use Windows 7, but I might look into Linux sometime in the future
Favorite Tags
Member Avatar for Chuckleluck

Hello, I've been having a lot of trouble with collision detection recently. I'm attempting to make a 2D platformer. All I need is rectangle-on-rectangle collision detection, and then to respond on collision by moving the two rectangles involved in opposite directions. Thanks in advance.

Member Avatar for bguild
0
353
Member Avatar for Chuckleluck

This might be a general math question, so excuse me if it doesn't belong here. I have an airplane that flies around the screen. Pressing the W key will make it counterclockwise, and pressing the S key will make it rotate clockwise. When I press space, it shoots bullets. However, …

Member Avatar for Chuckleluck
0
150
Member Avatar for Zhoot

Hey guys. Creating games is one of the best things you can do, am I right? However, nowadays you can choose between so many languages, gfx libraries and game engines. So lets vote! Whats your favorite programming language for making a game? Whats your favorite graphics library? Whats your favorite …

Member Avatar for vinnitro
0
205
Member Avatar for Chuckleluck

Hello, Over the past couple of days, I've been struggling with getting collision detection to work for my game, a 2D sidescrolling platformer, made with SFML 2. This is example code using my most recent method of collision detection, although it has some flaws: // main.h #ifndef MAIN_H #define MAIN_H …

Member Avatar for Chuckleluck
0
625
Member Avatar for Chuckleluck

Hello, I have a simple question. Say I have two files in a folder "Cpp Projects". One file is called "main.h", and the other is inside another folder, say, "Cpp Files", and it is called "main.cpp". Thus, their filenames would be: "...\Cpp Projects\main.h" "...\Cpp Projects\Cpp Files\\main.cpp" Is there a way …

Member Avatar for mike_2000_17
0
15K
Member Avatar for Chuckleluck

The title explains it well. I wish to know which variables I need to delete when my program closes. I assume you don't have to use the delete keyword on *every* variable that you initialize. Thanks in advance.

Member Avatar for Chuckleluck
0
212
Member Avatar for Chuckleluck

Hello, I'm fairly new to programming, and I'm not exactly sure how to do line-rect collision detection. If it helps, I'm using SFML 2. Can someone explain to me how I would go about coding line-rect collision detection? Thanks in advance.

Member Avatar for adityatandon
0
222
Member Avatar for Chuckleluck

Consider I have this piece of code: #include <iostream> using namespace std; enum TEXTURE { SAND, GRASS, DIRT, ROCK, SNOW }; class grid { public: TEXTURE type; string str; }; grid layer[5]; int main() { layer[0].str = "AAAAA"; layer[1].str = "A A A"; layer[2].str = " A A "; layer[3].str …

Member Avatar for mike_2000_17
0
179
Member Avatar for Chuckleluck

Hello, Please excuse me if this isn't the correct place to post this topic. I have a friend that knows PHP, and I know C++. We want to make a PC game together. I would handle making the core game, and he would use PHP to create a server, allow …

Member Avatar for cereal
0
223
Member Avatar for Chuckleluck

Hello, I would like your opinion on my collision detection & jumping code. Is it efficient enough to be used in a full-blown game? Any ideas on how I could improve the efficiency of the code? Any bugs? Please reply with (constructive) criticism, comments & suggestions. Link: http://dl.dropbox.com/u/56274235/Working%20Collision%20Detection%20%26%20Jump.zip Thank you …

0
109
Member Avatar for Chuckleluck

Could someone direct me to an open-source, 2D sidescrolling game developed in C++? (I'd prefer a Mario-style sidescroller, but almost any would do.) I'd like to look at the source code to see some examples of a working sidescroller collision detection system, and a jump algorithm. Thank you for your …

Member Avatar for Serapth
0
204
Member Avatar for Chuckleluck

Can someone give me some resources (books, online tutorials, etc.) on algorithms for 2D collision detection? I've searched a little, and all the ones I can find are for 3D collision detection. Thanks in advance. EDIT: Just to clarify, I know [I]how[/I] to do collision detection, just not efficiently.

Member Avatar for raptr_dflo
0
294
Member Avatar for Chuckleluck

Hello, Suppose I have a chess game. I make a nice class to handle an entire player's pieces: [CODE]class c_ChessTeam { private: // all pieces derive from class c_ChessPiece c_Rook Rook[2]; c_King King; c_Queen Queen; c_Bishop Bishop[2]; c_Knight Knight[2]; c_Pawn Pawn[8]; public: . . . };[/CODE] But what if I'm …

Member Avatar for mrnutty
0
179
Member Avatar for Chuckleluck

I've already got a game project going, using C++ and SFML. I'm planning on releasing it digitally online using PayPal. Question is, how do I keep the game from being pirated? Someone could easily just make a copy of the game and its files, and they've got two versions of …

Member Avatar for Ketsuekiame
0
190
Member Avatar for Chuckleluck

Hello, Here is my example code: [CODE]// Main.h #ifndef MAIN_H #define MAIN_H #include <iostream> using namespace std; #include <string.h> string HelloWorld = "Hello World!\n"; void HelloEarth(); #endif [/CODE] [CODE]// Main.cpp #include "Main.h" int main() { cout << HelloWorld; HelloEarth(); }[/CODE] [CODE]// Secondary.cpp #include "Main.h" void HelloEarth() { cout << HelloWorld; …

Member Avatar for gusano79
0
2K
Member Avatar for Chuckleluck

Hello, I'm using SFML to make a game, and, as it has no built-in collision detection function, I made up my own algorithm. Here it is: [CODE] // Collision.cpp #include "Collision.h" Side CollisionBoxTest(sf::Sprite Hitter, sf::Sprite Hittee) { sf::Rect<int> HitterBox; sf::Rect<int> HitteeBox; // Initialize parameters for Hitterbox int BoxHeight = Hitter.GetHeight(); …

Member Avatar for Eagletalon
0
210
Member Avatar for Chuckleluck

Alright, I decided to try ClanLib. I've been reluctant to use it, because it requires Visual C++, which is foreign to me. I usually use Code::Blocks. Anyway, I'm trying to get the hang of VC++. It seems to have a lot of features I haven't dealt with, like solutions. To …

Member Avatar for Chuckleluck
0
375
Member Avatar for Chuckleluck

Could someone help me with this code? When I compile & run my project, it says "Battlefront.exe has stopped working. Windows is looking for a solution to this problem" This is my code: [CODE]//----------------------------------------------- /// Battlefront.cpp Source Code File /// Part of the Battlefront.cbp Code::Blocks Project //----------------------------------------------- /// This file's …

Member Avatar for Chuckleluck
0
700
Member Avatar for Raik.48

Hello, I am a project on my hand to develop a 2D game like "contra". I have chosen to use C++ as my programming language. Which will be better for my 2d game SMFL, SDL or ClanLib? I have decided to use ClanLib, but is it powerful or flexible as …

Member Avatar for Chuckleluck
0
155
Member Avatar for Chuckleluck

Hello, I'm working on a game, and for this game, I created a class. There is one object of this class for each player in the game: [CODE]class PlayerClass { public: PlayerClass(Nationality); // Constructor ~PlayerClass(); // Destructor sf::Sprite PlayerFeet; sf::Sprite Arms; sf::Sprite Body; sf::Sprite Head; int HitPoints; GameClass CurrentClass; }; …

Member Avatar for Chuckleluck
0
178
Member Avatar for sodha125

I need to make multiple choice and a switch statement is used to check for correct answers. Also introduce a random element whereby the user can roll a dice and skip the following question if he gets a 6 (other rewards/penalties can be introduced for different dice values). this is …

Member Avatar for Chuckleluck
0
2K
Member Avatar for Chuckleluck

Hello, I'm wanting to have multiple .cpp files in one project. I have three files: "Main.cpp" "Secondary.cpp" "Main.h" This is the content of Main.cpp: [CODE]#include "Main.h" #include <iostream> void Engine(); int main() { b = 10; a = 5; std::cout << a << b; Engine(); } [/CODE] This is the …

Member Avatar for Chuckleluck
0
429
Member Avatar for Chuckleluck

Hi, I'm learning to use the Simple, Fast, Multimedia Library (or SFML), and I was going through the tutorials on their website. The first one (found [URL="http://www.sfml-dev.org/tutorials/1.6/window-window.php"]here[/URL]) said the following: [QUOTE]Under Windows operating systems, you may have created a "Windows Application" project, especially if don't want the console to show …

Member Avatar for thines01
0
2K
Member Avatar for Chuckleluck

I'm beginning game development, and I started by reading Michael Morrison's [I]Beginning Game Programming[/I], which teaches how to develop a game in C++ using the Win32 API. I've had a lot of trouble with things I don't have any experience in (when I shut down my program, the process still …

Member Avatar for mrnutty
0
485
Member Avatar for Chuckleluck

I'm using the Win32 API to create a game, and I want to give the player as big of a field of view as possible. The problem is, with the game engine I've developed (from Michael Morrison's [I]Beginning Game Programming[/I]), I can minimize and close the program, but I can't …

Member Avatar for Fbody
0
165
Member Avatar for Chuckleluck

I'm having trouble using the CreateFile() and WriteFile() functions. Here's the code I've written: [CODE]#include <windows.h> #include <iostream> using namespace std; int main() { char cData[6]; DWORD dwBytesWritten; cout << "Please enter a number: "; cin >> cData[1]; for(int i = 2; i < 5; i++) { cout << "\nPlease …

Member Avatar for Chuckleluck
0
196
Member Avatar for Chuckleluck

So I want to make a text-based game that has different maps, displayed in ASCII art-style. I've been tinkering with fstream, and I wrote up this code: [CODE]#include <iostream> using namespace std; #include <fstream> int main() { ifstream indata; int i; int j; int k; char grid[9][9]; char letter; indata.open("grid.txt"); …

Member Avatar for Chuckleluck
0
586