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

Pages: 1 2 [3] 4 5 ... 16
31
General / Re: TDS Shooter Enemy Programming issues
« on: December 15, 2017, 07:37:47 am »
just make them not to overlap. use collision detection etc.

32
Audio / Re: Program crash when opening music
« on: December 11, 2017, 03:47:08 pm »
Quote
I have a void where I start the music.

what do you mean? show the code

33
SFML projects / Re: Neural Network + Genetic Algorithm
« on: December 09, 2017, 06:57:15 am »
Nice! If you like that can of things, you can have some fun with particle swarm optimization (PSO) as well.

Thank you :) Yep, maybe some time later.

34
Graphics / Re: Screen only displays movement when mouse is moving
« on: December 07, 2017, 04:04:06 pm »
Okay! I have a source formatting plugin for code blocks IDE. first I'll use my format then i will use the formatting plugin when I release  it or ask for help.
Also, Is it impossible for you to answer my question because of its format it!?

I already answered your question in my first post here. I've posted your wrong part and fixed part

35
Graphics / Re: Screen only displays movement when mouse is moving
« on: December 07, 2017, 03:43:33 pm »
Well, I kinda use my own style format like this
void see this(args){if(6==7){
}
}
 
And yes I've looked at other projects it get confusing sometimes in their format

You can't find this error by yourself only because this kind of formatting.

36
SFML projects / Re: Neural Network + Genetic Algorithm
« on: December 07, 2017, 08:44:07 am »
Impressive stuff, Alexander!

Thank you, Stefan  :)

37
Graphics / Re: Screen only displays movement when mouse is moving
« on: December 07, 2017, 07:03:53 am »
Why do you write code like this? Have you ever took a look at code formatting on some other projects?

window.close();}
playerRect.move(1,0);
if(sf::Keyboard::isKeyPressed(sf::Keyboard::Down)){playerRect.move(0,1);}
if(sf::Keyboard::isKeyPressed(sf::Keyboard::Up)){playerRect.move(0,-1);}
if(playerRect.getGlobalBounds().intersects(targetrect.getGlobalBounds())){window.close();}}

window.close();}}
playerRect.move(1,0);
if(sf::Keyboard::isKeyPressed(sf::Keyboard::Down)){playerRect.move(0,1);}
if(sf::Keyboard::isKeyPressed(sf::Keyboard::Up)){playerRect.move(0,-1);}
if(playerRect.getGlobalBounds().intersects(targetrect.getGlobalBounds())){window.close();}

38
SFML projects / Neural Network + Genetic Algorithm
« on: December 06, 2017, 03:23:09 pm »
After watching a lot of videos on YouTube I had some fun playing with neural networks + genetic algorithm. Don't know what else to say  :D

Source code: https://github.com/achpile/neural




39
SFML projects / Re: Screenshot Thread
« on: November 30, 2017, 11:22:51 am »
Some workarounds on new game

40
Graphics / Re: TileMap show artifacts
« on: November 27, 2017, 05:46:19 pm »
that's because you have some errors in your code

41
General / Re: Static Linking SFML with MinGW in Eclipse
« on: November 25, 2017, 06:02:08 pm »
Maybe some lines from my CMake file could help :)

        SET ( CMAKE_CXX_FLAGS  "-DSFML_STATIC -s -std=c++11" )
        SET ( CMAKE_EXE_LINKER_FLAGS  "-mwindows -static-libgcc -static-libstdc++ -static -Wl,-Bstatic -Wl,-rpath,./lib/" )
        SET ( CMAKE_LINK_LIBS sfml-audio-s sfml-graphics-s sfml-window-s sfml-system-s winmm opengl32 gdi32 freetype glew jpeg opengl32 openal32 pthread FLAC vorbisfile vorbisenc vorbis ogg sndfile )
 

42
Thank you for the advice.I guess?
But I already knew that and I'm currently studying this library.
And how does that answer my question?

So if you already knew that - why don't you do that? You call display only on getting resize event

43
you should draw and display inside the main loop every time, not only in events handling.

44
Graphics / Re: Animation speed way to fast.
« on: November 25, 2017, 11:39:24 am »
because you didn't declared variable called "view"

45
Graphics / Re: Fill sf::Sprite with constant color
« on: November 24, 2017, 07:41:41 pm »
I used this one

#define SHADER_WHITE                                          \
        "uniform sampler2D texture;                             " \
        "                                                       " \
        "void main() {                                          " \
        "    vec4 pixel = texture2D(texture, gl_TexCoord[0].xy);" \
        "                                                       " \
        "    pixel.r = 1.0f;                                    " \
        "    pixel.g = 1.0f;                                    " \
        "    pixel.b = 1.0f;                                    " \
        "                                                       " \
        "    gl_FragColor = pixel;                              " \
        "}                                                      "

 

OP wants it to ignore transparent pixels though

as you can see i do NOT change the pixel.a value

Pages: 1 2 [3] 4 5 ... 16