123
-=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- (c) WidthPadding Industries 1987 0|685|0 -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=-
Socoder -> Concept/Design -> Doom Style 3D Projection

Posted : Sunday, 12 September 2021, 05:37
Jayenkai

Doom Style 3D Projection


Pakz retweeted @ValerADHD's quick guide to doing Doom style projections, yesterday.
Figured I'd attempt a rewrite in JSE, and it .. kinda works.. except I can't figure out a decent way to fill it all in, due to the slowness of the engine.
Bah, humbug!

Anyhoo...

  --v


-=-=-
''Load, Next List!''
Posted : Sunday, 12 September 2021, 07:59
Pakz
Is a fill polygon function or something similar in native javascript not an option?

Nice short code though!
Posted : Sunday, 12 September 2021, 11:56
ProHiScore
Cool
Posted : Tuesday, 21 September 2021, 02:52
Afr0
This is awesome Jay!
Does this mean that Doom can be ported to JSE?

-=-=-
Afr0 Games

Project Dollhouse on Github - Please fork!
Posted : Tuesday, 21 September 2021, 02:56
Jayenkai
It's still too slow for that.
But, sure. Hop to it.

-=-=-
''Load, Next List!''
Posted : Tuesday, 21 September 2021, 03:03
Afr0
What do you mean it's too slow?
This example seems to run fine on my computer!
Have you checked the FPS on it?

-=-=-
Afr0 Games

Project Dollhouse on Github - Please fork!
Posted : Tuesday, 21 September 2021, 03:08
Jayenkai
The above example might work, but the above example doesn't even include filled polygons, never mind trying to texture them.

Could really do with the ability to draw Quads in JSE, but that requires switching to WebGL, and that's a known battery killer on mobile devices. JSE's bad enough at doing that without adding WebGL into the mix.

-=-=-
''Load, Next List!''
Posted : Tuesday, 21 September 2021, 03:20
Afr0
Couldn't you include WebGL as an optional feature?

-=-=-
Afr0 Games

Project Dollhouse on Github - Please fork!
Posted : Tuesday, 21 September 2021, 03:26
Jayenkai
Some day, perhaps. I'd much rather work on getting the actual script parsing to go faster, first. Adding in WebGL at this point would still end up being bottlenecked by the speed of the script.

-=-=-
''Load, Next List!''
Posted : Tuesday, 21 September 2021, 03:58
rychan
Might attempt some Doom style projection on NES / gameboy in the future, could be fun that.

-=-=-
Web / Game Dev, occasionally finishes off coding games also!

Refresh Games - Game Dev Blog
Posted : Tuesday, 21 September 2021, 04:29
Pakz
I was thinking on how to do a polygon fill routine. I had placed a triangle fill on this site before. This was by basically getting the left and right coordinates of each line point(bresenham) and drawing lines between them. Going from top to bottom.

I still have no real idea how to implement that and not take a whole weak debugging and getting it work.
Posted : Tuesday, 21 September 2021, 04:40
Jayenkai
Plain/coloured/gradient poly's aren't complicated. It's texturing them that's the hard part.

-=-=-
''Load, Next List!''