Thank you so much laserlight! I split them into proper header/source file pairs, and everything compiled without a peep. (Well, -Weffc++ made a peep about wptr not being initialized in the...
Type: Posts; User: M.Richard Tober
Thank you so much laserlight! I split them into proper header/source file pairs, and everything compiled without a peep. (Well, -Weffc++ made a peep about wptr not being initialized in the...
Hello, I have an exercise from my text that defines a StrBlob class, then a StrBlobPtr class to hold weak pointers to the StrBlobs. This is from C++ Primer (5th Edition) and coincidentally, the...
Thanks guys. Grumpy, your code still compiled for me, and is very close to my original test-case, but I think I got it now. I was confusing creating an instance of the object with actually using it...
What are the design considerations of an explicit constructor which takes an initializer list vs a non-explicit constructor (which takes an initializer_list).
Example:
explicit...
Well, it's a little hacky, but here's the finished solution:
// Beginning of the code for bullet on bullet collisions.
auto playerShotIter = PlayerBullets.begin();
...
Heya all, long time no see. Anyhow, I've got a situation where a vector of sprites* is checked against another vector of sprites*. If the pair being checked intersect, I'd like to delete them both. I...
Sorry VA, lemme add salvage the thread with some valuable resources:
SFML 2.0 RC just finished by Laurent Gromila: SFML 2.0 RC
Excellent online book on modern OpenGL shading: Learning Modern 3D...
Hey guys, I made a blog so I could share my code with people easier (in IRC for example) and sort of keep a record of my progress for myself.
I just started it today, but anyone's welcome to have...
Hi Aaron and welcome to Cprogramming.com's Game Area! It looks like you've decided to program games in C++! Excellent!
Notes:
- Get in the habit of using the string type from the <string>...
Salem's right, JM. Your loop will trigger when any event is detected - and though the check for the "Key Press & Escape Key" is correct, the second check is incomplete. You're not checking for a...
Thank you both Raigne and VirtualAce! You're suggestions are appriciated, and though I'm at the extent of my programming ability in this project - you've both shown some excellent areas to move into....
Wrote code to form a MUD, like wrote the code for DikuMUD, etc - or simply authored area's for said MUDs?
index_header up since 1994 and still going. :) If I think about it too long, I may go find...
The final optimized Area.Draw: (Comments encouraged)
void Area::Draw(sf::RenderWindow &Screen, Coord Cam, std::vector<sf::Sprite>& Terrain, std::vector<sf::String>& Messages)
{
static bool...
This particular roadblock - the failure to cull the western edge of the viewable screen.
I spent 18 hours looking for a math error. An off-by-one, or perhaps a float-to-int convertion someplace -...
Quick Reply, I used to use SDL (available in C) and switched to SFML (available in C, C++ natively). Not everyone knows about it, but Laurent Gromilia is the maintainer. He's super responsive and the...
Good Call! http://dl.dropbox.com/u/38587998/2DTileEngine It's Linux Binary. Jotti's down for maintenance, but the only dangerous thing about my programs is terrible formatting. :)
If anyone needs a...
=D Thank you so much for your time Phantomotap - I'm getting there.
Well, I don't have a good fetch from "persistent storage/load to memory - save to persistent storage/unload from memory"...
Thank you for the advice! I am also excited about tile games, and also believe the problem is the representation and access of the zones once in memory. Small suggestions like yours are all I ask...
Hey all. The code I've made for this project is massive, convoluted and horrifying. Of course I'll share it on request! =-D Basically this:
2D Tile Based Screen - fine.
Scrolling 2D Tile Based...
I solved it more or less. I restructured and rethought the taxonomy for my classes. This in turn seemed to alleviate some sort of circular name clash. Wish I knew more, but at least it's cleaned up....
My Errors without the constructor:
||=== Test, Debug ===|
include/world.h||In constructor ‘Zone::Zone()’:|
include/world.h|24|warning: ‘Zone::ZoneCoords’ should be initialized in the member...
Wow... It should need <string>, but was compiling without it... well - here is the constants.h for acedemic practices.
Note: Code::Blocks has been flaking out on me a lot lately. Not usually things...
I get a warning about initializing the Zone structure's two components (Zone::ZoneCoords & Zone::ZoneMap), then an error stating "synthesized method 'Zone::Zone()' first required in World's...
if (KeyArray[sf::Key::W]) BallCoords.y -= SPEED * App.GetFrameTime();
I've gone through and started adding in things like this. I ran several tests for frame rate, both constrained by my monitor's...
I'm using SFML's App.SetFramerateLimit() function set to 30 frames per second. This -should- be enforcing a 33 millisecond time frame. I can confirm the main loop is constrained to 30 runs per...