First person engine

  • Hello,

    I created first person engine based on DOOMs vector calculation - example in picture. I want to find someone who made it too to exchange experiences. I have implemented optimization to not render hidden objects, collisions and "billboard" objects (allways face to player) representating enemy player (they have own direction vector with 8 different textures).

    I am disappointed because of C2 speed. But maybe someone discover better (faster) solution.

    I wanted to upload Node-Webkit example but DEMO not allow it and export to HTML fail because of minification. C2 v190 is broken and even when I have installed java 8, minification failed. Older C2 versions have no problems. So only picture is attached.

    PM me if you want.

    Thx.

  • Well, I don't know the first thing about this, but I'm interested in how you did it. Is this all event based? Or are you using the q3D plugin?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Event based + Math

  • You can look here for a few implementations:

    I have a computer that doesn't like html5 so the performance wasn't nice enough to pursue further.

    I've also made an attempt at 3d that leverages c2's renderer more using a plugin, but the z-sorting proves to be very complex.

  • hes using raycasting, basically shooting rays for each vertical bar, saving the distance to each bar, using that to scale the bar vertically, and using the position along the face of the tile to choose what to use as the texture for that bar.

  • Wow, these event based engines are murder on the cpu... for R0J0hound's event based example (raycast4.capx), I get 10fps and 90% cpu on an i5 3570k.

  • Considering Doom and Wolfenstein 3D ran decent on computers with 1/100th the computing power of today's pc's I'd say some major bottlenecks are being encountered.

  • Doom uses BSP's , and im not sure about how you implemented raycasting, but wolfenstein/effecient raycasters use a hashing scheme that can very quickly determine collisions in a uniform grid.

  • BSP's would need to be generated first but even then the drawing performance isn't there on my pc with html5. Also agreed a uniform grid would be faster, but it is also is less interesting.

  • Thanks R0J0hound for link to Wolfenstein engine. If you will just draw walls, you can save some fps if all will be grid based (same height / width all time) with 90° angles. I use almost same like raycasting4 example but not use Array and have billboard polygons representation enemies.

  • if i'm correct "raycasting" should be something similar to raytracing - which on the fastest device specially made for it only with a 3/4 shadow bumps creates images in 30 sec. yes 1FRAME per 30sec.

  • saiyadjin

    The difference being per pixel.

  • yeah, raytracing in 3D i guess uses the whole space to compute the lighting, while 2D uses only all pixels on the area of x * y?

    is that what you meant newt?

  • Yeah pretty much.

    Raycasting in this case doesn't do any rendering. Its just figuring out where to put stuff, where raytracing is drawing every pixel, as well as figuring out lighting etc.

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