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

Pages: 1 [2] 3 4 ... 6
16
General / Re: Networking and Code::Blocks
« on: February 17, 2013, 05:06:03 am »
Sfml/Network is dependent only on Sfml/System :)

whether there is or is not a sfml-network-s I'm not sure.. have never used it, buy try including it anyway, and ittl yell at you if it dosn't exist, knowing the way sfml works, however, I'm pretty sure it exists

17
Graphics / Re: drawing quad efficiently for Spine
« on: February 17, 2013, 04:37:53 am »
Ahh.. so thats what he meant by quad.. btw this is addicting: http://en.sfml-dev.org/forums/index.php?action=who

18
Graphics / Re: drawing quad efficiently for Spine
« on: February 17, 2013, 04:13:11 am »
by Quad, I immediately think of OpenGL, and could easily help you if your talking a 3D layout of 2D, but that would render stretch (I believe Spine is 2d?) if you don't want stretch, then why use a quad (all images are rectangles, anyway)? explain exactly what you want please?

19
Window / No sf::RenderWindow.setStyle() or sf::RenderWindow.setFullscreen()
« on: February 17, 2013, 03:49:33 am »
I need to be able to let the user change whether the window is fullscreen or not, via an options menu, after finding no function existed, I tried creating a new window, and replacing the old one, but got an 'sf::NonCopyable' complaint

A solution on how to avoid NonCopyable, or how to change the style, or setFullscreen would be greatly beloved  ;D

If there is no way around either, can you make a setStyle() or a setFullscreen()?

this is semi-project-halting, ie: I can finish this section until this is resolved, but I have other things I could work on, and leave this hanging

20
Graphics / Re: Problem with displaying multiple sprites (1.6)
« on: February 17, 2013, 01:06:50 am »
why are you inheriting a sf::Sprite, while having a member variable Sprite, I would recommend dropping the inheriting, it can only lead to problems, and its not clear (a player is not just a sprite), stick with sprites as member variables :)

21
When I hover my mouse over the resize-able area of the window (bottom and right edge) the cursor doesn't change as it should to the double arrow cursor

What triggers the error:
sf::RenderWindow.setMouseCursorVisible(true);

I am using:
default Window styles,
Sfml 2.0,
OS: Windows XP Professional, Sp.3,
Compiler: Qt Creator (Mingw internal)

My project isn't halted by this, its just annoying  :-\

22
General / Re: 3 Questions I have.
« on: February 16, 2013, 07:41:55 pm »
If I am understanding what you want, Why not do this?

        if( sf::Mouse::isButtonPressed( sf::Mouse::Button::Left ) )
        {
            if( sf::Mouse::getPosition(window).x > 0 && sf::Mouse::getPosition(window).x < 512 )
            {
                   dragging = true;
                   lastMX = window.getPosition().x - sf::Mouse::getPosition().x;
                   window.setMouseCursorVisible(false);
             }
             if( sf::Mouse::getPosition(window).y > 0 && sf::Mouse::getPosition(window).y < 12 )
             {
                    dragging = true;
                    lastMY = window.getPosition().y - sf::Mouse::getPosition().y;
                    window.setMouseCursorVisible(false);
                }
            }
        }
 

23
Window / Re: OpenGL not drawing
« on: February 15, 2013, 06:23:15 am »
Oh, something that will save you a ton of headache (OpenGl scales the display if you have a non square viewport given to it)

24
Window / Re: OpenGL not drawing
« on: February 15, 2013, 06:21:08 am »
you draw your trig to a z of 0, this is incorrect, as the camea's clip space won't draw it since its too close :) , at least try a 20 (or -20 depending on your setup) on the z axis

25
Window / Re: Checking if keys aren't being pressed
« on: February 15, 2013, 06:14:29 am »
basic idea behind inertia is to store a Vector2 of your 'Velocity' and a Vector2 of your current direction, every game loop, edit only your current direction vector, then add it to your velocity vector (Velocity += CurDirection) then, move your character by your velocity value(make sure to set a terminal velocity limit to avoid over speeding), where you got confused, is that when you apply your velocity to your character, you multiply the temporary value by the time

if you like looking at code more than reading (wrote this in the comment box, might not compile, but the idea is still there)
sf::Clock Timer;
Character Chary;
{// main loop

   // get the time between a frame for use later on
   float ElapsedTime = Timer.restart().asSeconds();

   sf::Vector2<float> CurDirection;// a new CurDirection every time
   // get wasd movements, and add them to CurDirection (which is now 0,0)

   //SetVelocity and GetVelocity edit Character's velocity value
   Chary.SetVelocity(Chary.GetVelocity() + (CurDirection*ElapsedTime) );
   Chary.Move(Chary.GetVelocty());
}
 


Oh, and almost forgot, don't forget to make a drag value(float), and scale the vector by a negative of it's unit multiplied by your drag, and if the magnitude of the vector is lower than your drag, set it to 0,0 instead of applying the drag (otherwise will be jittery on stopping)

26
Window / Re: Changing the cursor look?
« on: February 15, 2013, 05:56:32 am »
It would be a good idea to multi-thread for displaying a mouse, as any amount of lag will be noticeable, because of the delay in the frame-rate, if you set it onto a different thread, and looped it infinitely, and stalled until a signal received, you would have much better results than having to deal with game pausing, lagging, and then having to set up states (pause menu can't stall if your using a main loop to move the mouse)

because of the difficulty in multi-threading, why doesn't Sfml create such a feature? I wouldn't mind writing code for it, it can't be more than 10 line-adds/60 line-edits versus user implementation of it being much more messy?

27
Graphics / Re: Tips and hints on how to correctly use glScissor with SFML?
« on: February 15, 2013, 05:48:25 am »
sfml 2.0 has it, :) its worth switching, I don't know if 1.6 has sub rectangling, however

Sfml 2.0, C++:
sf::Rect SubRectangle(x1,y1,x2,y2);
sf::Sprite.SetSubRect(SubRectangle);

28
Oh, so when I copy my Class, it copies the texture and the sprite, but I need to update the sprite to use the copied texture instead of the old one, thanks :D

29
Not understanding the picture.. text please? what got deleted?

most of all, what should I do to copy a texture properly?

30
thanks about the _Names being for implementation, I was working on a project a while back that enforced using _Name, and never switched back to m_Name :-) all future code will be using it,

how do I properly copy a texture? I want a new pixel set to be created, but the pixel set to have the same values as the old texture, your wording is slightly hard to understand, I want it to reside at a different address, don't I? but if it is a different address, how could it refer to the old address?

Pages: 1 [2] 3 4 ... 6
anything