generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

SFML problems.

Previous Thread :: Next Thread 
myrkos is not online. myrkos
Joined: 06 Sep 2010
Total Posts: 8072
10 Apr 2012 09:21 AM
sf::Event::Closed

And all the member functions of sf::Window start with upper case...
Report Abuse
TheMyrco is not online. TheMyrco
Joined: 13 Aug 2011
Total Posts: 15105
10 Apr 2012 09:27 AM
@myrkos: what do we have to do with that?
I typed it into VS, but it still keeps erroring the same.
Report Abuse
su8 is not online. su8
Joined: 06 Mar 2009
Total Posts: 6334
10 Apr 2012 09:33 AM
>And all the member functions of sf::Window start with upper case...

It doesn't look like that;
For example
Window.getSize();
Doesn't give an error or fix it to Window.GetSize();
Report Abuse
TheMyrco is not online. TheMyrco
Joined: 13 Aug 2011
Total Posts: 15105
10 Apr 2012 10:09 AM
;c
Report Abuse
su8 is not online. su8
Joined: 06 Mar 2009
Total Posts: 6334
10 Apr 2012 12:05 PM
I think we might have outdated (Or updated from the tutorial vid :PP)..
There's
Window.IsOpen()
But no
Window.IsOpened()
(And other stuff that doesn't equal with le vids)

And le vid used le window.isopened
Report Abuse
miloguy is not online. miloguy
Joined: 19 Dec 2009
Total Posts: 7702
10 Apr 2012 08:31 PM
Here's the code for my SFML game called "Spaceship Amazing" (inside the

int main(){
RenderWindow window(VideoMode(WINDOW_WIDTH,WINDOW_HEIGHT),"Spaceship Amazing!");

BeginState(new MainScreen());

Clock clock;

while(Window_Displaying)
{
Event event;
while(window.GetEvent(event))
{
if(event.Type == Event::Closed)
{
Window_Displaying=false;
break;
}
}

double dt=clock.GetElapsedTime();
game->Update(&window,dt);
clock.Reset();
game->Draw(&window);

window.Display();

//sf::Sleep(1.0f/FPS);
}
}



"game" is an instance of a GameState class I made that has Update and Draw methods.
The only problem I ever had was linking. I was going to make another game but I don't want to go through the whole setting-up process again, XNA is so much easier
Report Abuse
myrkos is not online. myrkos
Joined: 06 Sep 2010
Total Posts: 8072
10 Apr 2012 08:35 PM
g++ yourfile.cpp game.o whatever.o shiz.o -lsfml-graphics -lsfml-window -lsfml-system -o game


done. Automate it with makefiles and you're ready.
Report Abuse
miloguy is not online. miloguy
Joined: 19 Dec 2009
Total Posts: 7702
10 Apr 2012 11:35 PM
@myrkos
>not using an IDE
Report Abuse
myrkos is not online. myrkos
Joined: 06 Sep 2010
Total Posts: 8072
10 Apr 2012 11:59 PM
> Linux/OS X is itself an IDE
Report Abuse
su8 is not online. su8
Joined: 06 Mar 2009
Total Posts: 6334
11 Apr 2012 07:50 AM
@miloguy

This:
window.GetEvent(event)

Gives an error that getevent doesn't exist

Report Abuse
miloguy is not online. miloguy
Joined: 19 Dec 2009
Total Posts: 7702
11 Apr 2012 12:28 PM
Maybe I'm using a different version of SFML or something.
I assume the capitalization is correct and that the window object exists
Report Abuse
su8 is not online. su8
Joined: 06 Mar 2009
Total Posts: 6334
11 Apr 2012 12:36 PM
What version are you using?
Report Abuse
miloguy is not online. miloguy
Joined: 19 Dec 2009
Total Posts: 7702
11 Apr 2012 12:37 PM
SFML 1.6
Report Abuse
TheMyrco is not online. TheMyrco
Joined: 13 Aug 2011
Total Posts: 15105
11 Apr 2012 12:39 PM
Le derp we're using Version 2.0 =_=
Report Abuse
Previous Thread :: Next Thread 
Page 2 of 2Go to page: 1, [2] Prev
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image