I always wanted to create a good game, but i have no idea for that, so i trying to create a tool which make creating 3D games (very simple, because AFAIK it will be SLOW AS HELL, maybe even slower) in construct possible for people who have ideas.And now i have this tool working, its called PFX (PolygonFX :D),but for some reason it's not working properly.I have problem with giving sprite a position, it will be better when i give you an example file.

i have no ideas, you can see what is wrong when you type a command "3,-128,-32,128,128,-32,128,128,-32,-128,-128,-32,-128" which creates one polygon, sprite were created, but i dont know why it's not getting a calculated position for it.

In engine are done simple management which allow u to create a polygon with this scheme:3,x1,y1,z1,...,x4,y4,z4,Where "3" is a command and rest:Xn, Yn, Zn ( n - in distort map it will be 0, 0 (column, row) for 10, 1 for 21, 1 for 31, 0 for 4.

It will be very helpful if you tell me how to fix it, maths are good (copied from wikipedia :D), propably there are some bugs in camera rotation but i can fix it, but i dont know construct that good to fix this sprite (or something else) problem :( .Satelita2011-12-12 18:04:28

you're not explaining what the supposed behaviour is, but expect us to "fix it".

Arrays are also extremely slow in construct for stuff like this.

I highly doubt your implementation of the math is good if its not behaving as you expect. you'll need to look everywhere and try to find suspect areas. It's unreadable to anyone else but you as things are. i think your biggest problem is with the create/destroy every frame ,perhaps, not giving the distort map time to intialize. Honestly i could be completely wrong. good luck nonetheless :D

ok, my bad.in begining of every frame all sprites are destroyed, next they were created in amount of polygons quantity and distort map size were setted, in next step engine calculates position for it basing on information about their location stored in array, after that it should give every sprite it's position, and everything working fine to that step...As you said ",perhaps, not giving the distort map time to intialize."so i thiked about it and i maybe you gave me an idea, i will try to keep sprites "alive" as long as they will be needed, they won't be destroyed in the beginning of every frame, i'll post results.

And to get this same object instances id i should use UniqueID or objectID?Satelita2011-12-13 18:04:32