CodinGame / codingame-game-engine

CodinGame Engine
https://www.codingame.com
MIT License
110 stars 41 forks source link

Added a camera module #41

Closed Butanium closed 2 years ago

Butanium commented 2 years ago

Hello,

I created a camera module for my own project and thought it could be useful for other creators. I included a playground to present the module.

Here is a sneak pic of what it can be used for.

Let me know if things are missing to make it available or if it needs to be refactored a bit.

CGjupoulton commented 2 years ago

Initial thought: I think this module is great, a lot of work has clearly been put into this! However, including it directly in the com.codingame.gameengine group labels it as a CG creation, but we shouldn't be taking credit for the work.

I would like to know if there is a was a way we could feature this module prominently, in the doc maybe, but it still be tied to the name of its true creator(s).

Butanium commented 2 years ago

Maybe you could add a "community modules" directory, in which you could add modules created by the community.

CGjupoulton commented 2 years ago

@Butanium have you checked this module works with the latest version of the SDK? (4.1.2)

Butanium commented 2 years ago

@CGjupoulton I used the pom.xml from the game-skeleton. How can I switch to the latest version ?

CGjupoulton commented 2 years ago

@Butanium in the pom.xml of your game that uses the camera module, replace the line

<gamengine.version>3.15.0</gamengine.version>

with

<gamengine.version>4.1.2</gamengine.version>

and see if the module still functions (you might have to delete demo.js if you have one in your repo in order for the upgrade to work)

Butanium commented 2 years ago

Ok changing version broke my game graphics but the camera module still works. EDIT : It broke the game graphics because Z index are not automatic any more : In 3.15 a child was always over it's parent. Now it's fixed. image