Re: sfml framework
Posted: June 10th, 2017, 6:30 am
Hi there,
worked a bit on the next chapters of the book, which transform the snake game into a classic sidescroller like mario. It took me some time to understand most stuff used in those, but i made it running, after fixing some bugs(you can see some in the commit history).
New features implemented:
+ game map class
- using a map <idMap, pointer<tile>> //the actual map with a reference to the tile the id is holding
- using a set <idSet, pointer<tileInfo>> //set of all possible tiles/segments of a map
- the 1d idMap is converted into 2d (x,y) coordinates
- the gamemap is loaded from file and provides a warp tile to get into the next gamemap
- there are deadly tiles as well - if entities collide with them they die
+ entity manager (with entity base -> character -> player|enemy)
- handles entity construction, destruction and collisions (with gamemap and between entities)
- player and enemies have hp and can kill each other with a little knockback animation for succesfull hits
I not deviated much from the way the author solved the problems to create a 2d sidescroller so far.
It looks the like:
Now iam wondering what to do next. I could goon with the next chapters, modify the sidescroller to another game to consolidate the new learned stuff and to prove if im not only monkey see monkey do like copied the stuff or i could start to create a new project in the chili framework reinventing the whole stuff i made about with a minumum of peeking in the book.
The next chapters are about transforming the sidescroller in a classic 2d roleplay game with orthographic projection using the entity–component–system pattern.
https://en.wikipedia.org/wiki/Entity%E2 ... 0%93system
http://gameprogrammingpatterns.com/component.html
What do u guys recommend?
worked a bit on the next chapters of the book, which transform the snake game into a classic sidescroller like mario. It took me some time to understand most stuff used in those, but i made it running, after fixing some bugs(you can see some in the commit history).
New features implemented:
+ game map class
- using a map <idMap, pointer<tile>> //the actual map with a reference to the tile the id is holding
- using a set <idSet, pointer<tileInfo>> //set of all possible tiles/segments of a map
- the 1d idMap is converted into 2d (x,y) coordinates
- the gamemap is loaded from file and provides a warp tile to get into the next gamemap
- there are deadly tiles as well - if entities collide with them they die
+ entity manager (with entity base -> character -> player|enemy)
- handles entity construction, destruction and collisions (with gamemap and between entities)
- player and enemies have hp and can kill each other with a little knockback animation for succesfull hits
I not deviated much from the way the author solved the problems to create a 2d sidescroller so far.
It looks the like:
Now iam wondering what to do next. I could goon with the next chapters, modify the sidescroller to another game to consolidate the new learned stuff and to prove if im not only monkey see monkey do like copied the stuff or i could start to create a new project in the chili framework reinventing the whole stuff i made about with a minumum of peeking in the book.
The next chapters are about transforming the sidescroller in a classic 2d roleplay game with orthographic projection using the entity–component–system pattern.
https://en.wikipedia.org/wiki/Entity%E2 ... 0%93system
http://gameprogrammingpatterns.com/component.html
What do u guys recommend?