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

Pages: [1]
1
General / Re: Compiling SFML with MinGW
« on: August 14, 2017, 03:35:06 am »
Well I got past my error. I uninstalled MinGW and installed MinGW-w64. For my purposes I am happy with this solution.

2
General / Compiling SFML with MinGW
« on: August 14, 2017, 02:07:13 am »
I am sorry but I am not sure if this is a problem specific to MinGW, CMake, or SFML but I thought I might try and ask here. I get errors while building SFML using MinGW.

1. ExtractSFML-2.4.2-sources.zip
2. Create build folder
3. cmake -G "MinGW Makefiles" ..
4. mingw-32-make

Quote
PS C:\libs\SFML-2.4.2\build> mingw32-make
Scanning dependencies of target sfml-system
[  1%] Building CXX object src/SFML/System/CMakeFiles/sfml-system.dir/Clock.cpp.obj
[  2%] Building CXX object src/SFML/System/CMakeFiles/sfml-system.dir/Err.cpp.obj
[  3%] Building CXX object src/SFML/System/CMakeFiles/sfml-system.dir/Lock.cpp.obj
[  3%] Building CXX object src/SFML/System/CMakeFiles/sfml-system.dir/Mutex.cpp.obj
[  4%] Building CXX object src/SFML/System/CMakeFiles/sfml-system.dir/Sleep.cpp.obj
[  5%] Building CXX object src/SFML/System/CMakeFiles/sfml-system.dir/String.cpp.obj
[  6%] Building CXX object src/SFML/System/CMakeFiles/sfml-system.dir/Thread.cpp.obj
[  7%] Building CXX object src/SFML/System/CMakeFiles/sfml-system.dir/ThreadLocal.cpp.obj
[  8%] Building CXX object src/SFML/System/CMakeFiles/sfml-system.dir/Time.cpp.obj
[  9%] Building CXX object src/SFML/System/CMakeFiles/sfml-system.dir/FileInputStream.cpp.obj
[ 10%] Building CXX object src/SFML/System/CMakeFiles/sfml-system.dir/MemoryInputStream.cpp.obj
[ 11%] Building CXX object src/SFML/System/CMakeFiles/sfml-system.dir/Win32/ClockImpl.cpp.obj
[ 12%] Building CXX object src/SFML/System/CMakeFiles/sfml-system.dir/Win32/MutexImpl.cpp.obj
[ 13%] Building CXX object src/SFML/System/CMakeFiles/sfml-system.dir/Win32/SleepImpl.cpp.obj
[ 14%] Building CXX object src/SFML/System/CMakeFiles/sfml-system.dir/Win32/ThreadImpl.cpp.obj
[ 15%] Building CXX object src/SFML/System/CMakeFiles/sfml-system.dir/Win32/ThreadLocalImpl.cpp.obj
[ 16%] Linking CXX shared library ..\..\..\lib\sfml-system-2.dll
[ 16%] Built target sfml-system
Scanning dependencies of target sfml-main
[ 17%] Building CXX object src/SFML/Main/CMakeFiles/sfml-main.dir/MainWin32.cpp.obj
[ 18%] Linking CXX static library ..\..\..\lib\libsfml-main.a
[ 18%] Built target sfml-main
Scanning dependencies of target sfml-window
[ 19%] Building CXX object src/SFML/Window/CMakeFiles/sfml-window.dir/Context.cpp.obj
[ 20%] Building CXX object src/SFML/Window/CMakeFiles/sfml-window.dir/GlContext.cpp.obj
[ 21%] Building CXX object src/SFML/Window/CMakeFiles/sfml-window.dir/GlResource.cpp.obj
[ 22%] Building CXX object src/SFML/Window/CMakeFiles/sfml-window.dir/Joystick.cpp.obj
In file included from c:\mingw\include\windows.h:48:0,
                 from C:/libs/SFML-2.4.2/src/SFML/Window/Win32/JoystickImpl.hpp:42,
                 from C:/libs/SFML-2.4.2/src/SFML/Window/JoystickImpl.hpp:83,
                 from C:/libs/SFML-2.4.2/src/SFML/Window/JoystickManager.hpp:32,
                 from C:\libs\SFML-2.4.2\src\SFML\Window\Joystick.cpp:29:
