Colonel Justice's Recent Forum Activity

  • Seconded!

    The only problem is that there's no Unix / Mac support with WebView2 as of yet.

    https://docs.microsoft.com/en-us/microsoft-edge/webview2/roadmap

  • Colonel Justice I managed to use coordinates for sprites on the 2d layer. But I do not understand how to achieve the correct size of sprites. This method can be used for a coin in my case. Since the question arises how to move sprites if we constantly set their position.

    https://drive.google.com/file/d/1Z36JfxluwTB0vrWVDJi97Ko6H5HAkvq3/view?usp=sharing

    But even a coin I would like to animate (smooth movement up and down). Therefore, the ideal option would be for a coin or a flying ship that comes from the sky or whatever to be displayed correctly in 3d mode. And here is an example of a game in which i want to do this:

    The sprite scaling seems fine to me, maybe needs a little tweaking.

    To properly scale, you need to take into account the viewport height of your project and relatively scale in function of the aspect ratio. http://graphicdna.blogspot.com/2009/09/properly-scaling-point-sprites-in.html

    You can use controller sprites that are joined via containers with the display sprites, position the controller sprites in the 3d space and then translate their x,y,z coordinates to properly position the viewport sprites. Collisions, behaviors etc. are solely done via controller sprites (which are set to invisible).

  • You can use a 2D layer on top of the 3D layer, then translate the 3D coordinates to screen coordinates, then use a 3d distance calculation to store the distance from each sprite to camera, then sort the 2d sprite by that value. Additionally, you can use that distance value to scale the sprite according to distance.

    To retrieve the plane coordinates, e.g. screen X coordinate, do something like

    3DCamera.CanvasToLayerX("Viewport", 3DCamera.LayerToCanvasX("Floor", PosX, PosY, PosZ), 3DCamera.LayerToCanvasY("Floor", PosX, PosY, PosZ), 0)

    where "Floor" is the 3D layer, "Viewport" the 2D layer, and the variables PosX, PosY, PosZ is the sprite's x,y and z elevation.

    To get the distance of sprite to camera, use the Pythagorean principle in 3dimensional space, which is distance = square root of (x² +y² +z²), while

    x = abs(sprite.x - camera.x)

    y = abs(sprite.y - camera.y)

    z = abs(sprite.z - camera.z)

  • Having had a look at your project, I'd say with this method you're pretty much out of luck. May I ask if your assets are completely composed of sprites and you only use the engine's 3d features for perspective?

    If so, there may be an alternative.

  • You do not have permission to view this post

  • You do not have permission to view this post

  • You do not have permission to view this post

  • Interpreting the extensive use of punctuation and double- and triple-emphasizing on the question if there is another way than giving away the source code of something you have dumped 7,000 hours of your spare time into, my educated guess is that you may have the opportunity on monetizing at least a fracture of the time spent and you may be in contact with a small publisher / studio, yet ridicously overrate the market value of the product to be.

    Talking personal experience here.

  • You can for example create 32x16 tiles to get a 2:1 isometric Layout. However if you have elevated objects (e.g. buildings) they are better composed of sprites, only the ground layer being a tilemap.

    Another method would be using the 3d camera set to orthographic projection and rotate the view vector accordingly. Like this you can use 3d objects as Billboards like I explained in the other thread.

  • The engine supports it, however, the isometric tile images are better created elsewhere.

  • Thank you Colonel Justice

    Sky is just a ping pong snaphot img scroll:

    Hopefully this experiment goes further in our HUM game.

    Can't wait to see your next bigger project using new features!I remember your love to raycasters. Thanks for confirming the speed of the Array.

    Best

    That's clever!

    I'm still working on the raycast engine, I managed to incorporate the algorithm and blend the 2D viewport layer on 3D layers. Like this I still can use 2D billboard sprites which can rotate, scale properly etc. One day in the far future, I will be satifsied :D

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • It's actually possible.

    0) Set the project setting 3d camera scale to regular.

    1) Create a 3D object (box shape).

    2) Create a sprite and import / draw all desired animations & frames.

    3) Create a container on the 3d object and add the sprite.

    4) Set the right face of the 3d object to use the sprite as texture.

    5) Create an event that adjusts the 3d box dimensions as follows:

    Every tick - Set 3d box height to sprite.imagewidth, set 3d box z-height to sprite.imageheight

    Now, you can control the 3d box appearance by simply controlling the sprite animations.

Colonel Justice's avatar

Colonel Justice

Member since 16 Mar, 2011

Twitter
Colonel Justice has 10 followers

Trophy Case

  • 13-Year Club
  • Jupiter Mission Supports Gordon's mission to Jupiter
  • Forum Contributor Made 100 posts in the forums
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

18/44
How to earn trophies