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

Pages: [1] 2 3
1
Graphics / Re: How would you do player animations?
« on: January 06, 2014, 06:57:49 am »
I looked at the way Unity does things, and it looks like they have an encapsulation of Animation, and then you can add different animations based on the "state" you're in for walking forwards and backwards and any other actions. Thanks for helping!

2
Graphics / Re: How would you do player animations?
« on: January 06, 2014, 06:21:03 am »
Well, right now my entities all have their own "animations" stored, but they're all individual objects, so I have like 16 Animation objects because I need one for each direction/action. The code is messy, and I'm just wondering if anyone has completed a game or has come close that could show me how they did it.

3
Graphics / How would you do player animations?
« on: January 06, 2014, 04:54:49 am »
I make games in C++ and SFML with OpenGL from GLEW. I have SFML for input and windows, and all of my rendering is done from normal OpenGL. Currently, when I use animations, I have an Animation class that holds all of the frames for each animation, and how long each frame should be displayed (two int std::vectors, one for ticks and one for frames), but the problem is when I have to add new animations to my entities or dealing with multiple animations at once.

During initialization, I create animations for my characters, (which I want to change to data-driven, but not a huge priority right now) and I store the animation to my current character and any enemies that start out. The problem is, I have like 12 different animations that have to be stored(in each direction: walk, idle, run, hurt, attack), and if I want to spawn new entities, I have to either store a copy of each animation for each entity type (which I want to eventually be randomly different), or I have to load them each time. It just seems.. difficult to keep track of so many. All the animation tutorials I find online are the very basics about changing your texture coordinates for the next frame, but nothing too in-depth.

4
SFML projects / Re: Alife - Artificial Life Simulation
« on: January 06, 2014, 04:41:08 am »
for future reference, make sure you either post where we can find dependencies, or include them in the download file. It's a real turn-off when you find out you need to go out of your way to play something.

5
General / Re: SFML 2.1 & VS 2012
« on: November 25, 2013, 09:55:33 pm »
Damn. xD
That's one way to make me feel stupid. :P
I created a new project to copy and paste them, and it runs like a charm. Thanks for the help.

6
General / Re: SFML 2.1 & VS 2012
« on: November 25, 2013, 09:28:50 pm »
well, I rebuilt using the source from the 2.1 downloads page (instead of github), and now my linker errors have changed, and instead of 42 errors, I have 41. They all have to do with sfml-window-s.lib, and the last ones all had to do with glew..

