Hello!
I want to create a function that parses a .txt file which encodes different in-game objects (something like a map).
For example the file'd look like this:
#wall#, 10, 10, 'grasswall.png', rect_collide=true, gravity=true;
&player&, 20, 20, hitpoints=3;
#tile1#, 20, 200, 'brick_tile.png', rect_collide=false, gravity=false;
etc.
So a file which holds all the static objects in the game.
Now I need to add those objects to the 2D game space.
How do I create, say, a static object with collider and given texture from code and
then display it at desired position in the game?
I am making a platformer game with levels created by users.
(I know how to parse my format, but how do i open it and then create
those objects when the game opens?)