9730a7b7-27e3-41ab-86ec-60f77ccc1fe5's Forum Posts

  • Ah ok :). Well like i said, you can always create the billboard sprites from values in an array, check an area around or front of the player. In other words, create only billboard sprites on the fly.

    This is sort of like a stress test.

    I have done raycasting engines with billboard sprites many times, and never came close to that many sprites per level! Then you can even add effects, and what not! 🙂

  • Oh? That's strange...do you have an older computer by chance?

    Thank you! 🙂

  • Thank you for your kind words! :). Yea i love the older engines for sure! I think it's partialy because it's pixel art, which i love too.

    I have read that doom book, well looked through it. Some of it i get, some...not so much.

    You can do the same technique for the billboard sprites, with the drawing canvas polygons! Since it's just translating 2d points to the screen!

    But the drawing order has to be solved, since you cant sort by z, with the drawing canvas. Either use painters algo, or some smarter sorting system...

    Anyway, i don't like when people are against 3d, or pseudo 3d with construct! 3d engines are built from scratch! We have "scratch" plus more tools, thanks to construct 3!

    Hm, i dont think so. The z sorting in system seem to be very fast! Sure, one can add effects, but it will bring performance down, of course. But you would seldom have 1800+ billboard sprites on screen at one time!

    Obviously, one can't go as deep with the optimization...still, it's soo fun to tinker! I love construct! Thank you Ashley!

  • Ah, ok. Was not sure on how we are suppose to do it here on the forum.

    Ok! Here it is!

    Im using the latest Release r203 beta, so make sure to use that!

    This is one way of doing it. You can optimize it even more, if you only use the billboard sprites in the editor. Make 2 new variables "Start_x" & "Start_y" and do the translation from those.

    Even better, check an area in front (cone), or around the player and create the billboard sprites from an array. Sorry, if i hijacked this. Just wanted to show you, one way of doing it! :).

    For some reason, i love billboard sprites! Maybe because i played wolfenstein and other raycaster games when i was young.

    Updated and optimized. Should run even faster now!

    srv-file16.gofile.io/download/eeYlNg/Billboard%20sprites.c3p

  • Sure! But how do i share a construct 3 file here?

  • You can sort the billboard sprites "z" ordering in system. Z sort by something...and just set a variable to the height of the billboard, sort by that.

  • Billboard sprites are easy and pretty cheap to do in construct!

    I use 2d sprites coupled with a "3d" billboard sprite in a container.

    On the 2d sprite, have 4 variables. Cx , cy, sprite angle, x pos.

    Cx = player.x - 2d sprite.x

    Cy = player.y - 2d sprite.y

    Sprite angle = angle(0,0,2d sprite.cx, 2d sprite.cy)-player.angle

    X pos = (half the screenwidth)+tan(2d sprite.sprite angle)*full screen width

    Set the x position on the billboard sprite, the other sprite in the container to the 2d sprite.x pos var.

    Set height value on the billboard sprite to ex: 64/distance(player.x,player.y,2d sprite.x, 2d sprite.y)/cos(anglediff(player.angle, angle(player.x,player.y,2d sprite.x, 2d sprite.y)*some value.

    Set y to either the height value, or half the screen height...

    Set the billboard sprite width to height.

    To fix the x position: if billboard height is less than 0, set to zero

    Done!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You do not have permission to view this post

  • Well maybe you can pair it with line of sight or raycasting? When you don't see the wall set opacity to zero. You can do it in many ways, as usual.

    Lol! 500 to 1000 events...sorry for my attitude, but thats insane! With all the tools we get with C3, i can make a textured Wolfenstein 3D engine under 50 events, for christ sake.

  • Looking forward to this one!

  • Yes. Im already backing that one.

  • Hello everyone!

    Long time lurker...

    I use the "Jcw_trace" plugin a lot for construct 2! Mostly for raycasting engines and such...

    Is it hard to port that particular plugin to the new construct 3 runtime?

    Why is this not a feature in construct 3? You (Ashley), have told us that "raycasting is not feasible..." yet the Jcw_trace plugin exist, and work like a charm! Amazing performance! So it's definitely feasible, no question about it.

    I love construct 2/3. I am a happy license subscriber for construct 3, and the new runtime is great!

    Have a good one!

    If you want raycasting in construct 3, please vote here:

    https://construct3.ideas.aha.io/ideas/C3-I-193