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 - 5gum

Pages: [1] 2
1
General / Re: SFML for Visual Studio 2013?
« on: November 30, 2014, 06:04:03 pm »
I just found a such a thread and it actually works, thanks =)

Just in case, other guys have the same problem: http://en.sfml-dev.org/forums/index.php?topic=13010.0

2
General / SFML for Visual Studio 2013?
« on: November 30, 2014, 05:36:23 pm »
Hey, I tried to include SFML in VS 2013 Professional but I got a lot of errors there.

Am I just too stupid to configure SFML correctly there or is VS 2013 really incompatible with SFML (I use the SFML version for VS 2012 because I couldn't find a version for VS 2013)

In VS 2012 I do the same steps and there it works.

Thanks

3
Graphics / Circular segment
« on: July 08, 2014, 09:30:15 pm »
Hey,

I wanna create a replay button with the functions of the SFML. I think, everyone knows how it looks like. (Round arrow)

So I've created a CircleShape, made the FillColor transparent and the OutLine colored.
But then I got a problem, the circle is still a full circle and not a segment (On the end of the segment I create the triangle of the arrow).

Is there any function which can help me?

Thanks - and sorry for my bad English :D
5gum

PS: What's your bet for Brasil vs Germany today? I think 2:1 for GER after extra time  ;D

4
Graphics / Paths and automatically driving cars (GTA style)
« on: May 12, 2014, 02:37:26 pm »
Hey guys,

I don't know, how I should phrase this but I try it  ;D
I develop a copy of GTA I, so with 2D graphics. Well, now I want to create the feature that there are automatically spawned cars on the map and they drive on the street. I've already a 2D map with some streets and the vehicle sprites.

What's the best way to do this? Unfortunately, there isn't anything such as paths in SFML, isn't it?

Thanks for answers,
5gum

5
General / Re: sf::Event -> mouse wheel?!
« on: January 17, 2014, 01:12:08 pm »
OK it works, thanks :)

I also have read the tutorial about events and think I understand it now.

6
General / Re: sf::Event -> mouse wheel?!
« on: January 16, 2014, 11:04:06 pm »
Thanks, I'll try this tomorrow :)

7
General / Re: sf::Event -> mouse wheel?!
« on: January 16, 2014, 10:51:12 pm »
My English is really bad so I don't understand the details of the documentation. Could you give me a hint what I do wrong?

8
General / sf::Event -> mouse wheel?!
« on: January 16, 2014, 10:45:15 pm »
Hey guys, it's me again ;D

In the SFML, there is stuff I unterstand really good.
In the SFML, there is stuff I understand a little bit.
But in the SFML, there is also stuff I really don't unterstand. And this stuff is called sf::Event...

I've got a map and sf::view. If I scroll up the mouse wheel the map should zoom in and vice versa (Sry, my English could be bad ::)). I tried it with:

while(window.pollEvent(event))
{
  if(event.mouseWheel.delta == 1)
  {
    view.zoom(0.9f);
  }
}

Yeah, it works!
But what unfortunately also works is if I click right mouse button and if I release right mouse button the view also zooms in.

I tried it with:

 if(event.mouseWheel.delta == 1 && !sf::Mouse::isButtonPressed(sf::Mouse::Button::Right))
  {
    view.zoom(0.9f);
  }


Now it "just" zoom in if I release the right mouse button.
But I don't want that the view zooms after right relase, only after wheel...
What I have to do?

Thanks a lot,

5gum

PS: I try your ideas only tomorrow afternoon cause I'm tired of programming today ;)

9
General / Re: Set fixed sprite position when sf::View is active?
« on: January 16, 2014, 03:42:37 pm »
Thanks to you both, it works, really easy :D

10
General / Set fixed sprite position when sf::View is active?
« on: January 16, 2014, 03:23:21 pm »
Hey guys,

I prog a game and use sf::view for the map. But now I want something like a header for general information (money...) which is always on the top of the screen. With setPoistion(10,10) the sprite is just on the top of the map, not of the screen...

So what I have to do?

Thanks a lot,
5gum

11
General / Re: Change a Sprite in a function?
« on: December 08, 2013, 12:27:12 am »
Thanks, but how I'm doing that?

12
General / Change a Sprite in a function?
« on: December 07, 2013, 11:48:27 pm »
Hey,

I wrote a function similar like:

int more(sf::Sprite rect)
{
  if(sf::Keyboard::isKeyPresed(sf::Keyboard::Up))
  {
    rect.scale(1.1,1.1)
    return 1;
  }
return 0;
}

(...)

int return = more(rect);
 

But now my rectangle doesn't change.  I think this is because you can return only 1 value (here it is the int). Is there any simple solution for my problem? Sry, I'm a beginner ;)
Don't say "Why you need a function for that", the real function is much bigger...

Thanks,
5gum

13
Graphics / Re: Moving a sprite to a clicked point?
« on: December 05, 2013, 03:34:41 pm »
Lots of Thanks, it works :)
Now I set you all to the second page of the game credits :D

14
Graphics / Re: Moving a sprite to a clicked point?
« on: December 05, 2013, 01:24:19 pm »
Sorry for my bad knowledge but I learn SFML since 4 days.

@Raincode, I tried your code:

if(sf::Mouse::isButtonPressed(sf::Mouse::Button::Right))
{
sf::Vector2f totalMovement(sf::Mouse::getPosition(mMainWindow).x - rect_car.getPosition().x, sf::Mouse::GetPosition(mMainWindow).y - rect_car.getPosition().y);

car.move(totalMovement * (1/30));
}
 

But then he underlines the * on line 5
What do I wrong?

PS: Sry for my bad English, if it's possible speak simple English please ;)

15
Graphics / Re: Moving a sprite to a clicked point?
« on: December 04, 2013, 08:34:41 pm »
Thanks, that looks successfully, I'll try that tomorrow.

Pages: [1] 2
anything