c:\mingw\include\winuser.h:3920:47: error: 'PTITLEBARINFO' has not been declared
 WINUSERAPI BOOL WINAPI GetTitleBarInfo (HWND, PTITLEBARINFO);
                                               ^~~~~~~~~~~~~
src\SFML\Window\CMakeFiles\sfml-window.dir\build.make:137: recipe for target 'src/SFML/Window/CMakeFiles/sfml-window.dir
/Joystick.cpp.obj' failed
mingw32-make[2]: *** [src/SFML/Window/CMakeFiles/sfml-window.dir/Joystick.cpp.obj] Error 1
CMakeFiles\Makefile2:227: recipe for target 'src/SFML/Window/CMakeFiles/sfml-window.dir/all' failed
mingw32-make[1]: *** [src/SFML/Window/CMakeFiles/sfml-window.dir/all] Error 2
Makefile:128: recipe for target 'all' failed
mingw32-make: *** [all] Error 2

I have made a Hello World c++ example and that compiled fine, but obviously the problem is inside winuser.h. I don't think this is a SFML bug, I think it is more likely that I setup my MinGW environment incorrectly. I have installed gcc, g++ and mingw32-make on my system, is there another component that needs to be installed? Any help would be appreciated :)

3
SFML wiki / Re: sfeMovie project [v1.0 RC1 available]
« on: August 19, 2014, 07:41:26 pm »
I'm not if i should post this in the github issues or not... I'm trying to build sfeMovie with vs2013 and everything seems to be going fine until i run into this error.

Error   2       error : no acceptable ld found in $PATH C:\Libs\sfeMovie-master\build\FFmpeg\configure  FFmpeg
 

Error   19      error LNK1104: cannot open file 'FFmpeg-binaries\lib\avformat.lib'      C:\Libs\sfeMovie-master\build\LINK      sfeMovie
 
and

I believe the second one occurs because FFmpeg is not being built. Btw im following the tutorial for the latest source from git. Is it possible to build with vs2013?

4
General / Outdated openGL?
« on: August 13, 2014, 06:04:30 pm »
Today I tried to test my game on my friends computer but we ran into a few errors.

his gfx card : gtx 650 ti boost



my shader...
uniform sampler2D texture;

uniform float distanceToMaxNoise = 1000.0;
uniform float startNoiseDistance = 5000.0;

uniform vec2 position = vec2(0,0);
uniform float random = 1.0;

highp float randFloat(vec2 co)
{
    highp float a = 12.9898;
    highp float b = 78.233;
    highp float c = 43758.5453;
    highp float dt= dot(co.xy ,vec2(a,b));
    highp float sn= mod(dt,3.14);
    return fract(sin(sn) * c);
}

void main()
{
        vec2 texCoord = gl_TexCoord[0].xy;
        vec2 randomVec = vec2(random);
        vec2 texCoordRandom = texCoord + randomVec;
    vec4 pixel = texture2D(texture, gl_TexCoord[0].xy);

        highp float randomNoise = randFloat(texCoordRandom);
        highp float randomLine = randFloat(texCoord.yy + randomVec);

        float distance = clamp(length(position) - startNoiseDistance, 0.0, distanceToMaxNoise);
        float noise = clamp(distance / distanceToMaxNoise, 0.0, 1.0);

        pixel = mix(pixel, vec4(randomNoise, randomNoise, randomNoise, 1.0), noise);

        if(randomLine < 0.02)
        {
                pixel = mix(pixel, vec4(0.0, 0.0, 0.0, 1.0), noise);
        }

        gl_FragColor = pixel;
}

from what i can tell #version 120 is from 2006 so does that mean his GFX card is outdated? If this happens on his computer i think its likely that other computers will experience the same problem. Is there something I can do that will automatically address the problem by prompting the user to update their drivers or something?

5
General / Re: I have a game in mind but...
« on: August 11, 2014, 09:17:10 pm »
Thanks, that helps for the first one.

