Am I correct writing my own Component code for relative pos, rot, etc or doing unnecessary work?

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
idchlife
Prole
Posts: 1
Joined: Fri Mar 02, 2018 5:20 pm

Am I correct writing my own Component code for relative pos, rot, etc or doing unnecessary work?

Post by idchlife »

Hello! I'm new to love2d and I did not yet find anything specific about component framework at least in terms of graphics (I don't quiet understand yet lovetoys but as I see - it's more for structuring application and components and not for "component.add_component; component.rotate(39) - which will also rotate children")

Am I doing redundant work or everyone writing libraries/frameworks for theirs projects?

Thanks for answers in advance!
User avatar
jojomickymack
Prole
Posts: 45
Joined: Tue Dec 26, 2017 4:52 pm

Re: Am I correct writing my own Component code for relative pos, rot, etc or doing unnecessary work?

Post by jojomickymack »

I'm having trouble visualizing what you're trying to create. Generally speaking, you don't want to start a game by implementing an ECS before getting something on screen. Depending on what you're ultimately trying to do it might be best done without that design overhead. I personally add that in a refactoring step only after deciding that there are enough components to make it worth the trouble.

That being said, the best frameworks for that are really lightweight, I like this one.

https://love2d.org/wiki/tiny-ecs

if you check the docs here, you can see positional coordinates in an example.

http://bakpakin.github.io/tiny-ecs/doc/
Post Reply

Who is online

Users browsing this forum: Bing [Bot], Google [Bot], srg and 32 guests