Search found 10 matches
- Tue Oct 19, 2010 5:03 pm
- Forum: Programming Discussion
- Topic: Collision detection, how is it done? (SFML, if that matters)
- Replies: 25
- Views: 5006
Re: Collision detection, how is it done? (SFML, if that matters)
straight up the best book for c++ you can read it, or use the index and look things up. It was written by the designer/implementer of C++ http://www.amazon.com/Programming-Language-3rd-Bjarne-Stroustrup/dp/0201889544 Thanks! I'll consider it. Hefty price though... ;) 89 used from $4.23 Seems like a...
- Sun Oct 17, 2010 7:58 am
- Forum: Programming Discussion
- Topic: Collision detection, how is it done? (SFML, if that matters)
- Replies: 25
- Views: 5006
Re: Collision detection, how is it done? (SFML, if that matters)
straight up the best book for c++ you can read it, or use the index and look things up. It was written by the designer/implementer of C++ http://www.amazon.com/Programming-Language-3rd-Bjarne-Stroustrup/dp/0201889544 Thanks! I'll consider it. Hefty price though... ;) Absolutely don't spend hours on...
- Tue Oct 12, 2010 11:07 am
- Forum: Programming Discussion
- Topic: Collision detection, how is it done? (SFML, if that matters)
- Replies: 25
- Views: 5006
Re: Collision detection, how is it done? (SFML, if that matters)
It's apparent that you're having a difficult time understanding some of the fundamental concepts of C++. Perhaps you should start by learning how to program in C++ without GUIs or SFML, or have you already spent a sufficient amount of time doing this? Drawing text to the screen is not complicated, ...
- Mon Oct 11, 2010 11:49 am
- Forum: Programming Discussion
- Topic: Collision detection, how is it done? (SFML, if that matters)
- Replies: 25
- Views: 5006
Re: Collision detection, how is it done? (SFML, if that matters)
A field is a variable - I'm used to using the C# and Java terminology (not sure why they use their own terms). Yeah, if you're using GetInput and it works then I'd use that. I'm not entirely familiar with SFML so a lot of what I suggested in generic stuff that is a way to get a game going in with a...
- Sun Oct 10, 2010 5:47 am
- Forum: Programming Discussion
- Topic: Collision detection, how is it done? (SFML, if that matters)
- Replies: 25
- Views: 5006
Re: Collision detection, how is it done? (SFML, if that matters)
To the OP, don't worry about collision detection for now. Play around with moving something around and keeping track of it's position. Try this: - Make a class called ball with two public fields - "x" and "y". Give them default values of 0 in the constructor. - Write a function ...
- Wed Oct 06, 2010 1:49 pm
- Forum: Programming Discussion
- Topic: Collision detection, how is it done? (SFML, if that matters)
- Replies: 25
- Views: 5006
Re: Collision detection, how is it done? (SFML, if that matters)
First I tried to write the code. And my compiler said: "argument for class type "sf::rect" is missing". I don't know exactly what that means but I assumed that it wasn't an SFML class. Then I searched for "rect c++" and found something that had written in the code "...
- Wed Oct 06, 2010 12:14 pm
- Forum: Programming Discussion
- Topic: Collision detection, how is it done? (SFML, if that matters)
- Replies: 25
- Views: 5006
Re: Collision detection, how is it done? (SFML, if that matters)
Is there a way for me to assign a position to for example the ball when it's moving? I mean, can I have a variable that "knows" exactly where the ball is? ? ;) class Ball { public: int PositionX, PositionY; // Refer to these variables for the Ball's position sf::Rect BoundingBox; // For c...
- Wed Oct 06, 2010 9:35 am
- Forum: Programming Discussion
- Topic: Collision detection, how is it done? (SFML, if that matters)
- Replies: 25
- Views: 5006
Re: Collision detection, how is it done? (SFML, if that matters)
Thanks for all of the answers! I understood some of it but unfortunatley I don't really understand. I do know about functions, classes and such but I should learn a little more about passing variables for this, I see now. But eventually, I'll get there. And I'll try again ;). Edit: Let me refrase th...
- Sun Oct 03, 2010 4:01 pm
- Forum: Programming Discussion
- Topic: Collision detection, how is it done? (SFML, if that matters)
- Replies: 25
- Views: 5006
Re: Collision detection, how is it done? (SFML, if that matters)
I'm still learning C++ so I have a question. Do I write all of the code that you have written or do I choose one of them? I don't really follow...
Thanks for the answer!
Thanks for the answer!
- Thu Sep 30, 2010 9:59 am
- Forum: Programming Discussion
- Topic: Collision detection, how is it done? (SFML, if that matters)
- Replies: 25
- Views: 5006
Collision detection, how is it done? (SFML, if that matters)
I've searched this forum, I've searched the internet but nothing has helped. Either I'm retarded or it's just that the topics I've found has gotten answers that are a little bit too advanced for me. So, how is it done? I'm making a very simple pong game as my very first game in SFML. I have 2 racket...