EvergineTeam / Feedback

Feedback, feature requests, and bug reports for Evergine.
https://evergine.com
14 stars 1 forks source link

Basic docu for code-based entrance #50

Closed FrankBusch68 closed 2 years ago

FrankBusch68 commented 3 years ago

Hi, I want to use WaveEngine without UI-Editor, but just from Code-Side. So I am looking for a point to start at to get into this.

I found the example at https://github.com/WaveEngine/LowLevelAPIDemo. This might be a good idea, but what I need to start is a lot more basic...

Something like: Everything is black. We add a light. Then put s single unrepeated jpg on the ground (including steps to transfer it into a usable format). Now add a camera at some point, looking to another point with a viewangle of... Move the camera (position, point-of-view, viewangle) best driven by time and(!) cursor-keys. Next step: Add a sphere to this scene and move it around. Next step: Add two or three basic things like a cube and a cylinder to the scene. Next step: modify the objects (color, size, form, transparency, glance, maybe even texture). Next step: Maybe add some sky to make the scene look better Next steps could be (but are maybe a later version) §D-objects, more texture and some physics...

After these simple first steps I would be able to really start reading the API and/or documentation because I got the basic concepts and known what all the text really tells me.

Is it possible to get somthing like this?

Sorry, forgot to say thanks in advance Frank
davilovick commented 3 years ago

Hi Frank,

One thing that we need to work in the future is to develop better documentation of Wave development. Meanwhile, sorry for the inconveniences.

In WaveEngine, you can develop your application whitout using the Wave Editor. However is more easy to manage your assets, profiles, etc...

In that case, I reconmend you to create a Wave Project from Wave Editor, and then, open the solution in Visual Studio. By default, when you run the application.. it launchs a scene defined in a Scene asset in Wave Editor (MyScebe.wescene file). But you could avoid that step:

If you have completed the previous steps, you will see a blank screen, because the scene cannot contains any entity :)

In the following pastebin: https://pastebin.com/rFuLtCe7, you can find a replacement of the MyScene.cs file, which I've included several entities and comments to help in your purposes :)

I hope that this code helps you to undestand how Wave Engine works

Best regards, David Ávila

FrankBusch68 commented 3 years ago

Thanks so far, I will give it a try Frank

FrankBusch68 commented 3 years ago

That worked so far.

Now I have the next problems. I want to add a sphere rolling around. Adding a sphere with addComponent(new sphere(1,1)) brings a error because a sphere is no component? WaveEngine.COMPONENTS.Primitives is no component?

Then I tried to move the camera. Finding the Transform3D in the Cam and changing position does not change anything. Dropping the cam an creating a new one works in step-by-step debug, but crashes when removing the breakpoint. A spinner (just a try) has no effect. I have no clue how animations are handled and whether they would do anything in here...

I think this Framework has great capabilities, but I don't get the point to really get it running.

When looking into the API this is a reference, OK. But it does not explain anything.

FrankBusch68 commented 3 years ago

By the way... I use WaveEngine 3.1 Preview 2

davilovick commented 3 years ago

Hi Frank, In WaveEngine, we have components that generate meshes (for example, the PlaneMesh component that I used in the pastebin).

If you want to move the Camera entity, is correct to get the Transform3D component and change the position: cameraEntity.FindComponent<Transform3D>().LocalPosition = newPosition If that is not working, try to check if the chosen entity is correct camera Entity.

PD: You are correct that we need to put a lot of effort to improve the documentation, and We hope to go better in that aspect in the future :)