How do I create a 'Doom-Like'?

From the Asset Store
Fully commented source code/event sheet & sprites to create a space shooter game
  • Hi all!

    I know that Ashley and the whole Scirra team has been hard at work on the new 3d / z-order system. I have found and read the following tut on the topic (Ashley's Tut). But, I am still struggling to wrap my head around how to start. I have seen several examples of people putting it into action (erikjohansson Ex.1, rufson Ex.2).

    rufson has kindly provided his C3P for his project, but... tbh I have no idea how to turn this into something more real.

    I know this may be asking alot, but are there any step-by-step tutorials on how to get something like this working? I am a lvl.2 C3 N00b and need someone to hold my hand through this process.

    Tagged:

  • playfuljs.com/a-first-person-engine-in-265-lines

    My understanding is that the original Doom was still pretty much a 2d game. Neither z elevation or the 3d object are necessary. If you are able to follow the above in Construct you should end up with a pretty good idea on how to customize and add to it for your own purposes as well.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • playfuljs.com/a-first-person-engine-in-265-lines

    My understanding is that the original Doom was still pretty much a 2d game. Neither z elevation or the 3d object are necessary. If you are able to follow the above in Construct you should end up with a pretty good idea on how to customize and add to it for your own purposes as well.

    Thanks for the link! I read through it. I would have no idea how to apply that into C3 though.

    I found this template for sale. About to buy it and have a look at his code.

    And your 100% right. He made this template several years ago, so the latest improvements are unnecessary to accomplish what i'm interested in doing.

    Do the most recent enhancements make this any easier? Or faster to make?

  • Well there’s two different approaches to do that kind of 3D with textured walls with vanilla features.

    One is the raycast method. That’s what that link and template do. Logic wise it’s a raycast per vertical line and depending on the distance each ray is to a wall you set the visual height of that slice. You can use the tiledbackground object to draw slices of a texture to do that.

    Floors and ceiling would need to done via an effect.

    The other method is to use distort meshes with a sprite. Rufus’ example does this. Basically you need a sprite per face and you set the xyz of the corners to make a cube. Then you can use some math to rotate and move the points from a camera point of view.

    Construct makes this a bit more complicated though. You can’t set the zelevation of a mesh point to negative value, and the xy positions are relative to the sprite’s bounding box. Probably can get how to work around that from rufus’ example.

    Otherwise 3D shapes aren’t usable because you can’t rotate them. But there is a third party plugin you could use that does do that.

    Sorry I’m not really good at writing step by step solution stuff.

  • Okay. Thanks oosyrag & R0J0hound!

    I will go with the ray casting and I will try to stick to the PlayfulJS method. I dont know any javascript, but maybe this is the right time to learn some!

  • You don't need javascript, here's a way to do it with events. It uses the tiledbackground object to draw it, and uses some math to do the raycast calculation.

    dropbox.com/s/s8mz4i34djr89xy/raycast.c3p

    Kudos to construct for giving access to collision points. I didn't use the line of sight raycast feature since that doesn't provide the necessary data to do the texturing.

    Also since events are so slow I tried utilizing javascript instead:

    dropbox.com/s/b6hy5e5f3xdldmz/raycast_js.c3p

    It's much faster, even though it does the same thing. But man was that unpleasant to get working. Once i got past the syntax errors, i had to deal with all the silent errors that made it not work. Anyways, it's a shame js is needed to make things faster.

  • You don't need javascript, here's a way to do it with events. It uses the tiledbackground object to draw it, and uses some math to do the raycast calculation.

    https://www.dropbox.com/s/s8mz4i34djr89xy/raycast.c3p?dl=1

    Kudos to construct for giving access to collision points. I didn't use the line of sight raycast feature since that doesn't provide the necessary data to do the texturing.

    Also since events are so slow I tried utilizing javascript instead:

    https://www.dropbox.com/s/b6hy5e5f3xdldmz/raycast_js.c3p?dl=1

    It's much faster, even though it does the same thing. But man was that unpleasant to get working. Once i got past the syntax errors, i had to deal with all the silent errors that made it not work. Anyways, it's a shame js is needed to make things faster.

    Duuuude! You're amazing! Thank you for those. It really helps me to wrap my head around the concept. I booted up both and the only difference I could really see is that in the JS version the boxes looked far smoother. Where as the C3 one seems choppy.

  • Check out "3D castle maze" template added in the latest beta.

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