BlackGoku36 / Paddy-Editor

2D editor written in Haxe Kha
https://blackgoku36.github.io/Paddy-Editor-Website/
36 stars 4 forks source link

Not sure it's working correctly here? #7

Open nanjizal opened 4 years ago

nanjizal commented 4 years ago

Trace: TypeError: Cannot read property 'get_width' of undefined at Function.paddy_ui_UIAssets.render (:19494:40) at paddy_App.render (:18620:21) at :93:12 at Function.kha_System.render (:3432:3) at kha_SystemImpl.renderCallback (:3574:13) Trace: Error: End before you begin at kha_graphics4_Graphics2.begin (:15967:10) at paddy_App.render (:18525:5) at :93:12 at Function.kha_System.render (:3432:3) at kha_SystemImpl.renderCallback (:3574:13)

I am on mac 10.12.6 though and it's for 10.13. Probably worth creating an example video of using it so that people can replicate setting up a new project so they know it's working correctly.

Worth creating a test project for people to clone from git and open with Paddy as will help you know if there are problems since they can follow a video and be starting with the same as you have so any significant issues will be obvious. At moment I have no idea if it's working correctly as it runs but does not seem to allow me to import or do anything.

nanjizal commented 4 years ago

I don't mind but thought i should feedback did not really get anywhere when I tried but only tried the itch binary.

BlackGoku36 commented 4 years ago

Can you tell me what were you doing when that error occured? Look like it can't find a image.

Worth creating a test project for people to clone from git and open with Paddy Will do Paddy export to absolute path rn, will fix this today Fixed: https://github.com/BlackGoku36/Paddy-Editor/commit/c2210699d41b4cba6daaf2a83bd3dbaadc5fe5f8.

Probably worth creating an example video of using it so that people can replicate setting up a new project so they know it's working correctly. Yup, will do that too.

BlackGoku36 commented 4 years ago

@nanjizal Get latest and try https://github.com/BlackGoku36/Paddy-Editor-Test/tree/master

nanjizal commented 4 years ago

The example does not seem to use Rice2D? I think it would be ideal to have code, sound and font ( you have images ) . I think the api is either not working really well or a bit confusing still, it looks huge with lots of promise. Perhaps hide some features from public and concentrate on making the current ones super easy to use. I looked into Rice2D on github briefly but was not sure how to draw a triangle in 3D with it, and the graphics2 api is not ideal for my current exploration, since it won't give me enough control of texture and gradient.

BlackGoku36 commented 4 years ago

The example does not seem to use Rice2D? I think it would be ideal to have code, sound and font ( you have images )well, because I need to polish rice2d before I release one with nodes.

I think the api is either not working really well or a bit confusing still, it looks huge with lots of promise. Perhaps hide some features from public and concentrate on making the current ones super easy to use. Which api? There aren't much promises rn, it simple editor with nodes.

I looked into Rice2D on github briefly but was not sure how to draw a triangle in 3D with it, and the graphics2 api is not ideal for my current exploration, since it won't give me enough control of texture and gradient. Rice2D uses canvas(which is just structure of g1, g2, g4), this means you should be able to normal kha's 3D drawing. Like create simple window, add object and attach a script to the object and then do:

notifyOnRender(function(g){
// you will get all of g.g1, g.g2, g.g4 here. and that means you can even use shaders with g2
});
nanjizal commented 4 years ago

If Rice2D provided an api that I could target with: https://github.com/nanjizal/flat/blob/master/src/flat/Float32FlatRGBA.hx https://github.com/nanjizal/flat/blob/master/src/flat/Float32FlatTriangle.hx and also control texture corner offsets, perhaps maybe taking inspiration from Iron that uses Integers rather than Floats for shaders.

But graphics2/g2 only provided quad image control and graphics4/g4 was pretty much like using WebGL so neither I consider actually solve 2D, but I am not following recent Kha changes so it may have changed.

Anyway with enhanced 2D support then I could provide a plugin for Paddy with draw commands and svg path data drawing to complement the basic drawing api, I could not see any current support for more complex vectors.

Further my geom library you may find easier than Kha.math it provides operators, supports constraints and is toolkit indifferent, which I think is vital, if it needs more for Physics support or integration I am open to extending and improving.

BlackGoku36 commented 4 years ago

rn I have lot on my plate, will see it later, meanwhile pull requests are welcome! Cool, i will check it out.

melMass commented 4 years ago

I had two issues trying to build from source on mac:

BlackGoku36 commented 4 years ago

@melMass Thanks, fixed it new commits (https://github.com/BlackGoku36/Paddy-Editor/commit/491e7516f6e0741fb7d9625aee91c81b6497ff63, https://github.com/BlackGoku36/Paddy-Editor/commit/11c6d85d399baab6b0ed12449edaf9fc0c2e56cd)