SFML community forums

General => General discussions => Topic started by: chrisx18 on January 17, 2010, 09:30:30 pm

Title: is sfml good for me?
Post by: chrisx18 on January 17, 2010, 09:30:30 pm
i wanna make a top-down shooter with effects like... flashlight, mouse turning the player, and stuff like  when a player walks up to a window they can for example press enter.  Then a photo pops up showing whats outside.  of course all these photos would be preset and not literally 3d.
Title: is sfml good for me?
Post by: Laurent on January 17, 2010, 10:47:26 pm
I think that SFML can be perfect for this kind of game.

If your flashlight is meant to be a true dynamic light then it may be tricky to implement, but possible.
Title: is sfml good for me?
Post by: Nexus on January 17, 2010, 11:38:28 pm
Remember that it's always possible to write code directly in OpenGL, if SFML doesn't support a feature. Because SFML is based on OpenGL itsself, the integration is very easy.

However, this is just required in really special cases, since the SFML framework already provides ready functionality for a wide scope.
Title: is sfml good for me?
Post by: gsaurus on January 18, 2010, 02:21:54 am
I think shaders (post-fx on SFML1.5) is a way of making these dinamic lightnings  :), I have to try it sometime.
Title: thanks
Post by: chrisx18 on January 18, 2010, 02:56:21 am
thanks I downloaded it but I get and error on the first program.  it say sfml-system.dll not found on computer.
Title: is sfml good for me?
Post by: gsaurus on January 18, 2010, 03:19:36 am
You're following the tutorials, right? Have you put the dlls on your project's executable directory? (may be something like yourproject\bin\debug)
Title: got it
Post by: chrisx18 on January 18, 2010, 03:40:45 am
yeah i just got it i added .lib on accident.  once i added .dll it worked =)
Title: another problem..
Post by: chrisx18 on January 18, 2010, 04:12:12 am
i have another problem with opening a window tutorial...

compiler error...

window-window.obj : error LNK2019: unresolved external symbol "public: virtual __thiscall sf::Window::~Window(void)" (??1Window@sf@@UAE@XZ) referenced in function _main
1>window-window.obj : error LNK2019: unresolved external symbol "public: void __thiscall sf::Window::Display(void)" (?Display@Window@sf@@QAEXXZ) referenced in function _main
1>window-window.obj : error LNK2019: unresolved external symbol "public: __thiscall sf::Window::Window(class sf::VideoMode,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,unsigned long,struct sf::WindowSettings const &)" (??0Window@sf@@QAE@VVideoMode@1@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@KABUWindowSettings@1@@Z) referenced in function _main
1>window-window.obj : error LNK2019: unresolved external symbol "public: __thiscall sf::VideoMode::VideoMode(unsigned int,unsigned int,unsigned int)" (??0VideoMode@sf@@QAE@III@Z) referenced in function _main
1>C:\Users\Chris\Documents\Visual Studio 2008\Projects\new2\Debug\new2.exe : fatal error LNK1120: 4 unresolved externals


and my code...

Code: [Select]
#include <SFML/Window.hpp>

using namespace sf;
////////////////////////////////////////////////////////////
/// Entry point of application
///
/// \return Application exit code
///
////////////////////////////////////////////////////////////
int main()
{
    // Create the main window
    sf::Window App(sf::VideoMode(800, 600, 32), "SFML Window");

    // Start main loop
    bool Running = true;
    while (Running)
    {
        App.Display();
    }

    return EXIT_SUCCESS;
}


sorry im am completely new at this
Title: soo
Post by: chrisx18 on January 18, 2010, 04:42:16 am
so basically i have tried a few tutorials and instead of actually going through them I just tried compiling the source and all of them are having some type of linker error.  What am I doing wrong.
Title: is sfml good for me?
Post by: OniLinkPlus on January 18, 2010, 04:47:39 am
Maybe the problem is this:
1. You didn't actually read through the tutorials
2. You aren't linking the SFML libraries
Title: k
Post by: chrisx18 on January 18, 2010, 05:34:43 am
ok i got it.  the problem was i wasn't linking the write files...  NOW maybe im on my way to learning SFML.  thanks =)