Rojo3d. 3D engine for Construct 2

3 favourites
From the Asset Store
Casino? money? who knows? but the target is the same!
  • R0J0hound is there a way for you to help me with getting textures to work? I tried to get a texture from a sprite and put it on a 3D object, but I just get errors or it doesn't show up

    Sup! Welcome aboard! Excuse me, if you allow me...

    I tried loading a texture from a sprite before and it didn't seem to work too, but you can also load texture from

    1) - Png images on project folder or...

    2) - Using the Paster Plugin

  • megatronx

    Sorry, I'd avoiding any aspect of making plugins and I'm not a fan of debugging ai generated stuff.

    megamente Br

    Alexander Wiseman

    I haven't used this plugin in months but I tried it and it works here. You'd load the texture to a tag, say "tex" then set the object's texture to that tag. As long as your mesh uv's are good then it should show the texture.

  • Also, Merry Christmas Everybody!! :D

    Update (Thanks God! I was able to somehow sum different light colors... I don't even know it is working, I guess I'll just follow the first code rule: "If it is working, don't touch it!")

  • megatronx

    Sorry, I'd avoiding any aspect of making plugins and I'm not a fan of debugging ai generated stuff.

    megamente Br

    Alexander Wiseman

    I haven't used this plugin in months but I tried it and it works here. You'd load the texture to a tag, say "tex" then set the object's texture to that tag. As long as your mesh uv's are good then it should show the texture.

    The textures still won't show on by objects.

    Here is the capx:

    mediafire.com/file/80xfg39nn35vltz/3Dte.capx/file

  • megatronx

    Sorry, I'd avoiding any aspect of making plugins and I'm not a fan of debugging ai generated stuff.

    megamente Br

    Alexander Wiseman

    I haven't used this plugin in months but I tried it and it works here. You'd load the texture to a tag, say "tex" then set the object's texture to that tag. As long as your mesh uv's are good then it should show the texture.

    No problemo.

  • The textures still won't show on by objects.

    Here is the capx:

    https://www.mediafire.com/file/80xfg39nn35vltz/3Dte.capx/file

    Now I am away from my computer, but it should look something like this:

    'tqw@' = Condition

    '$' = Event

    "" = Inside the Rojo Code it means the 3D world (set almost everything you do with this and might work)

    @ On Start of Layout

    @@ Blank

    $$ Rojo3D: Load [sprite] as [meshtexture]

    $$ Rojo3D: Load [mesh url] as [meshtag]

    @@ Blank

    $$ Rojo3D: Create [meshtag] relative to: [""]

    $$ Rojo3D: Set [meshtag] pos X Y Z

    $$ Rojo3D: Set [meshtag]Scale X Y Z

    $$ Rojo3D: Set [meshtag] Color 1 1 1 1

    $$ Rojo3D: Set [meshtag] texture as [meshtexture]

  • MegaMente Br I see you have 38fps. Can you give me details of your project: nwjs or chrome, something else? your specs? Resolution? Number of objects? Thanks

  • R0J0hound Re Paster, I can't figure out how to paste object on the the paster canvas without paster object being placed exactly above the sprite. Is this the only way, or there's some other option? Tried quads but quads don't paste glfx.

  • MegaMente Br I see you have 38fps. Can you give me details of your project: nwjs or chrome, something else? your specs? Resolution? Number of objects? Thanks

    Yep, on the last image, I got 38 fps before some optimizations, now I am getting about 40-46 fps.

    - I have in total 106 of those 'MeshLoaders' and 4 of them are lights, 1 is a continuous animated mesh (piston), and 1 is a 3D text, 2 of them are entities (with 3d anti-overlapping) and finally 1 that is a Ghost Block to prevent placing a block where a entity is standing.

    - Currently I am using Google Chrome.

    - I am playing with aspect ratio of 16:9 (1280x720) (unfortunately I wasn't able to use other screen sizes or the game screen would be stretched)

    - If I do remember correctly it's in total 136 objects.

    - All the 'MeshLoaders' have by default size of 16x16 on Construct 2 Editor.

    - The big equipment on my screen is just a 2D image on the normal screen with 2 Sine behaviors.

    - And finally a raycast with 4.5 blocks (1 block =16x16) radius with 288 steps in total every 1/24 seconds.

    Edit: I forgot to say... Also, the 'player' is using Construct 2 physics as collision. I am planning to change that but will be very far in the future.

    + I can push the other entity (blue box) over other box and it have collisions to detect if it is nearby/overlapping a block when beeing push and 'jump' to be over it.

    Edit 02: I forgot to say again... From the 'MeshLoaders' I have 4 which is in a constant loop (using sine behavior values) playing PreBuilt Animations

    1: (Floating; RotationZ; StretchZ)

    2: (RotationX)

    3: (RotationY)

    4: (Floating)

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • R0J0hound Re Paster, I can't figure out how to paste object on the the paster canvas without paster object being placed exactly above the sprite. Is this the only way, or there's some other option? Tried quads but quads don't paste glfx.

    sorry to intrude again... Why placing paster over a sprite is being a problem?

  • > R0J0hound Re Paster, I can't figure out how to paste object on the the paster canvas without paster object being placed exactly above the sprite. Is this the only way, or there's some other option? Tried quads but quads don't paste glfx.

    sorry to intrude again... Why placing paster over a sprite is being a problem?

    Firstly, what specs do you have? Secondly, that still quite low performance for only 138 objects. you must be doing too many things at once. And instead of every second condition, it's better to create tick counter and use that, ie every frame tikCounter=(tikCounter+1)%10 . Once it will get to 10 it will instantly become 0 and counting starts again. And then you just create conditions if tikCounter = 0,1,2... etc and do events. It's much more precise then every second and you can plan updates much better.

    With paster I noticed that when pasting in to a quad it doesn't copy the fx. When just pasting it copies only one effect. But also, there's resolution which actually has to be high in order to paste the image faithfully. Oh well, will continue with what I have.

    Edit@ Here, this is a collision system made by ROOJ long time ago, but it's surprisingly versatile and light. Thanks ROOJ! With this system you can disable collision of your sprites, create more efficient way of picking which objects you want to check collisions with.

    You need to have player sprite and box colliders in one family and do PICK NEAREST, FOR EACH PICKED, or keep boxes/3dobjects id's you can create when spawning objects and put them in array if you are not using sprites, and then check distance against them. But example shows how to do it with sprites. If i remember well ax and ay is object's position from family "t". Creating your own basic movement system is also very easy. The advantage of that is that you can create it specifically for 3D while thinking in 2D.

    Also, I'm not sure if your game is like minecraft and it needs all those boxes to be separate objects. Because if you have some static elements, then it is much better to create them using verts inside the plugin and to keep track of them just use tilemap with variables Z.

  • megatronx

    That’s how the pasting was made to work. It’s just drawn in place where the object overlaps the paster object. Hence the stamp icon.

    The quad draw function wasn’t meant to use an object’s effects, only its texture.

  • > > R0J0hound Re Paster, I can't figure out how to paste object on the the paster canvas without paster object being placed exactly above the sprite. Is this the only way, or there's some other option? Tried quads but quads don't paste glfx.

    >

    >

    > sorry to intrude again... Why placing paster over a sprite is being a problem?

    Firstly, what specs do you have? Secondly, that still quite low performance for only 138 objects. you must be doing too many things at once. And instead of every second condition, it's better to create tick counter and use that, ie every frame tikCounter=(tikCounter+1)%10 . Once it will get to 10 it will instantly become 0 and counting starts again. And then you just create conditions if tikCounter = 0,1,2... etc and do events. It's much more precise then every second and you can plan updates much better.

    With paster I noticed that when pasting in to a quad it doesn't copy the fx. When just pasting it copies only one effect. But also, there's resolution which actually has to be high in order to paste the image faithfully. Oh well, will continue with what I have.

    Edit@ Here, this is a collision system made by ROOJ long time ago, but it's surprisingly versatile and light. Thanks ROOJ! With this system you can disable collision of your sprites, create more efficient way of picking which objects you want to check collisions with.

    You need to have player sprite and box colliders in one family and do PICK NEAREST, FOR EACH PICKED, or keep boxes/3dobjects id's you can create when spawning objects and put them in array if you are not using sprites, and then check distance against them. But example shows how to do it with sprites. If i remember well ax and ay is object's position from family "t". Creating your own basic movement system is also very easy. The advantage of that is that you can create it specifically for 3D while thinking in 2D.

    Also, I'm not sure if your game is like minecraft and it needs all those boxes to be separate objects. Because if you have some static elements, then it is much better to create them using verts inside the plugin and to keep track of them just use tilemap with variables Z.

    I saw some videos of 'recreating Minecraft' on YouTube and they talked about it... But to be honest I cannot imagine the solution on how to do it. Also, I think if I do this way the project my not be able to support lights? I mean every block have it's on info (light RGB, pos, behaviors) and I wouldn't be able to use the 'prebuilt' animations (rotation, scale and moving)

    I think I was getting about 1000 collisions checks per second lol. I think it was the physics behavior and all those objects is set to immovable, so I think they might be always colliding or something 😂

    Again I am away from my PC, but I remember only these:

    Specs:

    - it's a 11 years old PC

    - 4 gb ram

    - Intel i3 (3.50 GHz, 1 socket)

    - About 20gb left in memory of 140gb.

    - Windows 10

    - bonus: The CPU usage (at project debug) is around 40-79.

  • > Also, I'm not sure if your game is like minecraft and it needs all those boxes to be separate objects. Because if you have some static elements, then it is much better to create them using verts inside the plugin and to keep track of them just use tilemap with variables Z.

    I saw some videos of 'recreating Minecraft' on YouTube and they talked about it... But to be honest I cannot imagine the solution on how to do it. Also, I think if I do this way the project my not be able to support lights? I mean every block have it's on info (light RGB, pos, behaviors) and I wouldn't be able to use the 'prebuilt' animations (rotation, scale and moving)

    If you are using sprites to control blocks, then it probably wouldn't be a problem.

    I think I was getting about 1000 collisions checks per second lol. I think it was the physics behavior and all those objects is set to immovable, so I think they might be always colliding or something 😂

    Yeah, you want to deactivate the behaviour where it is not needed. ROOJ chipmunks physics is much better in that regards too. But the system I showed you, unless you are rotating around Depth axis and not using sprites, but code, will work better than physics. It has less to calculate.

    Again I am away from my PC, but I remember only these:

    Specs:

    - it's a 11 years old PC

    - 4 gb ram

    - Intel i3 (3.50 GHz, 1 socket)

    - About 20gb left in memory of 140gb.

    - Windows 10

    - bonus: The CPU usage (at project debug) is around 40-79.

    That's an old machine. you should at least upgrade cpu to i7 that uses same socket. You will get much better performance then i3 and they are cheap now. What gpu?

    I would like to try your project, out of curiosity, see if there's anything I can suggest to get you a better performance. I'm using Construct since 2007, so I kind of know a lot about it.

  • > > Also, I'm not sure if your game is like minecraft and it needs all those boxes to be separate objects. Because if you have some static elements, then it is much better to create them using verts inside the plugin and to keep track of them just use tilemap with variables Z.

    > I saw some videos of 'recreating Minecraft' on YouTube and they talked about it... But to be honest I cannot imagine the solution on how to do it. Also, I think if I do this way the project my not be able to support lights? I mean every block have it's on info (light RGB, pos, behaviors) and I wouldn't be able to use the 'prebuilt' animations (rotation, scale and moving)

    If you are using sprites to control blocks, then it probably wouldn't be a problem.

    > I think I was getting about 1000 collisions checks per second lol. I think it was the physics behavior and all those objects is set to immovable, so I think they might be always colliding or something 😂

    Yeah, you want to deactivate the behaviour where it is not needed. ROOJ chipmunks physics is much better in that regards too. But the system I showed you, unless you are rotating around Depth axis and not using sprites, but code, will work better than physics. It has less to calculate.

    >

    > Again I am away from my PC, but I remember only these:

    > Specs:

    > - it's a 11 years old PC

    > - 4 gb ram

    > - Intel i3 (3.50 GHz, 1 socket)

    > - About 20gb left in memory of 140gb.

    > - Windows 10

    > - bonus: The CPU usage (at project debug) is around 40-79.

    That's an old machine. you should at least upgrade cpu to i7 that uses same socket. You will get much better performance then i3 and they are cheap now. What gpu?

    I would like to try your project, out of curiosity, see if there's anything I can suggest to get you a better performance. I'm using Construct since 2007, so I kind of know a lot about it.

    My bad, I looked again here and I actually the game is doing 300.000 to 410.000 collisions per seconds (WHAAAAT??? LOL) 😂😂😂😂

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)