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

Pages: 1 ... 607 608 [609] 610 611 ... 720
9121
Window / Re: "Windowed Fullscreen" mode?
« on: November 30, 2012, 04:59:58 pm »
There appeared to be a flicker as if some video mode changed when alt-tabbing as well as the task bar not appearing immediately on alt-tab.
Like you said it appears to change the resolution, but it doesn't. So I'm unsure what more information you need.
Your provided code works without problems, see the video:


9122
SFML projects / AW: Re: Open Hexagon - challenging fast paced game
« on: November 30, 2012, 08:26:48 am »
So now I can see the sources exposed on the github, but is there an archive for the last release?
I only see 1.1 on the download page, and the binary is tagged 1.4.
Thoses who can read do really have some advantages in life... ;)
Or what exactly are asking for? What kind of archive are you searching?

9123
What do you mean ? Events are in real time. Also, since he only wants to trigger it once when the user press the key, it's easier to use events as he did.
No they are not. ;)
In most cases you won't directly notice the difference but events aren't triggered in realtime. From the logic point of view; with sf::Keyboard::isKeyPressed you simply check for the state of the key which happens as you ask for it, the events get triggered by the OS and first have to propagate through some messages pipelines of the OS before they get to the application, which is not 100% in real time.
You could probably check that by not limiting the framerate and check for both and count the frames in between. There will be a franedifference between sf::Keynoard and events. ;)
Edit: Additionally events can get delayed if the OS is doing some heavy lifting.

If it makes sense in his case to use events? Maybe, but the name is then confusing, it should rather be: wasPressed or pressedOnce and not isPressed since that suggests the current state. ;)

9124
General / AW: noob question: velocity [solved]
« on: November 29, 2012, 09:10:50 am »
I advise you to use SFML 2, because SFML 1.6 haan't received a commit in over 2.5y, has few nasty bugs and lacks a lot of nice features (VertexArray, RenderTexture...). ;)

9125
General / AW: Re: SFML on Visual Studio 2012
« on: November 29, 2012, 08:47:01 am »
It looks as if switching from debug to release building removed some files with extensions .pdb and .ilk (present in the debug build).
The pdb file contains debug symbols which you obviously don't need in release.

As for your problem, simply set an install dir in CMake and then select the INSTALL project in VS and only build that. Then you can switch to release/debug and build it again and everything that's need gets magically copied to the install dir.

(Or use my nightly builds)

9126
General / AW: Pressing Enter causes two screen switches instead of 1!
« on: November 29, 2012, 08:39:56 am »
The question is why you don't use sf::Keyboard::isKeyPressed() directly instead of doing the same thing with events, which won't be in real time?

A vector of keys was probably used for key mapping, but I haven't seen that anywhere.

Also your code probably doesn't work since sf::Event::KeyPressed gets only trigerred once.

9127
SFML projects / Re: Open Hexagon - challenging fast paced game
« on: November 28, 2012, 11:14:20 pm »
-Removed: experimental pseudo-3D effects
Yes! For me that really killed the whole game feeling... ;)

I'm not sure what you've change since the 1.1 version, but PlayClaw (my recording software similar to FRAPS) doesn't work smoothly with your text rendering anymore (see video below). It looks like being in a multi-threded environment where SFML has it's problem with texts. Any ideas what has changed?


9128
Window / Re: sf::Window in my own class trow Errors
« on: November 28, 2012, 10:38:26 pm »
Welcome to the forum! :)

Quote
I learn a little bit C++ for myself and found this engine.
SFML is 'just' a multimedia library and by far not an engine/framework. ;)
I'm not trying to take away your motivation, but keep in mind that programming a game (specially a 3D game) isn't trivial at all and needs way more than 'a little bit C++' knowledge. At best you get a good book about C++ and read it front to back. :D

Well you've already identified your problem: global instances. (Side note: if you're using VS10 it probably runs 'fine' in release mode.)
The solution to it is, don't use global instances, in fact don't use any globals at all, but wrap things into a class, think about a better approach to accessing your window and pass things around with references. ;)

9129
Graphics / AW: Re: sf::Texture out of scope?
« on: November 28, 2012, 02:36:49 pm »
I'm curious about this.  What aspects of SFML are sensitive to the order of initialization of objects?
It's not directly a SFML problem. The destruction order of global instances (i.e. the objects get initialized globally) are undefined, thus if X would depend on Y, then it might happen that Y gets destroyed before X gets destroyed, which can obviously lead to problems. ;)

9130
Graphics / AW: Re: 3D camera library/code available?
« on: November 28, 2012, 10:58:45 am »
Be aware though that as SFML doesn't support 3D you can't use SFML's renderTexture for it, you'll have to implement your own version of renderTexture using OpenGL or use whatever a 3D engine grants for that so that you can take benefit from 3D transforms.
Don't take my word for it, since I've no idea about OpenGL, but you should easily be able to extract the texture from the render texture and call bind() on it to get it working with OpenGL, but maybe I'm mistaken (or one can't call bind() on the const ref texture...). ;)

9131
Graphics / AW: Re: Shape not placing properly
« on: November 28, 2012, 10:13:42 am »
I believe it would be better for you to set the origin directly in the center of it (width/2,height/2), otherwise it draws from the top left corner, which is just weird.
Well generally speaking it really depends on how you handle things. If you're for instance in a grid, it's way easier to have the origin of all object redering to the top left (or at least the same relative position), rather than having to branch and manually calculate the actual position.

In this case though it might be easier to change the origin and place it in the middle of the screen. ;)

9132
Graphics / AW: Re: Image and OpenGL does not work
« on: November 28, 2012, 10:01:50 am »
I do not have any lighting there
Well there's definitely some very basic lighting goong on, otherwise the top and left surface of a box wouldn't be darker than the front ine. ;)

// EDIT I have just changed the image size from 204x204 to 128x128 and it works good now :D.
Nof sure why that fixed it, but I'm glad it did. ;)

9133
General / AW: Pressing Enter causes two screen switches instead of 1!
« on: November 28, 2012, 09:10:00 am »
What gyscos meant is that you have to check first if the event type is KeyPressed or KeyReleased before you can check the key code. If you don't do that you run into undefined behaviour since key code can hold anything...

9134
Graphics / AW: Help in moving sprite
« on: November 28, 2012, 09:06:37 am »
To move a sprite or a shape you can use move():
sf::CirlceShape ball(10.f);
// ...
ball.move(10.f, 10.f);
If you want some physics you need to implement it or use an existing library. ;)

9135
Graphics / Re: 3D camera library/code available?
« on: November 28, 2012, 12:30:34 am »
SFML is a 2D library, thus you won't find any 3D stuff... ;)
If you want 3D then use your own OpenGL code.

Pages: 1 ... 607 608 [609] 610 611 ... 720