Log In  

by Mot
Cart #mot_pool-22 | 2020-10-06 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
30

A work-in-progress 3D pool table simulation.

P#81393 2020-08-31 11:55 ( Edited 2020-10-06 08:57)

1

Very good starting point!!!
(90% cpu? - we need to talk 😜)

P#81443 2020-09-02 13:57

The polygon rasterisation loop could definitely use some love :)

P#81454 2020-09-02 21:08

Good news: rasterization is ok (well I do prefer mine but whatever ;)

Bad news: vector oop and operator overloading is cool but for any serious work, this is a big no-no.
Try:

function justproject(p)
 -- project
 local scale=fov/p[3]
 -- plain old table
 return {p[1]*scale,p[2]*scale,scale}
end

and fix renderpoly with:

...
local dl={
    l2[1]-l1[1],
    l2[2]-l1[2],
    l2[3]-l1[3]} 
...
local dr={
    r2[1]-r1[1],
    r2[2]-r1[2],
    r2[3]-r1[3]}
...

Game went from 84% to 72% cpu!

P#81466 2020-09-03 06:13 ( Edited 2020-09-03 06:13)

@freds72 thanks.
I went a bit further and managed to get down to 54%.
(Went up again slightly when I added a cue stick mesh).

P#81472 2020-09-03 09:08

Very nice so far, although it feels a bit strange to have the view locked in place when balls can move off-screen. Maybe it could zoom out to get a view of the whole table after a player makes a move?

P#81588 2020-09-07 23:18
1

@Jusiv thanks. And yes, I agree - I'll probably add something like that.

P#81597 2020-09-08 06:45

are rules broken? looks like foul play doesn’t auto-switch to other player.

P#81689 2020-09-11 08:47

sub-pixels balls are 😍 - I cannot do without now in my games

P#81690 2020-09-11 08:48

@freds72 whoops, maybe. I was shuffling the logic around to shoehorn the position-white-ball sequence in.
I'll have a look in a bit.

P#81692 2020-09-11 09:02

will cpu vs cpu be possible?
this is a relaxing experience just looking at balls rolling in its sub-pixel rendering beauty!

P#82100 2020-09-22 06:17

Try waiting 100s :-)

P#82105 2020-09-22 06:59

yeah!

P#82106 2020-09-22 11:13

Truly excellent game already, Mot! 👏🤩

One request: please can we toggle/flip camera movement?
(my instinct is to rotate right with right arrow, and get low on cue ball with down)

P#82561 2020-10-04 18:18
1

Added an "Invert X-Axis" pause menu option.

P#82578 2020-10-05 03:19

@Mot PERFECT! 😙👌

P#82580 2020-10-05 05:13

[Please log in to post a comment]

Follow Lexaloffle:          
Generated 2024-04-20 12:34:33 | 0.041s | Q:36