-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
V0.1.0 - First working demo with cleaned up code #2
The head ref may contain hidden characters: "a_new_beginning_\u2728"
Conversation
…bUpdate Hitbox and Collision: libs, typos, convention OK | checkCollisionEntities TODO updated to new hitboxes collision feature to be finished by gregory, missing singleCheckCollision libs OK, parameters and return type OK, missing PhysicalEntity.getForces implementation hitbox / readme more reasonable hitbox / readme mise en page hitbox / readme dernière mise en page en théorie
@gbrivady
so once the thread above is resolved, i'll be more than happy to approve your changes and this PR 😤 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
with all the threads i've opened now resolved and as i checked all the commits, this PR is ready for me 💪 🚀
@gbrivady a HUGE thanks ❤️ for your workI think I'll not mistaken saying that without you this project would have never rose again! And that you accomplished exactly what it needed: a clean modular basis on which to build together. |
Why is it still a
not sure I agree with this 🤔 according to WordReference 'Physic' means 'medicine/drugs' and 'Physical' means physique (charnel/corporel) (in French) then I think 'Physics' is the appropriate term and we should use it Also, I think amtoine didn't ask to remove the many empty lines in the As for the other threads and points @amtoine arose I agree with them all so tks to both of you! Personally I found the README quite explicit but as discussed in #13 we'll be able to improve it sooner or later 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some questions, but of course I didn't review all of it 😕 and I clearly lack knowledge of Cpp and cmake.
However I can't wait for your presentation of the project!
PS: should you really use classic pointers in cpp?
no no that's been addressed, i just left the comment as-is 😉
👍
i do not see empty lines in the |
Is Physic wrong? Yes. Keep in mind that we are talking about the component of the entity that make it obey the laws of Physics (as submodule of the engine which has already been renamed accordingly). so when we are talking about the component, Physical is I believe the right term. Now, I did not changed it because it is a pretty tedious change, but if you agree with this, and this you are both bothered by it (- and me too tbh) I will probably rename it accordingly too. |
The directory is correct, as it refers to the subsystem (ie the physics) |
ok i see imo, the problem with
ideas
that's what comes to my mind as for now 😌 |
How about |
mm |
I think I will go with
Also mentionning to answer this : absolutly not, will do a full patch (0.1.1) after the PR to replace everything with smart pointers to fix all the leaks |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
two things:
- the renaming of the files is fine 👌
- i do not like the change about
// in include/engine/box/box.h
typedef std::pair<double, double> point;
and
// in include/engine/physics/point.h
class Point
it looks to me like there should be only a single "point" type, but still keep the typedef
to make include/engine/box/box.h
easier to read 🤔
To be clear: I also believe it should be the case, but I will go more in depth on why I removed it (tldr at the end): Three identifiers are named some variation of
(1 or 3) and 2 are not ambiguous : the case is not the same, but 1 are and 3 are, and since I saw three way to fix it:
I chose not to go with 1, to keep coherence within 3 is obviously the way to go, and definitely the long term target: use namespaces for every module, to make sure there is not naming ambiguity. Obviously did not go with that, because it is a pretty tedious change, and I believe we should do it incrementally until everything is namespaced (issue planned to keep track of what is namespaced/not namespaced); Since 2 is the easiest and quickest fix, and the box-subsystem is not too complex yet, I preferred to go with that. To be clear, there is probably another solution (for example don't use a constructor that relies on the point type in Entity), but once again, the goal is to merge this first, then fix, so yeah. TLDR: while we wait for everything to use namespaces, it was the easiest way to fix a naming conflict. Edit : I can always re-add with a proto-namespace (ie something like box_point) if you really think we should keep it while waiting for namespaces |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gbrivady, thanks for the explaination 😋
that's fine with me if it's planned in the future 😌
EDIT: and the source still compiles with the two last commits, so that's perfect 👌
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Everything's fine to me, let's merge it!
…ts (#16) This PR should close #6. Requires - #2 to be merged --- This PR adds a slightly modified default action from _GitHub_ for `CMake`-based projects 👍 I did run the pipeline on my personal fork, which resulted in [this action log](https://github.com/amtoine/wiresmash/actions/runs/3670185074/jobs/6204543791) on the tip of the branch of #2 👍 this means that the tests will pass when the PR is ready 💪 ## NOTES - this pipeline won't work on `windows` hence the single `ubuntu-latest` in the matrix of OSes 🤔 - i've let the comments from the default configuration file, just for reference 👍 - there are not tests to run, so they pass 👌
EDIT : no need to check memory leaks, will be adressed separaretly
The PR to start anew on a cleaner basis, finally!
Main goal of after the PR is to scale the project, add new nembers to the team, and start working on funnier stuff ✨
Lot of work still left to do, and some pretty ugly code/tape still running in some places; but should be mostly okay to build on.
Two aspects need to be adressed: a technical one, to make sure the code is ready to be merged, and a more subjective one, as we should use this milestone to check that the conception is going in the right direction.
If you only want to make sure everything is working, simply go throught the Technical section. If you want to know more about how everything works, read everything. Everyone read the last words tho!
Project structure
Headers file are in the include folder, source code in src. CMake files are recursive to each folder to prepare for the complexity of the project structure. Executables are built to the bin folder - not included in the git repository.
Game, Engine, Graphics, Others
I have tried to separate source files in three big folder. The goal is to split as much as possible each "main system", so we have the option in the long term to create independant projects and reuse separate components on other projects.
Engine
Should contain most of the generic, engine-type stuff. A lot of virtual classes, the physic engine, and most of the internal logic of the project.
Game
Everything that will be game-specific, ie game characters, Entity class implementations, components implementations, ...
The dev folder give the "spirit" of what should go there.
Graphics
Not to be a focus for quite some time! Everything fancy that will be required down the road, including f.e. texture loading, more advanced displaying, maybe particles, ...
Others
Currently only keybind loading. But we should probably put there saving, preferences, options loading as a whole, etc...
Technical
The following technical things need to be checked before we proceed with the project:
I believe items in bold are the minimal requirement to accept the PR, the rest is "somewhat" secondary.
Some precision on code clarity and "cleanliness": everything that has a TODO attached is not meant to be adressed with this PR. We can still discuss it ofc, but they will be adressed afterwards as issues, for the following reasons:
Conception
On a more subjective point, we should take some time to discuss whether or not the project is flexible enough to be build on.
This will require a lot of discussion (that we will keep out of this PR, unless you see an obvious flaw that can be fixed), but it would be nice if everyone could think a little bit about this while reviewing the code.
To help with this, I have attached an elided UML of the current state of the project at the end of the PR.
I try here to brief on all the subsystems.
Graphics/Display
Prettry straighforward. Straight pipe between the engine and the SFML library
Box
System that will handle intersection of shapes. Currently used for collisions, soon to be used for the combat system (hitboxes and hurtboxes f.e.). Only implements rectangles as making several shapes interacts is a big headache, and is not exactly required as of today.
Physics
Contains a simple gravity to make objects fall; and a not so simple subsyste,
Input
Simply translates keys to entity movements. Very very basic, lacks a lot of stuff including a jump subsystem, proper buffering of input, animations, etc...
Universe Master
I think this is the strongest point of the conception. I believe the code illustrates by itself the beauty and simplicity of addind/removing/updating component to the game.
Entity
Keystone of our Entity-Component-System, yet I fear it is already outdated. Please pay attention to this class in particular and think about way to further separate the entities and the components that I find currently too linked.
UML diagram
Not complete, lacks a LOT of methods, attributes, access control...
Last words
Quite some work done, but more to come!
Thanks everyone for thrusting me with the project cleanup, and sorry it took so much time to get there
But I believe the "fil rouge" will finally start for real, 1 year after we quicklaunched it!
Very lenghty PR, but I think it is coherent with the amount of modifications. If I forgot something, or you want to do some remark on the PR (content, form, ...) don't hesitate to do so.