SFML community forums
Help => Graphics => Topic started by: fedot89 on November 15, 2010, 09:48:30 am
-
Hello! Someone can help me whit my litle program?
I started to create a program to be like this: http://www.youtube.com/watch?v=fRjChmzVo5s&feature=related
My first code's in SFML are:
////////////////////////////////////////////////////////////
// Headers
////////////////////////////////////////////////////////////
#include <SFML/Graphics.hpp>
#include <iostream>
////////////////////////////////////////////////////////////
/// Entry point of application
///
/// \return Application exit code
///
////////////////////////////////////////////////////////////
int main()
{
// Create main window
sf::RenderWindow App(sf::VideoMode(800, 600), "Fortune");
// Start game loop
while (App.IsOpened())
{
// Process events
sf::Event Event;
while (App.GetEvent(Event))
{
// Close window : exit
if (Event.Type == sf::Event::Closed)
App.Close();
}
// Clear screen
App.Clear();
// Draw predefined shapes
App.Draw(sf::Shape::Circle(50, 50, 25, sf::Color::Yellow, 10));
// Build a custom convex shape
// Finally, display the rendered frame on screen
App.Display();
}
return EXIT_SUCCESS;
}
I insert the first circle but i need 79 numbers more :D .
-
So ? Read tutorial on loop and array to continue your project. Don't rush into huge project before having basic skills in programing. You should start by focusing on smaller project outside of SFML.