Jump to content
Pokeypy

Smooth 3D Movement like "Wayout"?

Recommended Posts

Just for the records… Paul’s VIC20 version does all in real-time like the A8 and not “faking” anything. It’s not much “precalculated”. Or do we now call a sin table “faking” ;) .

 

i have the source, too.

 

what ivop just wanted to say is that it’s a “fake raycaster” as it does not shoot rays anymore as it’s all baked into tables. The PC tool did the “raycasting”.

  • Like 2

Share this post


Link to post
Share on other sites
4 minutes ago, Heaven/TQA said:

Or do we now call a sin table “faking” ;)

This. Every table that eliminates a costly calculation is good :)

Share this post


Link to post
Share on other sites
9 minutes ago, ivop said:

This. Every table that eliminates a costly calculation is good :)

sure. I was just wondering that in general 64kb is not enough to precalc a wolfenstein like raycaster data.... with all the rotation and subgrid movement.

Share this post


Link to post
Share on other sites
35 minutes ago, ivop said:

 

 

You have a link to that?

 

 

You see the windows moving interleaved. It suggests an fps of 8 but in real it is 4 fps. On the Atari BOTH windows get updated at 8 fps

 

Share this post


Link to post
Share on other sites
40 minutes ago, Heaven/TQA said:

Just for the records… Paul’s VIC20 version does all in real-time like the A8 and not “faking” anything. It’s not much “precalculated”. Or do we now call a sin table “faking” ;) .

 

i have the source, too.

 

what ivop just wanted to say is that it’s a “fake raycaster” as it does not shoot rays anymore as it’s all baked into tables. The PC tool did the “raycasting”.

The point is:

They do the same, but the Atari is double as fast. 

Share this post


Link to post
Share on other sites
56 minutes ago, emkay said:

They do the same, but the Atari is double as fast. 

 

Not true. I think VIC20 is rather similar. The C64 is half as fast.

Share this post


Link to post
Share on other sites
28 minutes ago, sanny said:

 

Not true. I think VIC20 is rather similar. The C64 is half as fast.

 

Did you read my post?

 

The VIC20 Version updates the windows interleaved

 

Window 1

Window 2

Window 1

Window 2

....

 

there are 8 changes together in one second

 

On the Atari 

BOTH windows get updated  at 8 fps. 

 

 

 

Share this post


Link to post
Share on other sites
Posted (edited)
6 hours ago, ilmenit said:

any idea what it does exactly? 2D rotation of the wall corners over the center? Does it determine somehow cone of view to determine the points to be rotated? I assume there are too many of them on the whole map, especially for 2 players simultaneously, plus looking at the map uncovering there has a distance limit.

@ilmenitIt's in that quote of his about list of line spans.
 

- You only need to sort once all walls in grid based on distance from "zero" grid cell. Finer position of player inside grid cell isn't important.

 

- Once you have that you parse all walls from closest to farthest and calculate it's two edges screen projection.

- Let's say first wall is projected from 40-70 x coordinate.

- You calculate next wall projection and it's 20-60 x coordinates. Now you know it's behind first wall (because list of walls is sorted on distance).
- So your resulting list of visible wall spans is now something like: (20-39),(40-70)
- For each edge of segment you have to take care of correct perspective height of course. Only complexity there is finding new screenY coord where two wall spans overlap, but it's again simple proportion formula.

- Once you parse all walls in your precalculated list of walls you have sorted left to right all wall spans to draw with their x,y screen coords.

- You can clip them also based on current camera angle (taking only x coords in -45,+45 degree angle cone).

- That precalculated list of walls can be limited to contain walls up to certain distance, so it can be tweaked easily to make it run fast and still look good.

 

Sorry if this sounds too complex, it's rather elegant once you draw it on paper :)

 

ps. I've just found old drawing I did when experimenting with gfx like this, shows walls of grid in different color and thickness based on distance from camera :)

Main trick here is that no matter where camera moves inside that central grid cell, order of walls doesn't change.