Quote
1>sfml-window-s.lib(InputImpl.obj) : error LNK2001: unresolved external symbol __imp__GetAsyncKeyState@4
1>sfml-window-s.lib(WindowImplWin32.obj) : error LNK2001: unresolved external symbol __imp__GetAsyncKeyState@4
1>sfml-window-s.lib(InputImpl.obj) : error LNK2001: unresolved external symbol __imp__GetSystemMetrics@4
1>sfml-window-s.lib(InputImpl.obj) : error LNK2001: unresolved external symbol __imp__SetCursorPos@8
1>sfml-window-s.lib(InputImpl.obj) : error LNK2001: unresolved external symbol __imp__GetCursorPos@4
1>sfml-window-s.lib(InputImpl.obj) : error LNK2001: unresolved external symbol __imp__ClientToScreen@8
1>sfml-window-s.lib(InputImpl.obj) : error LNK2001: unresolved external symbol __imp__ScreenToClient@8
1>sfml-window-s.lib(WindowImplWin32.obj) : error LNK2001: unresolved external symbol __imp__ScreenToClient@8
1>sfml-window-s.lib(VideoModeImpl.obj) : error LNK2001: unresolved external symbol __imp__EnumDisplaySettingsA@12
1>sfml-window-s.lib(WglContext.obj) : error LNK2001: unresolved external symbol __imp__CreateWindowExA@48
1>sfml-window-s.lib(WindowImplWin32.obj) : error LNK2001: unresolved external symbol __imp__CreateWindowExA@48
1>sfml-window-s.lib(WglContext.obj) : error LNK2001: unresolved external symbol __imp__DestroyWindow@4
1>sfml-window-s.lib(WindowImplWin32.obj) : error LNK2001: unresolved external symbol __imp__DestroyWindow@4
1>sfml-window-s.lib(WglContext.obj) : error LNK2001: unresolved external symbol __imp__ShowWindow@8
1>sfml-window-s.lib(WindowImplWin32.obj) : error LNK2001: unresolved external symbol __imp__ShowWindow@8
1>sfml-window-s.lib(WglContext.obj) : error LNK2001: unresolved external symbol __imp__GetDC@4
1>sfml-window-s.lib(WindowImplWin32.obj) : error LNK2001: unresolved external symbol __imp__GetDC@4
1>sfml-window-s.lib(WglContext.obj) : error LNK2001: unresolved external symbol __imp__ReleaseDC@8
1>sfml-window-s.lib(WindowImplWin32.obj) : error LNK2001: unresolved external symbol __imp__ReleaseDC@8
1>sfml-window-s.lib(WindowImplWin32.obj) : error LNK2001: unresolved external symbol __imp__TranslateMessage@4
1>sfml-window-s.lib(WindowImplWin32.obj) : error LNK2001: unresolved external symbol __imp__DispatchMessageA@4
1>sfml-window-s.lib(WindowImplWin32.obj) : error LNK2001: unresolved external symbol __imp__PeekMessageA@20
1>sfml-window-s.lib(WindowImplWin32.obj) : error LNK2001: unresolved external symbol __imp__SendMessageA@16
1>sfml-window-s.lib(WindowImplWin32.obj) : error LNK2001: unresolved external symbol __imp__DefWindowProcA@16
1>sfml-window-s.lib(WindowImplWin32.obj) : error LNK2001: unresolved external symbol __imp__DefWindowProcW@16
1>sfml-window-s.lib(WindowImplWin32.obj) : error LNK2001: unresolved external symbol __imp__CallWindowProcA@20
1>sfml-window-s.lib(WindowImplWin32.obj) : error LNK2001: unresolved external symbol __imp__RegisterClassA@4
1>sfml-window-s.lib(WindowImplWin32.obj) : error LNK2001: unresolved external symbol __imp__RegisterClassW@4
1>sfml-window-s.lib(WindowImplWin32.obj) : error LNK2001: unresolved external symbol __imp__UnregisterClassA@8
1>sfml-window-s.lib(WindowImplWin32.obj) : error LNK2001: unresolved external symbol __imp__UnregisterClassW@8
1>sfml-window-s.lib(WindowImplWin32.obj) : error LNK2001: unresolved external symbol __imp__CreateWindowExW@48
1>sfml-window-s.lib(WindowImplWin32.obj) : error LNK2001: unresolved external symbol __imp__SetWindowPos@28
1>sfml-window-s.lib(WindowImplWin32.obj) : error LNK2001: unresolved external symbol __imp__MapVirtualKeyA@8
1>sfml-window-s.lib(WindowImplWin32.obj) : error LNK2001: unresolved external symbol __imp__GetCapture@0
1>sfml-window-s.lib(WindowImplWin32.obj) : error LNK2001: unresolved external symbol __imp__SetCapture@4
1>sfml-window-s.lib(WindowImplWin32.obj) : error LNK2001: unresolved external symbol __imp__ReleaseCapture@0
1>sfml-window-s.lib(WindowImplWin32.obj) : error LNK2001: unresolved external symbol __imp__SetWindowTextA@8
1>sfml-window-s.lib(WindowImplWin32.obj) : error LNK2001: unresolved external symbol __imp__SetWindowTextW@8
1>sfml-window-s.lib(WindowImplWin32.obj) : error LNK2001: unresolved external symbol __imp__GetClientRect@8
1>sfml-window-s.lib(WindowImplWin32.obj) : error LNK2001: unresolved external symbol __imp__GetWindowRect@8
1>sfml-window-s.lib(WindowImplWin32.obj) : error LNK2001: unresolved external symbol __imp__AdjustWindowRect@12
1>sfml-window-s.lib(WindowImplWin32.obj) : error LNK2001: unresolved external symbol __imp__SetCursor@4
1>sfml-window-s.lib(WindowImplWin32.obj) : error LNK2001: unresolved external symbol __imp__GetWindowLongA@8
1>sfml-window-s.lib(WindowImplWin32.obj) : error LNK2001: unresolved external symbol __imp__SetWindowLongA@12
1>sfml-window-s.lib(WindowImplWin32.obj) : error LNK2001: unresolved external symbol __imp__LoadCursorA@8
1>sfml-window-s.lib(WindowImplWin32.obj) : error LNK2001: unresolved external symbol __imp__CreateIcon@28
1>sfml-window-s.lib(WindowImplWin32.obj) : error LNK2001: unresolved external symbol __imp__DestroyIcon@4
1>sfml-window-s.lib(WindowImplWin32.obj) : error LNK2001: unresolved external symbol __imp__ChangeDisplaySettingsA@8

