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 - select_this

Pages: 1 ... 7 8 [9]
121
Audio / Re: Possible bug in the Audio Module with listeners?
« on: March 03, 2014, 05:26:48 pm »
Also observe that in FPS games, the camera is often capped so that you can't look more upwards than perfectly straight up and no further down than straight down. Both of those capped orientations would cause undefined behaviour if the listener is set to follow the orientation of the player.

To quote Laurent from a previous discussion on this topic:

Quote
Absolutely. But do you mean I should change the global world up vector just because you're looking perfectly up? Even in real life, you can't look up 100%. And 99.9% will just work fine.
To me it's ok to have the up vector hard-coded, this is like a physical constant (just like gravity for example).
Besides, I don't understand your second graphical example (but this is probably just because I just woke up ;)).

Here's the topic in question:

http://en.sfml-dev.org/forums/index.php?topic=1225.0

I would argue that the fully rotatable space combat simulator example still stands, though.

122
Audio / Re: Possible bug in the Audio Module with listeners?
« on: March 03, 2014, 05:06:55 pm »
Extrapolating from the discussion above, a possible use case would be using the audio listener in a 3D application where the listener's attached to something freely rotatable on the three axes. I could see that happening in first person games quite easily, e.g. someone moving the camera to look along the Y axis. You might even want to roll the 3D listener on all three axes for something like a space combat simulator.

123
SFML game jam / Re: Theme suggestions now open!
« on: March 03, 2014, 03:33:53 pm »
Out of interest, do you need any assistance with the website? I used to be a web developer by profession before I switch to C++ application development, so might be able to give a hand. I'm not too shabby with design either.

124
General discussions / Re: Source code consistency
« on: March 03, 2014, 11:25:00 am »
I use K&R code styling, modified to suit my tastes better e.g. everything inside a class declaration is indented. Public interface always comes first, as you would expect.

I only ever use spaces as well, no tabs, though I understand the arguments for going for the opposite (just don't mix them, ever!)

I *REALLY* don't like the whole 'put the opening curly brace on a newline' thing that I see everywhere nowadays  :P

125
SFML projects / Re: Feather Kit - A C++ Game Framework
« on: February 25, 2014, 12:55:01 pm »
By the way: You can use double literals such as 1. or 1.0 instead of double(1). And it's not necessary to write struct MessageTag, MessageTag is enough.

I'm not normally so verbose, I'll admit this is test code adapted from something else that I just tweaked.  :)

However, removing the struct bit gives a not declared in this scope error (as I hadn't defined or declared the type prior to this snippet).

Edit: Turns out the copying issue was simply solved with user defined copy constructors:

template <typename TAG, typename... DATATYPES>
class Message {

    public:

        typedef std::tuple<DATATYPES...> TDataTypes;

        Message (Message& message) : m_data(message.m_data) {
        }

        Message (const Message& message) : m_data(message.m_data) {
        }

        template <typename... ARGS>
        Message (ARGS&&... args) : m_data(std::forward<ARGS>(args)...) {
        }

        Message (TDataTypes data) : m_data(std::move(data)) {
        }

        TDataTypes m_data;
};

126
SFML projects / Re: Feather Kit - A C++ Game Framework
« on: February 25, 2014, 10:21:00 am »
This would appear to invalidate the following syntax though:

typedef Message<struct MessageTag, double, double, double> TMessage;

TMessage message1(double(1), double(40), double(42));

TMessage message2(message1);  // Compilation error
TMessage message3 = message2; // Compilation error

I guess it's not a big issue if you never wanted to copy messages around by themselves.

127
SFML projects / Re: Feather Kit - A C++ Game Framework
« on: February 24, 2014, 03:01:38 pm »
Ah okay, that makes sense, thanks. I must admit I've never seen enable_if used in that way before, only when used in conjunction with a template function:

template <typename T = std::tuple<DATATYPES...>>
Message(typename std::enable_if<std::tuple_size<T>() >= 1, dummy>::type = dummy{}) {
}

Your version seems considerably more concise than the syntax I'm familiar with.

128
SFML projects / Re: Feather Kit - A C++ Game Framework
« on: February 24, 2014, 01:35:31 pm »
May I ask what your intention was with the following snippet?:

Message(typename std::enable_if<sizeof...(DataTypes) >= 1>) {}

My understanding of template metaprogramming is a little sketchy, so I might be barking up the wrong tree here, but to me it seems like it's a constructor with an argument of type std::enable_if<cond> (struct), which would be pretty much impossible to call and wouldn't do anything even if it was called.

129
SFML projects / Re: Feather Kit - A C++ Game Framework
« on: January 21, 2014, 05:33:45 pm »
I really like what I've seen of the messaging system; I must admit I'm not a huge fan of the syntax of variadic templates (and templates in general, to be honest - I cringe every time I have to dive into Boost's source) but I like the syntactic sugar of the end result.

130
General discussions / Re: Mutual following on Twitter!
« on: January 16, 2014, 11:19:25 am »
Please allow me to throw my hat into the ring as well.

https://twitter.com/select_this

I've only recently started getting into SFML (and lurking on this forum) but plan on exploring it more within the next few months.

Pages: 1 ... 7 8 [9]