67e4b3700b
Fixed oscillating around end position
2019-06-10 19:14:43 +02:00
bf27bbeeb9
Fixed movement of multiple entities.
...
Changed std::unique_ptr<Entity> to std::shared_ptr<Entity>.
Fixed pathfinding away from targets
TODO :
- Fix oscillation around destination
- Fix fleeing from adjacent target
- Win conditions
- GUI
2019-06-10 18:46:37 +02:00
5169948b6f
Fixed Rule::findTarget() not finding good or even valid targets
2019-06-10 16:04:12 +02:00
4d5be1744f
Rules are not template anymore (it was dumb)
...
Entities are now managed with unique_ptr to allow polymorphism (and good memory management)
Rules can be added via the Level object
Fixed Rule::findTarget not caring about targetType
TODO : Find why pathfinding (unlikely) or findTarget (most likely) is broken
2019-06-10 04:04:03 +02:00
3e48c50002
Fixed pathfinding for usage with Rule::findTarget()
...
Fixed Entity::target being public
2019-06-10 01:58:14 +02:00
74947ed59c
First implementation of rules
...
TODO :
- Fix target as getter (currently broken because of inheritance by rules)
- Smart pointers for entity store ?
2019-06-09 23:26:46 +02:00
3459157921
Fixed x,y in Entity constructor not being pro_maat::GridUnit
2019-06-09 15:56:54 +02:00
d8e650dea1
Cleaning some warnings
2019-06-09 14:59:17 +02:00
612fe95860
Keeping track of progression
2019-06-09 05:39:16 +02:00
58757fb6d8
A* working : previousNode was initialized with one step instead of none.
2019-06-09 05:37:08 +02:00
4b39ac42fd
A* implementation
...
Working except for end of path endless loop (0,0 point appearing in paths for no reason?)
Commit mainly because the HDD is on the verge of dying
2019-06-09 05:18:28 +02:00
e0443585d0
Fixed target initialization still using sf::Vector2i
...
Forgot to move manhattanDistance to .cpp
2019-06-08 17:08:15 +02:00
633fda8336
Added type alias for std::pair<uint8_t,uint8_t> for grid coordinates as sf::Vector2 cannot be used in std::map or std::set
2019-06-08 16:11:29 +02:00
430d2b0307
Added representation of occupied squares and a way to retrieve them for A* implementation
...
Updated UML
2019-06-08 02:32:06 +02:00
115af7dcc7
Moved the clock check outside of the event loop
...
It caused the game to update only if events were received (Mouse movement, button press, etc)
2019-06-08 01:54:58 +02:00
220a9a6f48
Level updates are now triggered at timed intervals
2019-06-08 01:14:52 +02:00
86490f3ff4
Implemented move function for entities
...
Does not consider speed (TODO ?)
2019-06-07 22:38:55 +02:00
06841915f0
Entities are now constructable
...
Added utility function to display error window
Added textures
Added font
Added a way to choose resources location
2019-06-07 22:20:34 +02:00
a775d846d7
Started object construction and parsing
...
Simplified some structures
Missing : Entity construction
2019-06-07 02:59:27 +02:00
3906ecd27b
Class structure, updated UML
...
Missing : actual code, decorators
2019-06-06 21:30:39 +02:00
736eaac94c
Project structure and UML first draft
2019-06-06 17:07:24 +02:00
fc26d7ff41
Repository initialization
2019-06-06 13:47:07 +02:00