Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - dabbertorres

Pages: 1 ... 20 21 [22] 23 24 ... 34
316
General / Re: SFML static linking in CLion FLAC dependency
« on: May 10, 2015, 10:57:22 pm »
Ah, okay. I was thinking he may have "-static" set, which doesn't allow linking to dynamic libs.

317
General / Re: SFML static linking in CLion FLAC dependency
« on: May 10, 2015, 09:50:12 pm »
The file lists for the FLAC packages don't show any static libs, so I'm going to assume that's why. You may have to compile it statically yourself (or find a static version provided elsewhere).

Or you'll need to make sure cmake is looking for the dynamic version of FLAC.

318
General / Re: g++ undefined reference - git project
« on: May 10, 2015, 02:14:23 am »
You need to compile ALL *.cpp files, and link ALL *.o files.

In the command you gave, you're only linking to the main.o file.

319
SFML projects / Re:creation - a top down action rpg about undeads
« on: May 07, 2015, 07:31:38 pm »
I just noticed that you use parentheses around the condition in if statements in Lua, is that a style preference?

321
SFML projects / Re:creation - a top down action rpg about undeads
« on: May 03, 2015, 07:56:31 pm »
Ah. I see. Well, I guess you could then have a BaseSystem class of sorts that System<T> inherits from, and then have a container of BaseSystem*s or something, if each System<T> is all going to have the same functions. Then you could iterate over all the systems. And just add them to the container in the order you need them to update.

Though I do like your method as well.

It's interesting to see the different methods people come up with!

322
SFML projects / Re:creation - a top down action rpg about undeads
« on: May 03, 2015, 01:31:46 am »
As I've understood, one way of doing it is by having each System own an array of the Component it manages.

Something like:
template<typename T, typename std::enable_if<std::is_base_of<Component>::value>::type* = nullptr>
class System
{
      public:
            System();
           
            virtual void update(float dt) = 0;
           
            T& get(int idx);

      private:
            container_of_your_choice<T> components;
};
 

Something like that. It can be pretty much however you want of course.
Then just derive from that for each System/Component type, implement any virtual functions you have, and there you go.

So like:
class GraphicsSystem : public System<GraphicsComponent>
{
      // stuff goes here...
};
 

I'm planning to adjust my own code base to something like this soonTM.

323
Audio / Re: How to repeat music?
« on: April 28, 2015, 07:21:41 am »
Well that's a bit ironic on my part. Guess I should get my eyes checked.

324
Audio / Re: How to repeat music?
« on: April 27, 2015, 11:57:34 pm »
if(mTheme.getStatus() != sf::Music::Status::Playing)
      mTheme.play();
 

documentation.

325
SFML projects / Re: Screenshot Thread
« on: April 22, 2015, 11:47:27 pm »
His twitter is: @eigenbom.

326
Network / Re: TCP Send raw packet bugs
« on: April 20, 2015, 11:05:58 pm »
"sent" is so you can give it a variable to store how many bytes were sent. So you can see that data.

It's acting like a second return variable.

It's not meant to use the value you give it. It doesn't even expect you to give it a value.

327
General / Re: Newbie Time-Based Movement Question
« on: April 17, 2015, 07:56:32 am »
You're using the wrong time value for moving the sprites. You should be using TimePerFrame (which stays constant, which is needed for the smooth movement you want (I'd also make it 'const' to show that)), not timeSinceLastUpdate (which gets progressively smaller).

328
Window / Re: CTRL ALT DEL doesn't minimize full screen window
« on: April 17, 2015, 07:50:52 am »
First: There is a SFML way to get the desktop resolution, no need to use OS specific functions.
sf::VideoMode::getDesktopMode().

Second: Why do you expect this behavior when it isn't the way the OS behaves? Windows (for me at least, though I don't think this is a setting I changed at some point) does not minimize any windows when I press Ctrl-Alt-Del.
Though, if you want that behavior anyways, you'd have to check for those keys being pressed and do it yourself.

330
General / Re: [please read] Error with newly installed SFML
« on: April 12, 2015, 07:59:04 pm »
Did you define SFML_STATIC?

Also, when Nexus says "read the SFML tutorial carefully", he literally means that. Read each sentence. No skipping.

Pages: 1 ... 20 21 [22] 23 24 ... 34