7
General / Re: SFML 2.1 & VS 2012
« on: November 25, 2013, 04:28:41 pm »
Nice! I'm at work so I can't work on it right now, but I'll come back if I have any problems. Thanks!

8
General / Re: SFML 2.1 & VS 2012
« on: November 25, 2013, 03:46:02 pm »
Did this change happen before or after the 2.1 release? Could I just bypass it by remaking the actual 2.1 release instead of from github?

9
General / SFML 2.1 & VS 2012
« on: November 25, 2013, 04:33:47 am »
so, I downloaded SFML 2.1 to build with CMake so I can change the static libraries to not use the standard libraries, but when I do, I get 42 linker errors. I followed the tutorial as closely as possible, but I either missed something, or I'm derping somewhere.

Quote
1>sfml-graphics-s.lib(Texture.obj) : error LNK2001: unresolved external symbol ___GLEW_ARB_texture_non_power_of_two
1>sfml-graphics-s.lib(RenderTarget.obj) : error LNK2001: unresolved external symbol ___glewBlendFuncSeparateEXT
1>sfml-graphics-s.lib(RenderTarget.obj) : error LNK2001: unresolved external symbol ___GLEW_EXT_blend_func_separate
1>sfml-graphics-s.lib(GLCheck.obj) : error LNK2001: unresolved external symbol _glewInit
1>sfml-graphics-s.lib(GLCheck.obj) : error LNK2001: unresolved external symbol _glewGetErrorString
1>sfml-graphics-s.lib(Shader.obj) : error LNK2001: unresolved external symbol ___glewActiveTextureARB
1>sfml-graphics-s.lib(Shader.obj) : error LNK2001: unresolved external symbol ___glewAttachObjectARB
1>sfml-graphics-s.lib(Shader.obj) : error LNK2001: unresolved external symbol ___glewCompileShaderARB
1>sfml-graphics-s.lib(Shader.obj) : error LNK2001: unresolved external symbol ___glewCreateProgramObjectARB
1>sfml-graphics-s.lib(Shader.obj) : error LNK2001: unresolved external symbol ___glewCreateShaderObjectARB
1>sfml-graphics-s.lib(Shader.obj) : error LNK2001: unresolved external symbol ___glewDeleteObjectARB
1>sfml-graphics-s.lib(Shader.obj) : error LNK2001: unresolved external symbol ___glewGetHandleARB
1>sfml-graphics-s.lib(Shader.obj) : error LNK2001: unresolved external symbol ___glewGetInfoLogARB
1>sfml-graphics-s.lib(Shader.obj) : error LNK2001: unresolved external symbol ___glewGetObjectParameterivARB
1>sfml-graphics-s.lib(Shader.obj) : error LNK2001: unresolved external symbol ___glewGetUniformLocationARB
1>sfml-graphics-s.lib(Shader.obj) : error LNK2001: unresolved external symbol ___glewLinkProgramARB
1>sfml-graphics-s.lib(Shader.obj) : error LNK2001: unresolved external symbol ___glewShaderSourceARB
1>sfml-graphics-s.lib(Shader.obj) : error LNK2001: unresolved external symbol ___glewUniform1fARB
1>sfml-graphics-s.lib(Shader.obj) : error LNK2001: unresolved external symbol ___glewUniform1iARB
1>sfml-graphics-s.lib(Shader.obj) : error LNK2001: unresolved external symbol ___glewUniform2fARB
1>sfml-graphics-s.lib(Shader.obj) : error LNK2001: unresolved external symbol ___glewUniform3fARB
1>sfml-graphics-s.lib(Shader.obj) : error LNK2001: unresolved external symbol ___glewUniform4fARB
1>sfml-graphics-s.lib(Shader.obj) : error LNK2001: unresolved external symbol ___glewUniformMatrix4fvARB
1>sfml-graphics-s.lib(Shader.obj) : error LNK2001: unresolved external symbol ___glewUseProgramObjectARB
1>sfml-graphics-s.lib(Shader.obj) : error LNK2001: unresolved external symbol ___GLEW_ARB_fragment_shader
1>sfml-graphics-s.lib(Shader.obj) : error LNK2001: unresolved external symbol ___GLEW_ARB_shader_objects
1>sfml-graphics-s.lib(Shader.obj) : error LNK2001: unresolved external symbol ___GLEW_ARB_shading_language_100
1>sfml-graphics-s.lib(Shader.obj) : error LNK2001: unresolved external symbol ___GLEW_ARB_vertex_shader
1>sfml-graphics-s.lib(ImageLoader.obj) : error LNK2001: unresolved external symbol _jpeg_std_error
1>sfml-graphics-s.lib(ImageLoader.obj) : error LNK2001: unresolved external symbol _jpeg_CreateCompress
1>sfml-graphics-s.lib(ImageLoader.obj) : error LNK2001: unresolved external symbol _jpeg_destroy_compress
1>sfml-graphics-s.lib(ImageLoader.obj) : error LNK2001: unresolved external symbol _jpeg_stdio_dest
1>sfml-graphics-s.lib(ImageLoader.obj) : error LNK2001: unresolved external symbol _jpeg_set_defaults
1>sfml-graphics-s.lib(ImageLoader.obj) : error LNK2001: unresolved external symbol _jpeg_set_quality
1>sfml-graphics-s.lib(ImageLoader.obj) : error LNK2001: unresolved external symbol _jpeg_start_compress
1>sfml-graphics-s.lib(ImageLoader.obj) : error LNK2001: unresolved external symbol _jpeg_write_scanlines
1>sfml-graphics-s.lib(ImageLoader.obj) : error LNK2001: unresolved external symbol _jpeg_finish_compress
1>sfml-system-s.lib(SleepImpl.obj) : error LNK2001: unresolved external symbol __imp__timeGetDevCaps@8
1>sfml-system-s.lib(SleepImpl.obj) : error LNK2001: unresolved external symbol __imp__timeBeginPeriod@4
1>sfml-system-s.lib(SleepImpl.obj) : error LNK2001: unresolved external symbol __imp__timeEndPeriod@4
1>sfml-window-s.lib(JoystickImpl.obj) : error LNK2001: unresolved external symbol __imp__joyGetPosEx@8
1>sfml-window-s.lib(JoystickImpl.obj) : error LNK2001: unresolved external symbol __imp__joyGetDevCapsW@12


