Pseudo 3d?

0 favourites
From the Asset Store
A well commented Pseudo 3D Racing game template to learn from or use as a base for your own game!
  • Stop this awesomeness! It is too much!

  • Im very tryin to figure out how to show walls behind other walls for things like half high walls and windows etc so far the only thing I can get to work is separatin the special walls from the other walls then rendering both sets but it KILLS performance makin it pretty much unplayable with any number of slices that looks decent

    Any one got any ideas about how it could be done? I can post an example of how Im doin it currently if anyone wants to lag thru it to see what I mean lol

  • I imagine it would kill the performance. Right now only the first wall hit per cast ray is used. It can be changed so that a order list of walls hit is used, which shouldn't affect performance too much.

    The bottleneck will be the rendering. Right now one sprite is used for each vertical slice. With half walls more than one sprite will be needed per slice. I thought of using only 1 sprite and pasting it many times to a canvas object for the drawing, but I'm not sure if that would improve performance.

  • i cant think of any other way to do it. the only other thing to do would be have textures for each upper and lower wall combination but that doesnt take distance between the two into account

  • aridale

    I don't think that a combi texture would work, because you'd have to take into account all possible combinaison of height between the seethrough wall and the wall behind...

  • I am highly impressed. I Did construct 2 was powerful but this is too much

  • yeah I just dont think theres any other way to do it besides rendering twice. And it just wont work for real time play right now =/

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Here's an updated example:

    + variable height walls

    + walls at varying z locations

    + changed the line drawing for level design

    https://www.dropbox.com/s/u11iab8q7cf3n ... .capx?dl=1

    /examples11/raycast4.capx

    Note: You'll need the canvas object for this one.

    I get 4-10 fps on my rig.

    EDIT:

    found another reference for raycasting with a lot of diagrams:

    http://www.permadi.com/tutorial/raycast/index.html

    Could be useful.R0J0hound2012-05-28 22:42:43

  • hmm I get about 15-20 fps on my work comp. Havent tested at home yet. Looks good tho =D

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