Scroll down to "Showing more when the window is resized". Does that answer your question?

6
General / Re: I have a game in mind but...
« on: August 11, 2014, 07:49:02 pm »
I think you might want to read the SFML view tutorials.

http://www.sfml-dev.org/tutorials/2.1/graphics-view.php

7
General / Re: AW: Error using view of a renderTexture
« on: August 11, 2014, 01:50:29 am »
Are the values you provided correct, because -14000 should still be in the floating range.
If it's more something like +-32000 then it's just a limit of floats, see here.

Large worlds can be simulated by splitting it up with different containers/variables and resetting the view from time to time.

Thanks! the link is very useful and ill be looking into resetting the view periodically. I just did a few tests and get very weird results. (-70000, -20000) (-40000, 20000) but usually around 30k the floats go out of range not exactly at 32k. and they both go out of range at the same time. But i think the problem is solved for now :D

8
General / Re: Does anyone else have massive frame drops for no reason?
« on: August 10, 2014, 02:35:24 am »
On my old laptop i would get massive framerate drops after an hour of use. Could it be your computer? Have you seen it in other games or applications?

9
General / Re: Error using view of a renderTexture
« on: August 08, 2014, 08:38:41 pm »
Hmm I've been looking at google for what -1.#IND means. At first i thought it just meant infinity or undefined but absolutely nothing comes up on google about it so I think it may be something specific to SFML? I'm really confused. How am i supposed to simulate a large empty space? I'll continue to look at my code for a bug i may have created somewhere...

10
General / Re: Error using view of a renderTexture
« on: August 08, 2014, 03:50:35 pm »
i don't know if i get it correctly, but you set the view on a renderTexture, right?
does it happens if you draw directly to a renderWindow instead?
what is the size of your renderTexture? this could be caused by your view going off the renderTexture limits.

yes the view of the renderTexture that will be draw to the actual window.

I just noticed it happened after i switched to using a renderTexture before when i drew dirctly to the window i never noticed this problem. I am drawing to a renderTexture because i was planing on doing some shader effects to the screen. 

The renderTexture is the same size as my window (1280, 720) but the screen usually goes blank when its about 20000 pixels away from the center of the texture.

11
General / Error using view of a renderTexture
« on: August 08, 2014, 04:02:29 am »
Basically my game has a world in space and the ship should be able to move around in all direction (like asteroids), to keep the view focused on the player i set the center of the view being used on the renderTexture to the position of the player. after the center gets moved a certain distance lets say (-14000, 5000) or (300, 9000) the screen goes black and when i print out the coordinates of view.getCenter() it prints out (-1.#IND, -1.#IND)

In my finished product i would probably be limiting the distance the player could travel anyways, But i wanted to know if I'm using view.setCenter(); in a way that was not meant to be. 

Keep in mind drawing all my sprites to a renderTexture then drawing that to the window.

Please tell me if my description in not clear.

12
SFML projects / Re: Asteroids (My first experience with SFML)
« on: July 04, 2014, 03:03:23 pm »
Seems good.  :)

I just don't like the movement with the WASD keys because they are not relative to the ship direction (I'm not sure if that's how it works in the original version but I don't like it).

I made it so that if you press F1 it switches between the two. I believe the original was the ship it could only move in the direction it was rotated. My friends requested it so i threw it in real fast. The problem is that if you press 'A' and 'W' at the same time you actually move twice as fast.

Not very original, but, still fun.

I'll attempt to create something original when I finish learning the in outs of SFML. Problem is that I'm not a very good artist. :P

13
SFML projects / Asteroids (My first experience with SFML)
« on: July 04, 2014, 05:49:18 am »
I've been learning C++ for about two years now but I really didn't like learning all the in and outs of DirectX so I decided to give SFML a go. In short I love SFML and if your on the edge of deciding what graphics library to use, here's an example of what you can create within a few days. Enjoy my attempt at recreating a retro game i never really played before :P

https://www.dropbox.com/sh/k8mcqxy2gukiuay/AADa3mw9AAzkrSFcWpNAsqKSa

Pages: [1]
anything