I'm assuming I'm missing something small, but I have SFML_STATIC, I'm using /MT, I built SFML Statically (I only have the '-s.lib's), and I built with the SFML_USE_STD_LIBS flag set to false so I can link statically, but apparently I can't. Does anything jump out at you? I also use glew from their website so I can use Vertex Buffer Objects for rendering with OpenGL.

10
Network / Re: [SFML 2.0] Does TCP socket use the Window context?
« on: March 15, 2013, 08:00:01 pm »
Nevermind. Turns out I forgot to remove the window.display() function from the main thread loop and it was crashing in a different area. That was an awkward bug combination. My apologies. :P

11
Network / [SFML 2.0] Does TCP socket use the Window context?
« on: March 15, 2013, 06:59:11 pm »
I'm using a multi-threaded program to use one for rendering and the other for things with the CPU.. but after I create the second thread and start the context in it for the window, I'm unable to do anything with the TCP socket without it crashing. Is that it, or am I doing something wrong?

12
Graphics / [SOLVED]Vertex Buffer Object error
« on: February 18, 2013, 12:06:44 am »
so.. I have NO idea why this is throwing an exception, but it's crashing my game whenever I call glDrawArrays. I set everything up correctly, and I've even copied-pasted code from tutorials that show people how to use VBOs, and it goes up to the glDrawArrays, and then crashes. I'm using sf::Renderwindow, and I get the error 0xC0000005: Access violation reading location 0x00000000.
GLuint createVBO(GLfloat* vertices, int size){
        GLuint vbo;
        glGenBuffers(1, &vbo);
        glBindBuffer(GL_ARRAY_BUFFER, vbo);
        glBufferData(GL_ARRAY_BUFFER, size*sizeof(GL_FLOAT), vertices, GL_STATIC_DRAW);
        glBindBuffer(GL_ARRAY_BUFFER, 0);
        return vbo;
}

