Colonel Justice's Recent Forum Activity

  • This has something very original to it. Something between... CGA and EGA

    Keep it up!

  • Updated the original post with recent information, screenshots and initial download capx.

    Inception style link https://www.scirra.com/forum/viewtopic.php?f=180&t=197735

    Cheers!

  • Due to some demand, I'm still working on it, but with rather little time on my hands right now.

    So I'll clean stuff up a bit and upload a capx end of this week or beginning of next.

    Cheers, and thanks for your support!

  • Next update

    -Sprites are working, sprites have also correct Z height display and depth buffering

    -Got depth buffering with walls to work

    -Initial HUD layer with weapon display (ripped from zdoom's forums, credit goes to the author)

    -Furthermore I designed the initial rendering method from scratch. The drawing now doesn't use paster anymore which alone is a performance boost. The engine now only relies on raycasts and Nobody's seamless effect - and of course some math

    -Engineered a "primitive" routine to generalize map wall objects. For now we only have rectangles, which still has some overhead, e.g. invisible sides of the rectangle still have to be considered in finding the render candidates. Next roadmap goal is to use multipoint polygons instead. In a later editor, we might be able to draw the map in some Doom / Build engine fashion.

    The scene in layout editor:

    Stay tuned!

    Edit: Fixed broken image links

  • Just a quick heads up,

    I improved the performance 200-400%, so it runs at 60 fps with 40% single core CPU workload.

    Right now, sprites and z-sorting are getting implemented. As the engine is set up, I'll be scrapping translucent walls.

    Also I need to find a way to efficiently implement floor and ceiling casting. As this is doneper-pixel (vs. per stripe as for the walls), it's much more expensive.

    I'm planning on releasing a first capx when the sprites are done though.

  • Currently it's events only, and therefore the performance is quite sluggish. I must admit that my plugin development skills are limited.

    I do this mainly as an excercise and to understand the concept of raycasting.

    The main routine uses the following plugins:

    LoopIterator

    EventBalancer

    Paster

    Trace

    So what it basically does is it does a loop times the horizontal width (in this case 320px = 320 iterations). Within the loop the trace object retrieves angle, distance, texture of the wall etc. for each vertical pixel slice respective to the player's angle, then uses a first 1px wide Paster object to paste the object texture on, then move the Paster to the calculated position on another paster (the viewport), and then finally y-scale the 1px paster accordingly and paste that onto the viewport paster object.

    Although I think the math is fast enough, clearly the bottleneck is the pasting on the viewport. So in order to maintain 60fps game logic, I use LoopIterator & EventBalancer to slice the mainloop in to digestable chunks and set it to be completed every 2nd frame (that's why it's 30 fps at the moment).

    There's probably a better way to do this, but I still have to figure out on how.

    If you want I can clean the capx and post it for you to try.

    Best would be maybe to have some sort of interface plugin for the pasting (not doing it in events)

    Also there's no floor ceiling pasting as of yet.

    What would also have an impact on performance is that it doesn't check z-buffers yet. So in order to render sprites, I would first have to test if the cast ray hit a non-transparent object (wall). If so, render. If not, write the information in a z buffer, then continue until a non transparent object is hit. Then render from back to front according to the z-buffer.

  • What the actual f...???

    Seriously keep this going!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • hoobydoobydoo i hope we don't get sued

    Original Post below.

    Instructions and download links follows after the screenshots.

    This is the first release (0.48) of the engine. Please leave your comments, suggestions, death threats whatever as a reply to this thread.

    Features

    • 3D raycast framework for Construct 2
    • 360° first person raycast rendering 320x180
    • Pixel perfect wall rendering without classic raycasters 90 degree wall constraints (Wolf3d)
    • Uses Chipmunk physics for movement of game objects
    • Billboard sprites in 3D translation
    • Effect sprites, static sprites
    • Correct Z-Buffering of walls of sprites
    • Uses Tint shader to for directional wall shading
    • Basic enemy AI
    • HUD functionality, FPS weapon display
    • Basic weapon & health pickup routines
    • Commented code (right now partly, will be completed in the next release)

    Credits & prerequisites

    Cudos to the authors of the following plugins and effects. Without them, this thing would not have been made possible.

    Note: You have to install these before you can work with the CAPX.

    Get it at https://drive.google.com/open?id=0B5HnHqVYzkImck1uSmlkUGJ5VHM. Thanks to adcornaglia for the reupload.

    All other used plugins, behaviors *should* be onboard. If not, please contact me so I can add them to the list.

    Uses various sprites from realm667.com, a Doom resource site. Thanks to the authors, whoever, wherever and when ever they may be.

    General instructions

    The rendering logic utilizes the seamless shader. Altering one of the following will break the rendering.

    -Changing the project's full screen scaling to High quality

    -Changing the window size to something else (1280x720 for example).

    You *can* do that, but probably have to change the global variable ResX accordingly. This is a bad idea because it will blow up the perfomance. So don't do that.

    Download the CAPX

    Current version 0.49 - https://drive.google.com/file/d/1e98t3LA-LmKZJBSuiVTIXttxCYefXdIC/view?usp=sharing

    Changes:

    Replaced castline objects with trigonometric calculations for performance gains

    Disabled tint shaders for even more performance gains

    Removed MagiCam object from the project (was deprecated)

    Removed Quad Shader FXs from project (was deprecated)

    Past releases

    Version 0.48. - Initial release http://www.fightingspace.com/wp-content/uploads/2018/02/stolf3d_048.zip

    Stuff to do next

    • Tie map objects to chipmunk behavior
    • Make breakable map objects
    • Make the player die at 0 health
    • Implement trigger areas
    • Implement switches, keycards, etc.
    • Improve performance

    + your suggestions

    Thanks for your interest in this project.

    Cheers!

    -------------------------------------------------------------------------------------------------------------------------------

    Original post:

    -------------------------------------------------------------------------------------------------------------------------------

    After tinkering for two days or so I came up with a first draft of a raycaster engine.

    It's nowhere near completed but here you have it, what has been made possible with plugins in GameMaker and Multimedia Fusion can as well be accomplished in Construct 2 (or 3 for that matter). So it's more like a proof of concept right now, but it has some capabilities that already exceed Wolfenstein 3D's raycaster (well, after 25 years... )

    Current features

    • Can render any angle on the z axis with correct perspective
    • Renders different textures
    • Walls can be of any size (x/y) and angle
    • Colored / Tinted textures
    • Animated textures
    • Raycaster renders pixel-perfect overlaps (the cross on the screen is composed of 2 wall blocks)
    • Fog depth rendering of any RGB color and range

    Current limitations

    • Framerate locked to 30 fps
    • 320x180 viewport
    • FOV of 60°
    • Can't z-buffer transparency... yet
    • Fixed wall height to 64px

    Planned features (phase 1)

    • Rendering floors and ceiling
    • Rendering sprites (need to tackle z-buffer rendering, back-to-front)

    Planned features (phase 2)

    • Enemies
    • Decoration Sprites
    • Weapons
    • Pickups
    • If there's enough interest, I'll turn it into a template

    Planned features (the far future)

    • Z-movements
    • different wall, floor & ceiling heights

    Bombs away!

  • the graphics are brilliant did you draw them yourself?

    Yes, everything handmade with the rotten love it deserves

    Some character animations:

    -Barbarian with chainsaw (what else)

    -Zombie walking

    -Skeleton walking

    -The Colonel saluting

    -Beggar idling with some pistols

  • ...for the ultimate pixel slaughterfest!

    More info soon!

  • Having the black boxes both bullet behavior set to bounce off solids and being solid, it will bounce off on itself every tick, causing the massive performance drop.

    Furthermore, is there any particular reason why your project utilizes a 10000 x 10000 window size?

  • > Hi,

    >

    > has anyone figured out the following yet:

    >

    > Objects involved:

    >

    >

    >

    > Q3DModel applied 0.5 (or any) opacity, Q3DSprite is behind the model, desired render:

    >

    >

    >

    > Render outcome instead:

    >

    >

    >

    > Long story short, the sprite doesn't blend well with the model in front, actually it's more like destination over or something.

    > Note that alphaTest = 0.5 works fine, but I need to blend both object types with this z-order correctly. Think of particle sprites spawned behind a glass wall, for example.

    >

    > Thanks & cheers!

    >

    This is a standard problem with alpha in 3D rendering. you can get around it by playing with the depth settings (depthTest and depthWrite).

    Thanks. I was hoping that there was an out-of-the box approach. Disabling depth writing helps, but still renders the sprites on top of the geometry. I probably will have to render 2 passes, first sprites, then geometry.

    Talking geometry, is there a quick way to access ExtrudeGeometry? I'd like to use this to draw a 2D polygon, then feed the vertices to the function and create a 3D shape. Right now there's only primitive shapes for creation in Q3DMaster.

    Cheers!

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