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 6 ... 8
46
SFML projects / New version released!
« on: November 28, 2011, 11:52:42 pm »
Update: v.1.3.2alpha released!

Changes made in latest version:
  • Now you can see 100 scores in the high-score screen, not only 10 (use arrow keys to browse)
  • Pressing the ESC key while playing, do not exit the game, but cancels it.
  • Pressing the window close button exits the game also in high-score screen.
  • Pressing the ESC key while writing player name doesn't save the score to leaderboard.

Download Linavalanche v1.3.2alpha

47
SFML projects / Linavalanche
« on: November 27, 2011, 10:32:33 pm »
Quote from: "Haze"
That's a really nice and original little game! The concept is very challenging.

The program runs fine under Linux with wine.

Thanks for the positive comment. I'm happy you like the concept! :)
Quote from: "Haze"


Minor bug: it seems like sf::Event::Closed is not handled in the Online High-Scores menu.

It's a known issue, for sure I'll fix it in the next version together to other minor bugs. I'm planning to put an high-score with more positions shown in different pages, where you can browse the leaderboard with arrow keys. :)

Quote from: "Haze"

PS: Eh? No Ninja? :x


I'll soon release a new version of Falling Rocks with online leaderboard. :)

48
SFML projects / Linavalanche
« on: November 27, 2011, 12:27:42 pm »
Quote from: "ActionBoy"
Do you encrypt the data sent to the mysql?


not yet, but I expect to do so in the future. :)

49
SFML projects / Linavalanche
« on: November 27, 2011, 01:44:31 am »
Quote from: "Lo-X"
I definitively love your games :D

How do you manage the online highscores ?


I'm happy you like them! :)
For online hi-scores I use:
Server side : a PHP/MySQL solution in a free web hosting site
Client side: sf::Http class from sfml network package. :)

50
SFML projects / Linavalanche
« on: November 26, 2011, 09:36:17 pm »
Quote from: ".teri"
Your game is well made. Sometimes I don't know which keys will move the ball in a desired way.


Thanks for your comment, teri!
Anyway, I was convinced that the controls were very intuitive.
I recommend you to use left/right keys when the line is horizontal and up/down when it's vertical, to avoid confusion.
Maybe it's just a matter of getting used to the controls.

51
SFML projects / Linavalanche
« on: November 26, 2011, 02:03:18 am »


This game was present at a game jam event in Milan (April 16th-17th 2011): "Lunarcade Factory: Lines". ( link )
I've made some changes since then.
The most important thing is that I have added a leaderboard online, so you can compete with other remote players. :)
The game have a simple mechanic: you have to survive as long as possible, jumping from a line to another. Jumps can be done when the little sphere is at the intersection of two lines.
Lines fall down from the top of the screen and the game is over when the player touch the bottom of the screen.
I used SFML 1.6 to do all graphics, using sf::Shape class. :)
Special thanks to posva who gave me some helpful tips to create the online leaderboard. :)

Controls

arrow keys = move the sphere
L-CTRL or Z = jump from a line to another one
M = Mute
P = Pause game
H = Display online high-scores
S = Save current score to online leaderboard
F4 = Toggle Fullscreen mode

Download

Download Linavalanche v1.3.3alpha

52
SFML projects / Re: Great game
« on: November 26, 2011, 01:23:30 am »
Quote from: "justcolorado"
And great concept.  Played it 20x already


I'm happy you like it! :)
I will soon release a new version of the game with online hi-score. :)

53
General / Sprite movement
« on: November 13, 2011, 11:08:20 pm »
Quote from: "krrice"
Thanks a lot for your help.It works now but I had to devide my GetFrameRate() / 200 to get it right. One more question if you don't mind. It pauses when I change directions is there something I can do about that?


There is another way to handle inputs continuosly (without waiting for a key will repeat if held longer).
In sfml 1.6 you could use, for example:
Code: [Select]

App.GetInput().IsKeyDown(sf::Key::Right)

I don't know how to do it on SFML 2. :/

54
General / Sprite movement
« on: November 13, 2011, 10:42:44 pm »
Quote from: "krrice"
I am using sfml2


In that case use:
Code: [Select]

App.EnableVerticalSync( true );

55
General / Sprite movement
« on: November 13, 2011, 10:29:00 pm »
Quote from: "krrice"
Thanks that worked but the movement is choppy is there a way to fix that?


