This project is a simple C++ application that reads shape data from a text file and displays the shapes moving around the window.
To run this project, you need to have SFML installed on your machine and a c++ compiler.
- Compile the
main.cppfile. - Create a
shapes.txtfile with the shape data. Each shape should be defined as follows:
ShapeTypeis eitherCircleorRectangle.Dimensionsis the radius for circles or the width and height for rectangles.Positionis the initial x and y positions of the shape.Speedis the x and y speeds of the shape. These determine the direction and speed at which the shape moves.Coloris the RGB color values for the shape.
Here's an example of a shapes.txt file:
Circle 50 100 100 0.1 0.1 255 0 0 Rectangle 100 50 200 200 0.1 -0.1 0 255 0 Circle 75 300 300 -0.1 0.1 0 0 255 Rectangle 150 75 400 400 -0.1 -0.1 255 255 255
- Run the compiled application.