Hi everyone, first question in this forum, I hope I’m not making a too much dumb question!
So, I’m making a puzzle game, where I’ll have to create a path with the help of cubes for a cat to climb and reach a paper-box, to be able to go to the next level.
Those coloured cubes have weight, resistance to fall and a max load weight.
There will be teleport, platforms and doors to open with triggers (triggers on the floor, also coloured, activated when putting a same-coloured cube on them)
For now I’m having all the behaviours running well for moves, fall, stack/parenting and teleportation.
My doubt is about organising it all.
For now I have all my logic in the cubes BP.
For example, when leaving a place, I check from where the cube is going, and if it goes out of another cube, I update all the stack that it’s leaving. If it goes out of a teleport, I check if the next move (using ASTAR pathfinding here) is also a paired teleport and teleport, etc.
Same for arriving to a new tile: is it a cube? Am I falling? etc.
Now that it’s all done and working is a good time to stop, think, and decide if I shouldn’t redo everything to split the mechanisms (being ironic here, I was dumb enough to not think about that sooner…)
If the cube arrives on a teleport and will be teleported, I could send a message to the teleport and leave it makes the teleportation process).
(Note: everything is child of a parent class for my astar system.)
I was thinking I could implement interface perhaps, and send message from my active cube to the places it leaves and arrives, that kind of things…
Sorry, enough for now as it’s getting long and I am conscious it’s not the most appealing subject!
Could I get some opinions about this? As it is working, should I just continue, or perhaps not because it is working but because there is no advantages splitting the mechanisms in different places, or all the way around, should I stop now and take care of splitting each “thing” in it’s relative BP?
Sorry, my English as it appears clearly is not good, I hope it was understandable…!
thanks for whoever read all that, and thanks twice for whoever find time to answer my doubts!
Cheers,
François.