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

Pages: 1 [2] 3 4
16
SFML projects / Rewrite of SFML in Google's Golang
« on: September 21, 2013, 10:46:23 pm »
Hey all! So I changed my name (I'm DrSuperSocks, but tedsta includes my actual name (Teddy), is shorter, and a 19-year-old shouldn't have an alias that sounds like a 13-year-old's).

EDIT:

I originally posted my whole game engine, which uses a rewrite of the Graphics module of SFML I did. But I realize now that my game engine isn't relevant to any of you, and the only thing I was really showing off was my rewrite of SFML. So, here is my rewrite of SFML in Golang. It took 3 days to write the code, then another 3 or 4 days to get the code to actually work ;) Parts of it still feel clunky, as C++ doesn't translate perfectly to Golang. The two biggest issues are the lack of const reference and inheritance.

So far, I've only rewritten a good chunk of the graphics module. That may be as far as I go, unless I need more features out of SFML.

Check it out here: https://github.com/tedsta/gosfml

PS: There are existing SFML bindings for Go, which I was originally using, but I wanted to be able to touch the variables in primitives, like Vector2.

17
SFML projects / Re: my network game
« on: September 21, 2013, 09:56:21 pm »
Love the sound effects! Starcraft stimpack brought on a wave of nostalgia ^^

Agreed! This is pretty epic, man. Haha.

18
SFML projects / Re: NEAT Visualizer
« on: July 03, 2013, 03:42:05 am »
This definitely blows what I've been doing with neural networks out of the water. How's the performance when you have multiple mechs running around?

19
SFML projects / Re: GLLight2D
« on: June 21, 2013, 11:19:15 pm »
Woot! I can't wait for this!

20
SFML projects / Re: Tidy Bubble
« on: June 10, 2013, 09:32:08 pm »
Nice work! Entertaining. As for stores, you should check out Desura. It's IndieDB's store, so the community is big on indie games :P

21
Cool, thanks.

22
Hi, all, I'm just wondering if it is necessary to check if graphics are actually on the screen before trying to render them? I have a lot of sprites and sf::VertexArrays in my game, and the vast majority of them aren't on the screen at any given time, so does SFML automatically handle this? Or is this something I should do on my own? The game doesn't lag at all, but I figure that I might as well optimize everything that I can.

23
Feature requests / Re: Vector Math Functions
« on: May 08, 2013, 08:32:21 pm »
I can go down the list of APIs that include Vector classes with math helpers, including Unity, Box2D, Irrlicht, Ogre3D, CrystalSpace, etc. I just find it extremely hard to believe that this very small community is the only community on the entire planet that knows how to code properly. Just saying. But, on the other hand, I suppose I can understand the desire for minimalism. I suppose I will just throw these in a math header.

24
Feature requests / Vector Math Functions
« on: May 08, 2013, 07:32:34 am »
Hey all, I think Vector math functions (normalize, magnitude, rotation, etc.) are important for any game developer, so I think they'd be a good addition to SFML. Right now, every time I get the latest SFML, I have to go back and add in those functions to the Vector2 class. Sure, it only takes a few seconds, but if everyone is using them (and I have sure used these in just about every game I have ever made), why not just include them? I searched the forum a bit, and found that Vector math had already been discussed, but the link provided is dead.

We have already had a discussion about vector functions (-> Link)...

I understand that Vector2 is an abstracted class, but, honestly, who uses Vector2 for anything other than math? I know both Ogre3D and Irrlicht provide extensive math helper functions for their Vector classes.

        Vector2<T>& normalize()
        {
                float length = (float)(x*x + y*y);
                if (length == 0.f)
                        return *this;
                length = sqrt ( 1.f/length );
                x = (T)(x * length);
                y = (T)(y * length);
                return *this;
        }

        Vector2<T>& rotateBy(float degrees, const Vector2<T>& center=Vector2<T>())
        {
                degrees *= 3.14159f/180.f;
                const float cs = cos(degrees);
                const float sn = sin(degrees);

                x -= center.x;
                y -= center.y;

                T nx = (T)(x*cs - y*sn);
                T ny = (T)(x*sn + y*cs);

        x = nx;
        y = ny;

                x += center.x;
                y += center.y;
                return *this;
        }

    // returns trig angle
        float getAngle() const
        {
                if (y == 0)
                        return x < 0 ? 180 : 0;
                else if (x == 0)
                        return y < 0 ? 270 : 90;

                if ( y > 0)
                        if (x > 0)
                                return atan(y/x) * 180.f/3.14159f;
                        else
                                return 180.0-atan(y/-x) * 180.f/3.14159f;
                else
                        if (x > 0)
                                return 360.0-atan(-y/x) * 180.f/3.14159f;
                        else
                                return 180.0+atan(-y/-x) * 180.f/3.14159f;
        }

        float getLength()
        {
            return sqrt(x*x + y*y);
        }
 

25
Nice! Everyone seems to love their sandbox games now :P Just ship customization alone can go a long way.

26
Some .cpp files are missing their header counterparts. Also getting a ton of redefinition errors.

This is all very confusing to implement x.x.

Nevertheless this seems very awesome.

Are you trying to compile this from the codeblocks project? If not, you can PM me how you have the project set up and I'll help you get it all sorted out. But if you are using the codeblocks project, that's really strange that these errors are coming up, but you can still PM me! I apologize for the lack of documentation. My finals are next week, so I'll have more time after that to get this more usable.

And thanks, I appreciate the compliment :P

27
SFML website / Re: New website
« on: May 01, 2013, 01:51:02 am »
Oh mah gawd the new site is sooooooo beautiful! I love it!

28
I'm not sure what exactly your coding skill level is, but this tutorial gives you a very good introduction to SFML while also showing you how you should format your code. You should check it out. I'm not sure who wrote it, I literally just found it on Google and skimmed through the code. Looks good.

http://www.gamefromscratch.com/page/Game-From-Scratch-CPP-Edition-The-Introduction.aspx

29
SFML projects / Re: SFGUI (0.1.0 released)
« on: April 24, 2013, 01:24:21 am »
I'm definitely experiencing the sfg::Image performance hurt - but hopefully there's a workaround for my problem :P So, I'm trying to have a MiniMap embedded in an sfg::Window. I looked around, and decided to give sfg::Image a shot. So, I have an sfg::Image inside my sfg::Window, and I render the MiniMap onto a sf::RenderTexture, then grab the texture and copy it to an sf::Image, which is then set as the sfg::Image's image. This is painfully slow. Is there a better way?

EDIT: And in the beginning, when I said performance hurt, I'm more referring to sf::Texture::copyToImage being painfully slow, not the sfg::Image lag when you resize the window :P If only there was a way to render directly to an sf::Image....

30
General / Re: Screen coordinate and world coordinate troubles
« on: April 23, 2013, 07:45:05 am »
Works like a charm, thanks!

Pages: 1 [2] 3 4