unknown-horizons / godot-port

Unknown Horizons Godot Engine Port
https://www.unknown-horizons.org
GNU General Public License v2.0
665 stars 83 forks source link

Object animation/rotation. #24

Open Beliar83 opened 5 years ago

Beliar83 commented 5 years ago

The current gfx of UH were made for a purely 2D engine. The animations are splitted into 4 (buildings) and 8 (units) directions respectively. The engine would take care of using the correct direction path for the given rotation of an object.

We need to find a way to either use the current prerendered images with godot or, since we have the original blender files available, reexport the graphics in a way that they are better usable with godot.

For the first we need to either find or make a class/script that can calculate the image to be used for any given angle.

For the second we would need to evaluate what we can actually do with the current blender files.

aaronfranke commented 5 years ago

I'm personally a fan of 3D, but that's up to @LinuxDonald

LinuxDonald commented 5 years ago

The game is made in 2.5D i think we should do it again in 2.5D because of the look and feel.

Beliar83 commented 5 years ago

Well, the game logic can still be 2.5D. But it does not matter for me.

LinuxDonald commented 5 years ago

Would it make an visible difference when we would do the graphics in 3D?

Beliar83 commented 5 years ago

Well, if we use the same assets it should not. It makes it easier to have things rotated in our case, for example, though.

There are advantages to both 2D and 3D, but it's not really something that I know in enough detail to explain.

The main thing is that we need to decide what to use, and how.

LinuxDonald commented 5 years ago

3D would be easier because of graphics. On 2D we would need a lot of files or Atlas for each animation/building and so on.

LinuxDonald commented 5 years ago

@SubSage what do you think about this?

jmdejong commented 5 years ago

There's also https://github.com/unknown-horizons/unknown-horizons/issues/2814

Using 3d models could solve this, though very fancy 2d could do that too.

Do we have 3d models of all assets? I thought there were a few that we only had in 2d.

nihathrael commented 5 years ago

I think all the ground tiles are handmade sprites iirc.

aaronfranke commented 5 years ago

Yes, using 3D models would completely solve that problem. We can use 3D even if some things are just "billboards" i.e. 2D objects always facing the camera. Buildings and ships should probably be full 3D objects but it should be fine if characters or terrain have no depth.

LinuxDonald commented 5 years ago

@nihathrael have you maybe discord? I could need for help about code questions and UH.

Beliar83 commented 5 years ago

Yeah, tiles would not be the problem.

nitramr commented 5 years ago

Hey, I made a quick test for usage of 3D models.

bildschirmfoto von 2019-02-03 18-27-29

Models are quiet good in resolution, but the material needs much more effort to prepare as you can see in the image. Godot works well with Collada files. It is recommended to use a special exporter in Blender. See that link below. https://godotengine.org/article/importing-3d-assets-blender-gamedevtv

To get shadows in the model I set an extra sun light object to the world scene.

Jummit commented 5 years ago

I think a pixelation shader plus 3d models would make it feel like the original, but make rotation easier.

brylie commented 5 years ago

I am available to help with 3D models, where they are lacking. Is there a tracker task for porting all 2.5D models to 3D?

I would really like to see this game in 3D, with free rotating camera controlled by mouse :-)

aaronfranke commented 5 years ago

@brylie We can make a tracker if we have progress to put on it.

brylie commented 5 years ago

Sure. A list of items to be ported to 3D would be a good start, or at least a pointer to an assets folder containing the items. Then we can divide the work.