Try (if you're using sfml1.6):
Code: [Select]

App.UseVerticalSync(true);

where App is your rendering window.
This command limits framerate to vertical refresh of your current video mode.

56
General / Re: Sprite movement
« on: November 13, 2011, 10:16:16 pm »
Pay attention to the structure of your switch statements.
You have 2 levels of switch (they are nested), so you have to write the correct code.
Try this!
(I highlighted with an arrow the lines I added)

Code: [Select]

float ElapsedTime = Window.GetFrameTime() ;
       
        // Move the sprite
        switch(Event.Type)
        {
        case sf::Event::KeyPressed:
            switch(Event.Key.Code)
->          {
                case sf::Keyboard::Left:
                    Sprite.Move(-100 * ElapsedTime, 0);
                    break;
                case sf::Keyboard::Right:
                    Sprite.Move( 100 * ElapsedTime, 0);
                    break;
                case sf::Keyboard::Up:
                    Sprite.Move(0, -100 * ElapsedTime);
                    break;
                case sf::Keyboard::Down:
                    Sprite.Move(0,  100 * ElapsedTime);
                    break;
                default:
                    break;
->          }
->          break;

->      default:
->          break;
        }


Another hint: 0 and 100 are considered integer numbers from compiler, use 0.f and 100.f instead, 'cause ElapsedTime is a float.

57
General / Re: Custom Icons in SFML?
« on: November 13, 2011, 02:29:38 pm »
Quote from: "Chuckleluck"
Is there a way to change the window icon from the default icon to a custom .ico image on a window created by the sf::RenderWindow class, like you can with a Win32-made window?


You have to create a .rc file and then import it in your project.
This is the code:
Code: [Select]

IDR_APP_ICON ICON "(.ico filename)"
GLUT_ICON ICON "(.ico filename)"

58
General / Using SFML 1.6 under Ubuntu 11.10
« on: November 12, 2011, 10:52:52 pm »
Hi, all! I'd like to compile my games (with SFML 1.6 code) under a linux OS.
I installed Ubuntu 11.10 distro on my laptop and then Code::Blocks.
I downloaded also SFML 1.6 SDK and install it on the system with "sudo make install" command.
I configured the IDE to work with them (linking libs dinamically), but I obtain this error:

Code: [Select]

compiling: main.cpp
/home/ubuntu/Documents/CodeBlocks projects/ProvaLinux/ProvaLinux/main.cpp:1:27: fatal error: /usr/local/include/SFML/System.hpp: Permission denied
compilation terminated.

 
Does someone know how to configure SFML to work under CodeBlocks?
I'm a very beginner with linux OSs. :/

59
SFML projects / SFGUI
« on: November 10, 2011, 07:03:36 pm »
Quote from: "Tank"
Should work now, get the latest commit.


That's a very good news! :D

60
SFML projects / SFGUI
« on: November 10, 2011, 06:25:41 pm »
Here's the code:

Code: [Select]

    // CREATE MAIN WIDGET
sfg::Window::Ptr m_wndmain = sfg::Window::Create();
m_wndmain->SetTitle( L"MENUBAR" );
m_wndmain->SetBorderWidth( 10.f );
m_wndmain->SetStyle( sfg::Window::Style::NoStyle );

// create box main widget
sfg::Box::Ptr m_mainbox = sfg::Box::Create ( sfg::Box::Orientation::Horizontal, 10.f);

// create buttons main widget
sfg::Button::Ptr m_button_select   ( sfg::Button::Create( L"Select"        ) );
sfg::Button::Ptr m_button_draw     ( sfg::Button::Create( L"Draw"          ) );
sfg::Button::Ptr m_button_dijkstra ( sfg::Button::Create( L"Shortest Path" ) );
sfg::Button::Ptr m_button_clarke   ( sfg::Button::Create( L"Clarke&Wright" ) );
sfg::Button::Ptr m_button_load     ( sfg::Button::Create( L"Load project"  ) );
sfg::Button::Ptr m_button_save     ( sfg::Button::Create( L"Save project"  ) );

// append buttons to box
m_mainbox->Pack ( m_button_select );
m_mainbox->Pack ( m_button_draw );
m_mainbox->Pack ( m_button_dijkstra );
m_mainbox->Pack ( m_button_clarke );
m_mainbox->Pack ( m_button_load );
m_mainbox->Pack ( m_button_save );

// append box to widget
m_wndmain->Add(m_mainbox);

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