Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


SFML troubles


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
12 replies to this topic

#1 big-green   Members   -  Reputation: 176

Like
0Likes
Like

Posted 29 December 2012 - 04:24 AM

Hey everyone, happy holidays!

First off, I'm sort of a beginner in programming, but since I got bored of the usual high school assignments of reading and writing to text files, I decided to try my luck with sfml, but I run into a problem which I guess is not that common (couldn't find the answer on the internet). So the solution was obvious, I decided to ask a question on the forum I am always stalking :)

The problem:

After compiling the code and running it, I only get an empty console window and nothing else (i copied the code from the sfml website, which is supposed to output a green circle in a new window). I tried marking lines with the great red dot, but when debugging it doesn't let me jump to other lines, seems like the program itself is just stuck. I am using visual studio 11, I get the same thing while using visual c++ 2010 though.

Looking forward to your replies



Sponsor:

#2 big-green   Members   -  Reputation: 176

Like
-1Likes
Like

Posted 29 December 2012 - 06:24 AM

Resolved, please close this :)



#3 minibutmany   Members   -  Reputation: 1661

Like
0Likes
Like

Posted 29 December 2012 - 08:23 AM

Can you share your solution? It may be helpful to those having similar problems.


Stay gold, Pony Boy.

#4 big-green   Members   -  Reputation: 176

Like
0Likes
Like

Posted 29 December 2012 - 10:05 AM

The problem was myself, I was so anxious to get going and didn't wait the 30 seconds the program needed to open a window(for me at least), i guess this was a little unexpected since i came from doing very small stuff that loads instantly.



#5 Khatharr   Crossbones+   -  Reputation: 3031

Like
0Likes
Like

Posted 29 December 2012 - 11:15 AM

Why does it take 30 seconds to open the window? Are you loading a bunch of stuff and doing a lot of work first?


void hurrrrrrrr() {__asm sub [ebp+4],5;}

There are ten kinds of people in this world: those who understand binary and those who don't.

#6 big-green   Members   -  Reputation: 176

Like
0Likes
Like

Posted 29 December 2012 - 12:04 PM

I don't know why it takes that long, I'm not really loading that much(i assume that you mean there's a lot of code or objects being created, correct me if I misunderstood you).



#7 Khatharr   Crossbones+   -  Reputation: 3031

Like
0Likes
Like

Posted 29 December 2012 - 12:18 PM

Just curious about what's going on prior to the ShowWindow() call. I don't know how you're implementing anything, but that seems like a long time to get a window open.


void hurrrrrrrr() {__asm sub [ebp+4],5;}

There are ten kinds of people in this world: those who understand binary and those who don't.

#8 spiralseven   Members   -  Reputation: 132

Like
-2Likes
Like

Posted 30 December 2012 - 01:36 AM

My linker always screws up with SFML, so I have to re-install  my IDE

blech..



#9 Chad Smith   Members   -  Reputation: 1139

Like
0Likes
Like

Posted 30 December 2012 - 12:04 PM

I think we'd be interested in seeing the code you have because it does seem really odd it'd take 30 seconds for a window to show up just to do what you are doing.



#10 stitchs   Crossbones+   -  Reputation: 1307

Like
0Likes
Like

Posted 30 December 2012 - 12:09 PM

Could you please post your code to the issue you had because, even though you solved that one another issue might have presented itself (a general rule of thumb in the ever-progressing world of coding).

 

It is interesting as it only ever takes me a couple of seconds (max) from Console to Main window. I am curious to the specs of your machine also, if you wouldn't mind providing this?

 

Another thing: did you use the basic "Get a window to show" tutorial provided on the official website, or use the API without reference?

 

Regards,

 

Stitchs.



#11 big-green   Members   -  Reputation: 176

Like
0Likes
Like

Posted 31 December 2012 - 07:58 AM

Yes, sure, it was the basic "Get a window to show" tutorial(the part that only deals with opening a window) in their "Tutorials" section (It was SFML 2.0 by the way, kind of forgot to mention that)

 

My computer's:

Processor: Intel Core 2 Quad 2.5Ghz
32bit OS
Ram: 3.25Gb
Graphics card: GF 9800GT

My computer is really old, almost 4 years, so I guess that's the problem
 



#12 BeerNutts   Crossbones+   -  Reputation: 2985

Like
0Likes
Like

Posted 02 January 2013 - 01:27 PM

Yes, sure, it was the basic "Get a window to show" tutorial(the part that only deals with opening a window) in their "Tutorials" section (It was SFML 2.0 by the way, kind of forgot to mention that)
 
My computer's:

Processor: Intel Core 2 Quad 2.5Ghz
32bit OS
Ram: 3.25Gb
Graphics card: GF 9800GT

My computer is really old, almost 4 years, so I guess that's the problem
 

No, I guarantee that's not the problem. It's something else. If you wold just paste your code on this board, we cold probably point out what's wrong, but since you won't we can't help you.

Or, you can go to the dev-sfml.org forums and ask them
My Gamedev Journal: 2D Game Making, the Easy Way

---(Old Blog, still has good info): 2dGameMaking
-----
"No one ever posts on that message board; it's too crowded." - Yoga Berra (sorta)

#13 BCullis   Crossbones+   -  Reputation: 1813

Like
0Likes
Like

Posted 02 January 2013 - 02:19 PM

If you wold just paste your code on this board, we cold probably point out what's wrong, but since you won't we can't help you.

Yes, sure, it was the basic "Get a window to show" tutorial(the part that only deals with opening a window) in their "Tutorials" section

 

I think the poster assumes this answers the "show your code" request, but as I'd like to point out to the OP from my own experience: if the tutorial works for people, but not for you, there's a change you made somewhere that's causing the discrepancy.  If you quite literally pasted the tutorial in whole-sale, then it might have to do with your compiler/IDE settings.


Hazard Pay :: FPS/RTS in SharpDX
DeviantArt :: Because right-brain needs love too




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS