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

Pages: 1 [2] 3 4
Graphics / Re: Setting a view's position?
« on: January 17, 2012, 05:15:09 am »
Correct me if I'm wrong here, but would SetCenter work to change the positon? I've never used sf::View yet but looking at the sf::View source this is how the Move method operates.

Code: [Select]

void View::Move(float offsetX, float offsetY)
    SetCenter(myCenter.x + offsetX, myCenter.y + offsetY);

Graphics / Why wont my code for making text work?
« on: January 17, 2012, 04:57:59 am »
Take a look at the example at the link below. It has a perfect example.

General discussions / New graphics API ready
« on: December 14, 2011, 10:46:54 am »
The new API is looking promising! Congrats! However I'm really going to miss that sf::Sprite::GetSize().. oh well that's life! Looks like your long term planning might be paying off on this :D

General discussions / [SFML] error 0xc015002 help please :S
« on: October 29, 2011, 08:41:40 pm »
Quote from: "keyforge"
You have to recompile SFML for Visual Studio 2010, the Visual Studio 2008 binaries won't work with it. Did you forget to build the dynamic libs? You might want to try following this video to make sure you did it correctly. http://www.youtube.com/watch?v=-uHGZGgMETg

I compiled 1.6 for anyone who wants it. You can get them at

(Should be a zip somewhere with all of those files.)

General / SFML2 SegFaults on Clear
« on: September 13, 2011, 03:24:32 am »
Just taking a shot in the dark here but what if you tried.

g++ -g -o main main.cpp -lGL -lGLU -lsfml-graphics -lsfml-window -lsfml-system && ./main

I think the order of the linking matters.

p.s. I'm a noob with G++

General discussions / Problems linking dynamically
« on: September 11, 2011, 10:46:31 pm »
Yeah the conversion messes with the output dirs. The DLL debug names for the lib files are the same as DLL release lib files. Messy and confusing. I just compiled them for you and uploaded them. Enjoy 8)


General discussions / Design flaw in my game ?
« on: September 11, 2011, 07:41:11 am »
Don't know if this will be any help to you but in my engine I have a screen (state) manager that is a singleton class. I also give each screen a unique name. So in one screen I could pull out a code like this

Code: [Select]

However since its saved as the base class you need to cast it to the original screen to pull out functions not in the XDE::Screen.

Code: [Select]
MainMenu menu* = static_cast<MainMenu*>(XDE::ScreenManager::GetPtr()->GetScreen["MainMenu"]);

A little lengthy I know but it gets the job done ;) I usually overlap screens. For saving tho I would create a screen run some functions and it will deactive itself and do a callback onto some function to tell the main program whats up.

I hope that wasn't too confusing! lol

SFML projects / Falling Rocks! (demo inside)
« on: September 09, 2011, 06:38:16 am »
That game is fun and addicting. I got 800 some on my first try and now I can't even get close to that on hard! Only suggestion I have is to create a volume / mute option in the menu. :D I tent to ignore game music hehe!

Graphics / SubRect
« on: September 09, 2011, 05:51:11 am »
Quote from: "asdatapel"
Im using 2.0. I know it works fine cuz ive been using the same code for a while from 1.6. All I did was cahange some things like textures instead of images, pollevent instead of getevent, etc. the base of the code is the same.

I think I know what the problem is. Porting from SFML 1.6 to 2.0 using sf::IntRect has different arguments. It is no longer top, left, right, bottom. It now takes X, Y, width, height. Give that a try ;)

Graphics / SubRect
« on: September 09, 2011, 02:10:28 am »
What version of SFML are you using? Second, you should show us some of the code to see if its not a problem with your coding.

System / Re: sf::InputStream newb question
« on: September 09, 2011, 02:01:54 am »
Here you go mate, I think this will work.


System / Using threads to load stuff
« on: September 08, 2011, 08:29:09 am »
Yeah that would work. Instead of using global bool you could reference the bool and pass it to the function. I just think it would probably be cleaner code. Here is an example of what i was talking about. Make sure you make things thread-safe! :D

Code: [Select]

//SFML 2.0
void LoadingThreadFunc(bool &isRunning)
isRunning = true;

for(int i = 1; i != 51; ++i)
std::cout << "[LoadingThread] " << i << "/50 has been loaded." << std::endl;

isRunning = false;
int main()
bool isThreadRunning = false;
sf::Thread loadingThread(&LoadingThreadFunc, isThreadRunning);

//Run the state of displaying progress and what not.


return false;

SFML projects / JSFML - A Java binding for SFML
« on: September 01, 2011, 01:45:31 am »
Quote from: "pdinklag"
Heh. :)
I'm not the first doing this either, but whoever worked on it first cancelled it.

I should definitely do some "demo" source and binary releases soon, been saying this for months. :roll: Things are working well, but I've still only tested on Win32, and besides there's one large SFML2 change still coming up (new Drawable API) which I'm waiting for.

Recently I've mostly worked on the javadoc, the latest version of that is currently up here: http://stuff.pdinklag.de/jsfml/javadoc/

I seen that thread a long time ago and noticed it died. So yesterday I got bored and I've always wanted to try JNI so I had some fun.

I'm excited for the demo. If you need anything just let me know I would love to help. Totally reasonable for waiting. I had to change so much of my code in the past few months with these internal changes.

SFML projects / JSFML - A Java binding for SFML
« on: August 31, 2011, 04:38:29 am »
Quote from: "pdinklag"
Ported the new / changed sf::Texture, sf::RenderTexture and sf::Image classes.

Very nice! Keep up the good work! Can't wait to play with this when its released.

-Slightly off topic below-
I just started a test project to use JNI and I figured why not use SFML for fun. I got the sf::Clock usable in java. Then I googled jsfml and found this! Man I thought I was being original! Oh well, at least I can say I played with JNI ;)

General discussions / [IDEA] Move sf::Rect into System Module?
« on: August 23, 2011, 05:11:51 am »
Quote from: "Laurent"
Yeah... I admit that it's not a bad idea.

... Maybe :lol:

At least he is slightly considering it :D

Pages: 1 [2] 3 4