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

Pages: 1 2 [3] 4 5 ... 8
31
SFML projects / Falling Rocks! (demo inside)
« on: February 02, 2012, 09:02:55 pm »
Quote from: "texus"
Very nice game.
I just got a score of 1585 in impossible.

Apparently it's not for windows only: it runs perfectly on my linux with wine.


Good!! Anyway I'm working to release a linux native version. :)
Potentially I can release a MacOS X version, too! But I haven't a Mac. :'D

32
SFML projects / Falling Rocks! (demo inside)
« on: February 02, 2012, 07:29:52 pm »
Quote from: "aBallofWin"
Really fun game, you should develop it for the iphone or ipad :P


Quote from: "player931402"
Great game! gj!

yeah you should export your project on android and ipod/iphone..!
at  cost<1€ you become richest!


I think it's a good idea!
I'm running to download Android and iOS SDKs! ;)

33
SFML projects / Para Para Paranoid
« on: February 02, 2012, 01:15:45 am »
Yeahhh I beat the game! :)
A very interesting surprise at the end of the game! :D

34
SFML projects / Para Para Paranoid
« on: January 31, 2012, 08:15:34 pm »
The game is awesome!! :)
I finish the game with a bad ending.. :/

35
SFML projects / COSMAGERS - new 2D MMORPG developing
« on: January 22, 2012, 01:53:33 pm »
I can't try the game, cause of the low-resolution of my screen! Some buttons disappear out of the screen..
My screen resolution is 1366x768.
Window resizing doesn't work properly. :/

36
Graphics / Sprite Movement on Single MouseClick
« on: January 17, 2012, 10:14:52 pm »
Quote from: "LucasShadow"
How would I update the Destination and Distance vectors then?  Because doing:
Code: [Select]
Destination = (NewX, NewY);
Doesnt work (error).  And I can not find any other commands in the documentation that would allow for the vector to be updated within the if statement.


The right code is:

Code: [Select]

Destination = sf::Vector2f (NewX, NewY);


Additionally, I think you have to check events for mouse inside the while statement, instead of using App.GetInput() method, cause they have a different behavior.
App.GetInput().IsMouseButtonDown() returns true continuously untill you release the button.
App.GetEvent() returns a true value only at the moment you press the button.

37
Graphics / Sprite Movement on Single MouseClick
« on: January 07, 2012, 12:00:11 am »
I think you have to normalize  the "destination - origin" vector, that is the movement direction vector, on mouse click, with a code like this:

Code: [Select]

sf::Vector2f direction = Destination - Origin;
// calculate distance between origin and destination points
float distance = sqrt( (Destination.X - Origin.X) * (Destination.X - Origin.X) + (Destination.Y - Origin.Y) *  (Destination.Y - Origin.Y) );
// vector normalization (you obtain a unit vector = vector of lenght 1)
direction /= distance;


At each loop you could move your player sprite with:

Code: [Select]

Player.Move ( direction * speed );


So you have a movement not-dependent from distance. :)
You have also to manually check when sprite reach the destination point (within a certain error margin)

38
General / Gameloops and timing, smooth rotation
« on: December 13, 2011, 08:27:51 pm »
Let VSync decide the FPS of the game.
Enable window vsync and use GetFrameTime function to obtain smooth movements and rotations. :) It works!

39
General / Code::Blocks & Windows XP libgcc_s_dw2-1.dll
« on: December 13, 2011, 07:35:00 pm »
In Code::Blocks I use this linking options:
Code: [Select]
-static-libgcc
-static-libstdc++

to avoid libgcc_s_dw2-1.dll dependence. :)
This is the way to static link gcc libraries.

40
SFML projects / Linavalanche
« on: December 09, 2011, 05:01:56 am »
Update: v.1.3.3alpha released!

Changes made in latest version:
  • Leaderboard access is now in a separated thread. This avoids the game to freeze when connecting to server to retrieve hi-scores.
  • Lines change to a white color on change. This makes it easier to find the colored lines (that give bonus on change) to get higher score.
  • F4 toggle fullscreen mode
Download Linavalanche v1.3.3alpha

41
General / Can sfml classes be serialized?
« on: December 03, 2011, 12:14:13 pm »
Quote from: "Laurent"
XML is serialization. It's just an output format -- other formats could be binary data, JSON, INI, ...

With a well designed library (such as boost.serialization) the serialization functions and the output format are completely separated. You only have to write your serialization functions once, in a generic way, and then you can output the result to many different formats.


Your remark is fully correct!
In my previous post with "serialization" I mean binary serialization, and with "using xml" I mean "using xml serialization without boost" :)

42
Graphics / Partially drawing/hiding a sf::Shape::Line
« on: December 02, 2011, 11:40:16 pm »
I think best solution is to calculate the intersection between the lines and the edge of the map display. :)

43
General / Can sfml classes be serialized?
« on: December 02, 2011, 07:32:39 pm »
Quote from: "Nexus"

Boost.Serialization doesn't enforce class modifications. For a non-intrusive serialization function, look at the documentation. Absolutely no need to modify SFML.


I knew that there was this non-intrusive method, but I preferred xml for simplicity (I've been using it for a while).
Anyway serialization could be my next choice. :)

44
General / Can sfml classes be serialized?
« on: December 02, 2011, 06:07:52 pm »
Quote from: "Laurent"

Everything that is relevant to serialize is public, so why would you need to modify SFML itself?


Probabily it's possible, but I dont know how. :)
So I used xml documents.

Quote from: "Nexus"
I don't see why this should be complex, either. Just provide the global function overloads required by Boost.Serialization.

How can I access a sfml function and override it? With a derived class?
Or maybe I don't understand what you want to mean...

45
General / Can sfml classes be serialized?
« on: December 01, 2011, 01:28:36 pm »
Quote from: "zeocyte"
Maybe this will help:
http://www.boost.org/doc/libs/1_48_0/libs/serialization/doc/index.html


I tried to use serialization with boost, but the simplest way to implement it in your program is to modify sfml code itself. I think there's a complex way to do serialization without modify sfml code, but IMO it doesn't worth it.
I suggest to use xml instead.
I use tinyxml lib to save/load my sfml objects. :)

Pages: 1 2 [3] 4 5 ... 8