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

Pages: [1] 2 3 ... 18
1
SFML projects / Re: Updator (2013/05/11 : new version 0.3)
« on: May 11, 2013, 03:58:24 pm »
Good to hear updates from the Updator  :)

2
SFML projects / Re: [Released] libMy - Datapackaging library
« on: April 17, 2012, 09:25:36 pm »
You suggest to encrypting first, then compress. That gives terrible results. Remember that an encrypted file is all "random" data, there are no data repetitions to be compressed.

Currently I compress and encrypt each object individually. An index table is kept at the start of the pack with the offset of each object, for random access the objects.

3
SFML projects / Re: [Released] libMy - Datapackaging library
« on: April 17, 2012, 05:44:38 pm »
Well the challenge on implementing seek is that it cannot simply use seek of *put compression lib name here* (eg. gzip seek provided by zlib), because first it's encrypted. So the process of knowing where to jump in the file, decrypt a chunk and then decompress the same chunk is a bit tricky. I would have to create my own resource header and deal with zlib random access capabilities.

I'll skip streaming for now and use loadFromMemory, and proceed with my engine. Eventually I'll add this functionality sometime later.

4
SFML projects / Re: [Released] libMy - Datapackaging library
« on: April 15, 2012, 07:35:52 pm »
How did I miss this thread? Could have saved me some time.. or maybe not, since it doesn't have encryption yet, right?

I'm working on my own packaging system, it already pack/unpack stuff with compression and encryption. I use zlib and Rijndael cipher (a.k.a. AES). Probably going to use SHA2 to hash keys for user data packages.

But my lib is rather simple, once packed, resources are accessed through their index in the package (because I personally don't need a better mapping, at least not yet).

I'm about to do a class derived from sf::InputStream to stream stuff (I need it for music mostly) but I'm not sure how to deal with seek and getSize. For the latter I guess I'll have to store the size of the original files.

5
SFML website / Re: New forum
« on: March 26, 2012, 12:34:55 pm »
I looked at the smiley sets available on the SMF website, but none of them was looking good :(
Well you can add your own smileys (read "pick old forum smiley and put them here").
I have my own set of smileys with default, christmas, summer and halloween themes (last two made by myself) but that's certainly unnecessary for here

Loving the new look

6
General discussions / Do you use C++11?
« on: March 13, 2012, 02:52:50 pm »
Quote from: "OniLink10"
It's a keyword.

I know, but I still feel it strange:
http://en.cppreference.com/w/cpp/keyword
We have keywords like const_cast and not_eq, and other keywords like constexpr and nullptr. I can somehow understand the difference between the "class" of keywords using '_' and those without, but I don't particularly enjoy it. When I started using smart pointers I always wrote null_ptr by mistake  :P

7
General discussions / Do you use C++11?
« on: March 13, 2012, 01:49:28 pm »
Something I feel strage is the naming convention on pointers. unique_ptr, shared_ptr, weak_ptr, ok, all using underscore, then we have nullptr.

8
General discussions / Re: Do you use C++11?
« on: March 12, 2012, 11:45:12 am »
I read about C++11 features a while ago and was amazed with it, started using right away. But so far I only use unordered_map/set, forward_list, the memory library, and some features like "enum class" and RValue references. Lambda expressions is something I want to try sometime but I didn't need it yet. I think I used something from the functional lib once too, that's something I definitely have to look better and start using more often.

9
General discussions / New naming convention
« on: January 09, 2012, 12:23:56 am »
I never thought you would change your mind after all the discussion on the forum :lol: I'm glad that you did - except for the is/get omission. I never heard about this convention before, but that's not the reason why I question it.

Quote from: "Laurent"
I admit that omitting is/get can lead to ambiguity because in english, a verb and its corresponding noun can be identical. But that's not a big issue to me, once you know what the function does, or if you read the doc / tutorials before coding, everything should be ok.

What happened to the Simple keyword? The name of a function should suggest and recall what it does as much as possible, while keeping it short so it's easy to read and fast to type.
In the particular case of getters/setters I don't see any advantage of making syntax shorter by omitting the get/is. Getters/setters tend to be so intuitive that you don't even need to read the documentation to know what it does. When reading code the get/is prefixes give you an immediate idea of what's going there, in particular it recalls you that it's just a getter, const and safe.
I think that those prefixes are simpler than omitting them, I don't see a good reason to omit them

10
General discussions / New graphics API ready
« on: December 16, 2011, 01:21:37 am »
After trying a lot seems that I couldn't get new drivers for my graphics card.. my guess is either due to ATI acquisition by AMD or this card being too old (5 years or so). It's not a bad time to think on a new computer.

11
General discussions / New graphics API ready
« on: December 15, 2011, 09:08:52 pm »
ATI Mobility Radeon X1400

12
General discussions / New graphics API ready
« on: December 15, 2011, 09:03:09 pm »
It's really just that :P

Code: [Select]
#include <SFML/Graphics.hpp>

int main(){

    sf::RenderWindow window(sf::VideoMode(800, 600), "SFML window");

    sf::RenderTexture texture;
    if (!texture.Create(300, 300)) return EXIT_FAILURE;

    sf::CircleShape circle(100);
    circle.SetFillColor(sf::Color::Green);

    texture.Clear(sf::Color::Blue);
    texture.Draw(circle);
    texture.Display();

    sf::Event event;
    while (window.IsOpened()){
        while (window.PollEvent(event)){
            if (event.Type == sf::Event::Closed){
                window.Close();
            }
        }
        window.Clear();
        sf::Sprite sprite(texture.GetTexture());
        window.Draw(sprite);
        //window.Draw(circle);
        window.Display();
    }
    return EXIT_SUCCESS;
}

13
General discussions / New graphics API ready
« on: December 15, 2011, 04:51:58 pm »
Anything I draw onto a RenderTexture isn't displayed.

Code: [Select]
   sf::RenderTexture texture;
    if (!texture.Create(300, 300)) return -1;

    sf::CircleShape circle(100);
    circle.SetFillColor(sf::Color::Green);

    texture.Clear(sf::Color::Blue);
    texture.Draw(circle);
    texture.Display(); // display the drawn circle

    while (window.IsOpened()){
        window.Clear();
        sf::Sprite sprite(texture.GetTexture());
        window.Draw(sprite);
        window.Display();
    }


Output: black screen with a blue square on top left; the green circle is missing.


Also, possibly a typo on documentation?
sf::RenderTexture::SetSmooth: This parameter is enabled by default.
sf::Texture::SetSmooth: The smooth filter is disabled by default.

14
General discussions / New graphics API ready
« on: December 04, 2011, 01:15:54 am »
I didn't see the API yet, sorry, but I think a star class should be used as an example of a custom shape, either on sfml examples or provided at the wiki. It doesn't sound very useful as a built in feature of SFML.

15
General discussions / Switched times to Uint32 milliseconds in SFML 2
« on: November 05, 2011, 12:30:37 pm »
Quote from: "kolofsson"
What if my loop lasted shorter than 1 ms (0.9 ms), would it be truncated to 0 ms?

This is most likely what is happening with my game, specially during window drag/resize when display is ignored, truncations make my game run a little bit faster :(. Any suggestion?
I see two different uses of clocks: longterm and precision measurements, sometimes I wish there were one clock for each.

Pages: [1] 2 3 ... 18
anything