TkdM4QCeDLkxFDC_IHftZLwbZytL7FcQZd3Zq6Hz7gIxH6KwiTC5Jdq-rEav99Od_dGU_2NGJYaeNWuDQzRmacmLHMAsg9Em6P3yqp-qvIG1y6PLi34HQLBPSuKmDTdaEh42L2mxLReZbQtqaBwd859xoBkToaUDUCi32MvWT6wILlPocdlhW3SMBYjxU4h0P5F0HQoYR1Jz9ahjmQCd7F2XyL_KG_z01Rf2W4zBqE_mggzv8RzMnMl8FZnGOCwJfBMzcxIyBBgkYDr7ZzAyJqloRsnk7p2kbeQGyx27K6xj7jpb6qH-wS0Q9-i9tmG-mLuPh-u9fgU2G15elOylqf-bgp2eiN1TMacXrpu4e5R8K0sX53aXmpM83_OzcSKvoPO2eDCnkzrTS7RxZ3vu3XBHMeALzMLOnKRfFReEtvcuIFkQQceQJuY0flaEVEzk_zke8H7u8z-Vppbzg0qNxs1rPbKGcNgNzdIQ74OObyz-RmYyvpNbKRnKIfUDFQhnxIGUzOUOeMQeNwdTEI4N4QDnr1GPemLXDeuBi7f5OwOzlCdQMCVAC99nCv6c89zYY1klICkCAbrKLT68Sy2224xoBhmSFJxMJ2RoN1lAYjGMN_KT-1AkAQelHOhFmj5eYyJ0u24B-61sXIpKaGjZSAnc97KBrRwIke16dOEPCBXvhnDVTkVBH6bou2JBqUVo9vXbORFPrrbbxynmAvjPIxE=w723-h954-no?authuser=0

Edited by popmilo
Image was too large.
  • Like 1
  • Thanks 1

Share this post


Link to post
Share on other sites
1 hour ago, sanny said:

 

Not true. I think VIC20 is rather similar. The C64 is half as fast.

The clock speed is similar to C64. The C16/116/plus4 is more on A8 speed cpu wise.

Share this post


Link to post
Share on other sites

Many years ago I did something similar for a bbs door game in Rip Script. Not raycasting of course, just predrawn frames for each wall type, with predrawn lamps, doors etc. I believe we went with 5x5 so as to make it easier, two corridors on each side. Maybe something similar would work well here, like that other guys char-based mover. Players will forgive some graphics oddities if they are having a good time.

  • Like 1

Share this post


Link to post
Share on other sites
4 hours ago, Alfred said:

Many years ago I did something similar for a bbs door game in Rip Script. Not raycasting of course, just predrawn frames for each wall type, with predrawn lamps, doors etc. I believe we went with 5x5 so as to make it easier, two corridors on each side. Maybe something similar would work well here, like that other guys char-based mover. Players will forgive some graphics oddities if they are having a good time.

So: Using narrow playfield and 16 character lines in ANTIC , you need 256 bytes per display.  In 16K you can store 64 different displays, and flip between them by changing a single byte in the LMS.  (Plus you'll need 1K for the custom character set).

Share this post


Link to post
Share on other sites

I'm still missing, how the ENGINE is really done. 

There seem to be 8 (7) steps of free movement on the path. 

This needs 8(7) different offsets in the viewing angle and depth.

It also seems like that a rotation shows 32 different degrees of a circle.   

The walls also block the gameplay at this resolution. It's not just visuals.

 

 

Share this post


Link to post
Share on other sites
Posted (edited)

core engine is described by Paul & Popmilo.

 

and all details and magic are in the VIC20 source code and the A8 source I uploaded.

Edited by Heaven/TQA
  • Thanks 1

Share this post


Link to post
Share on other sites

I wonder, no one els posted it already.

 

 

  • Like 1

Share this post


Link to post
Share on other sites
4 minutes ago, Preppie said:

And his new one is done with character mode:

 

 

Oh, he did it already. 

I hope, he will do a borderless version too. 

Share this post


Link to post
Share on other sites

Awesome work - pretty amazing PoKey music too (he says sarcastically) :)

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...