//init function
glewInit();
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
glOrtho(0, window.getSize().x, window.getSize().y, 0, -1, 1);
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
glEnable(GL_ALPHA_TEST);
glLoadIdentity();
glEnable(GL_TEXTURE_2D);
glLoadIdentity();
glAlphaFunc(GL_GREATER, 0.2f);
glLoadIdentity();
GLfloat *verts = new GLfloat[6];
verts[0] = 100.0f; //Verts at (100, 100), (200, 100), (150, 150)
verts[1] = 100.0f;
verts[2] = 200.0f;
verts[3] = 100.0f;
verts[4] = 150.0f;
verts[5] = 150.0f;
GLuint VertexVBOID = createVBO(verts, 6);
while(running){
        glBindBuffer(GL_ARRAY_BUFFER, VertexVBOID);
        glEnableClientState( GL_VERTEX_ARRAY );
        glVertexPointer(2, GL_FLOAT, 0, BUFFER_OFFSET(0));
        glDrawArrays(GL_TRIANGLES, 0, 3);
        glBindBuffer( GL_ARRAY_BUFFER, 0 );
        glDisableClientState( GL_VERTEX_ARRAY );
        window.display();
        sf::sleep(sf::milliseconds(16));
}

For anyone who is looking for the answer in the future, my problem was solved from http://www.sfml-dev.org/old-forum/viewtopic.php?t=7327&sid=c277620601084e8aa0f406a415a6b795. I hadn't disabled some states that SFML had enabled in secrecy. GL_TEXTURE_COORD_ARRAY & GL_COLOR_ARRAY.

13
General / Re: Any idea on why I can't use /MT?
« on: February 08, 2013, 04:21:14 pm »

Not for the RC code base, since that's already quite outdated, but I maintain Unofficial Nightly Builds.
Note: If you talk about SFML 2 RC you're referring to the code base at the time the release candidate got published.

I downloaded it and tried using the STATIC_STD libs you built, and the errors with the Runtime went away. I don't quite know why mine weren't building. But, thanks for the builds!

14
General / Any idea on why I can't use /MT?
« on: February 08, 2013, 04:19:41 am »
I built SFML 2.0 RC with CMake with a tutorial I found online, and I know it works, because I've used it before (with /MD setting), and it worked fine. I want to use the /MT flag with SFML, and I found out through the forums I need to rebuild it, so I installed CMake and did everything I had to with VS2012 command prompt, and it built fine. I made sure I used the "SFML_USE_STATIC_STD_LIBS=TRUE", but it still gives me the errors in studio when I try to compile it with link errors like
 
Quote
sfml-window-s.lib(Window.cpp.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MT_StaticRelease' in Source.obj
I'm so frustrated, because I've spent hours trying to fix this, and I have gotten no progress at all. Can you tell me what I need to fix to get this to work?
I'm using the settings -G "NMake Makefiles" -D CMAKE_BUILD_TYPE=Release -D BUILD_SHARED_LIBS=FALSE -D SFML_USE_STATIC_STD_LIBS=TRUE
Would someone by any chance already have pre-built sfml 2.0 RC with these specs? :D

15
Window / Re: Weird Vsync CPU consumption?
« on: July 17, 2012, 03:02:14 pm »
I'm not too worried about it, but its definitely an inconvenience because I have no clue how much CPU my loop takes when my rendering is taking all of it. :(
Well, I'll just ignore it I guess, thanks for the help! :D

Pages: [1] 2 3