Member Avatar

So i've decided to use SFML and i'm just trying to figure out its advantages and disadvantages...I've looked around and this is what i've got so far. Advantages: * Cross Platform * OO Design * Simple and fast (subjective) Disadvantages: * Quite new Any additional thoughts will again appreciated

Member Avatar
0
22
Member Avatar

Bassicly my code is supposed to be taking ints from `int tt[]` in `main()` const int tt[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, …

Member Avatar
0
23
Member Avatar

I want to make a game somwhat akin in size and complexity to SNES Zelda.

0
5
Member Avatar

I tried to run the basic code to create and open a window . The code is as follows : #include <iostream> #include <SFML/Window.hpp> 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; } I am getting the following error: 1>------ Build started: Project: sfml-test, Configuration: Debug Win32 ------ 1>Build started 9/22/2012 12:16:53 AM. 1>InitializeBuildStatus: 1> Touching "Debug\sfml-test.unsuccessfulbuild". 1>ClCompile: 1> All outputs are up-to-date. 1>ManifestResourceCompile: 1> All outputs are up-to-date. 1>window.obj : error LNK2019: unresolved external symbol "public: virtual __thiscall …

Member Avatar
0
4
Member Avatar

I have just started getting into SFML and Visual studio as well . I have always worked on turbo c++ . I am not sure I understand the very first code that I have come across while getting into SFML . Here is the program.. #include<iostream> #include<SFML\System.hpp> int main() { sf::Clock Clock; sf::Sleep(0.1f); while (Clock.GetElapsedTime() < 5.f) { std::cout << Clock.GetElapsedTime() << std::endl; sf::Sleep(0.5f); } return 0; } I know this is probably the most basic thing ever . But I have a few questions . Q1. What is 'sf' ? Is it a class ? Q2. Why is the …

Member Avatar
0
7
Member Avatar

What should be the output to the following code ? I am confused because I am getting a slightly different output everytime . Any other advise would also be appreciated . #include<iostream> #include<SFML\System.hpp> void apple_thread(void *data) { using namespace std; for(int i = 5 ; i<11 ; i++) { cout<<"I have "<<i<<" apples . "<<endl; } } void main() { sf::Thread thread(&apple_thread); thread.Launch(); using namespace std; for(int i = 5 ; i<11 ; i++) cout<<"I have "<<i<<" oranges . "<<endl; getchar(); }

Member Avatar
0
4
Member Avatar

Hello, I'm fairly new to programming, and I'm not exactly sure how to do line-rect collision detection. If it helps, I'm using SFML 2. Can someone explain to me how I would go about coding line-rect collision detection? Thanks in advance.

Member Avatar
0
4
Member Avatar

[B]On visual studio 10:[/B] I've tryed out some code and everything was fine, but when I use this line: [CODE]sf::RenderWindow App( sf::VideoMode ( 800, 600, 32 ), "Hexagon Puzzle Thing" );[/CODE] Or anything with RenderWindow I get an: Unhandled exception at 0x76adfeb8 in SFML + Box2D Project.exe: 0xC0000005: Access violation reading location 0xcccccccc. Code I'm using: [CODE]#include <SFML/Graphics.hpp> int main() { sf::RenderWindow App( sf::VideoMode ( 800, 600, 32 ), "Hexagon Puzzle Thing" ); while( App.IsOpened() ) { sf::Event Event; while( App.GetEvent( Event )) { if( Event.Type == sf::Event::Closed ) App.Close(); } App.Draw( sf::Shape::Rectangle( 350, 200, 600, 350, sf::Color::Green )); App.Display(); …

0
1
Member Avatar

Could someone help me with this code? When I compile & run my project, it says "Battlefront.exe has stopped working. Windows is looking for a solution to this problem" This is my code: [CODE]//----------------------------------------------- /// Battlefront.cpp Source Code File /// Part of the Battlefront.cbp Code::Blocks Project //----------------------------------------------- /// This file's purpose is to provide general functions and the project's entry point //----------------------------------------------- #include "Battlefront.h" #include "PlayerClass.h" sf::RenderWindow MainWindow(sf::VideoMode(800, 600, 32), "Battlefront INDEV"); GameSection Mode; PlayerClass PlayerA(UK); int main() { if(!GameSetUp()) return EXIT_FAILURE; GameLoop(); } void Draw() { if(Mode == GAME) { MainWindow.Draw(PlayerA.Arms); } }[/CODE] [CODE]//----------------------------------------------- /// GameEngine.cpp Source Code File …

Member Avatar
0
13
Member Avatar

Hi, I'm learning to use the Simple, Fast, Multimedia Library (or SFML), and I was going through the tutorials on their website. The first one (found [URL="http://www.sfml-dev.org/tutorials/1.6/window-window.php"]here[/URL]) said the following: [QUOTE]Under Windows operating systems, you may have created a "Windows Application" project, especially if don't want the console to show up. In such case, to avoid replacing main by WinMain, you can link with SFML_Main static library and keep a standard and portable main entry point.[/QUOTE] I have no idea what this means. When I run the .cpp file that you can download at the bottom of the page, it …

Member Avatar
0
5

The End.