MaxCoderz

for your 1 bit pleasure!

All times are UTC




Post new topic Reply to topic  [ 29 posts ]  Go to page Previous  1, 2
Author Message
 Post subject:
PostPosted: Mon 13 Feb, 2006 6:28 pm 
Offline
Maxcoderz Staff
User avatar

Joined: Thu 16 Dec, 2004 10:06 pm
Posts: 3064
Location: Croydon, England
Jim e wrote:
Quote:
; Leave the LCD driver in a happy state!
You're so considerate of the lcd. Most people wouldn't think twice about leaving it happy, most people just order her around. :P
Hehe, mainly because ionFastCopy relies on the driver being in x-increment mode ;)

Quote:
Now would I be correct in assuming that the lens effect is a BIG table...
Yes... 2048 bytes. I only just remembered that it was 32*32*2 (I forgot that there were two bytes per element - x and y). That's pretty outrageous, seeing as the lens could be reduced to a quarter of the size by flipping it around 90 degrees... Even bit-packing (the range only goes up to 31) would drop that to 1280 - and if quartering the dimensions of the table, would only need one nybble per element - so, a 256 byte table - but seeing as this is a sort of run-once program (this is not the sort of thing with much replay value) I wasn't too fussed about the binary size at the end. (And if that's not a run-on sentence, I don't know what is). I need to fix the typos (Maxcoderz -> MaxCoderz), so maybe I'll have a shot at reducing the sizes of the lookup. RLE compression on the flipcard graphics might also be nice, but Brass didn't support that when I wrote it. ;)


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Mon 13 Feb, 2006 8:22 pm 
Offline
Calc King
User avatar

Joined: Sat 18 Dec, 2004 6:46 am
Posts: 2932
WOW, I now know that "Anything Is Possible"!!! I really like the tunnel, how you can make it faster and slower and directions of it!


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Mon 13 Feb, 2006 8:30 pm 
Offline
Sir Posts-A-Lot

Joined: Sun 09 Jan, 2005 9:51 am
Posts: 190
Nice stuff Ben :)

Just one thought : I wish your demos had a kind of 'storyline'. I mean, this one is - on this side - far better than Pixel Madness since it has a transition effect, but in the end it's still a few effects packed together. In other words, I'm impressed by the technical stuff (even if it's 'basic' trig =)), but as a whole it ends up as a tech show, nothing more imo. tr1p's lcbhaa was nicer from this point of view.

Take it as constructive criticism !

_________________
Image


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Tue 14 Feb, 2006 1:13 am 
Offline
Calc Master
User avatar

Joined: Wed 22 Dec, 2004 3:07 am
Posts: 1454
Location: Through the Aura
I agree with pacHa, but still... hawt!

..hawt hawt hawt! It burns us, it burns us!

_________________
Image


"You're very clever, young man, but it's turtles all the way down!"


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Tue 14 Feb, 2006 1:55 am 
Offline
Calc King
User avatar

Joined: Sun 26 Dec, 2004 5:27 am
Posts: 2457
Location: SXIOPO = Infinite lives for both players
BAH! CODE SPEAKS LOUDER THAN WORDS!!! (caps lock intended)

_________________
Image


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Tue 14 Feb, 2006 1:41 pm 
Offline
Calc Wizard

Joined: Sun 19 Dec, 2004 9:02 pm
Posts: 585
Location: Sweden
The lens effect is a very good example of a load-time generated distortion map, since you can change the behavior and various dimensions anytime to fool the audience that it's realtime :)

Pseudo-approach which I wrote off the top of my head:
Let's say you're on "(x, y) -> (r, t)" in the lens ('x' and 'y' are cart. coords, 'r' and 't' are polar). For a convex lens with the flat side down and the convex side being a spherical shell covering 90 degrees, the surface normal points with angle "an = r * pi/4" (direction pointing away from the center of the lens). The thickness of the lens, with sharp edges, is "h = cos(an) - 1/sqrt(2)". Refraction gives "n1*sin(a1) = n2*sin(a2)" which in this case can be written as "ar = an - asin(sin(an)/1.5)" where 'ar' is the angle against the vertical. Radial displacement due to trip the rays make through the lens gives "dr = h*tan(ar)". Refraction in the flat bottom can be skipped since the background is most probably touching the lens directly. Multiply 'dr' with (x, y) and you got the distortion for one point.

Since lens effects were declared as being cool and Ben had a rather "anticlimactic" way of solving it, I thought I'd just bring up the details for the interested :) There are of course simpler ways (like setting radial displacement as "dr = scale*r"...), but "true" simulations can be fun.

EDIT: Is it just me, or do people stop posting whenever I try to start some weirdo discussions involving maths/physics in programming?


Last edited by coelurus on Wed 15 Feb, 2006 10:04 pm, edited 1 time in total.

Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Tue 14 Feb, 2006 5:00 pm 
Offline
Calc King
User avatar

Joined: Mon 20 Dec, 2004 6:47 pm
Posts: 2286
Location: Quebec (Canada)
pacHa wrote:
Nice stuff Ben :)

Just one thought : I wish your demos had a kind of 'storyline'. I mean, this one is - on this side - far better than Pixel Madness since it has a transition effect, but in the end it's still a few effects packed together. In other words, I'm impressed by the technical stuff (even if it's 'basic' trig =)), but as a whole it ends up as a tech show, nothing more imo. tr1p's lcbhaa was nicer from this point of view.

Take it as constructive criticism !
maybe he should make a game with it :) or a standalone game intro like Final Fantasy 1.189 (with animations of course). Also I was wondering if those kind of special effects could be used as magic animations in BASIC and ASM rpgs *cough*new xLIB feature?*cough*

_________________
ImageImage
Bandcamp|FB|Youtube|Twitter


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Fri 17 Feb, 2006 10:09 am 
Offline
Maxcoderz Staff

Joined: Fri 17 Dec, 2004 5:33 pm
Posts: 790
Location: On the dark side of the moon.
coelurus wrote:
The lens effect is a very good example of a load-time generated distortion map, since you can change the behavior and various dimensions anytime to fool the audience that it's realtime :)

Pseudo-approach which I wrote off the top of my head:
Let's say you're on "(x, y) -> (r, t)" in the lens ('x' and 'y' are cart. coords, 'r' and 't' are polar). For a convex lens with the flat side down and the convex side being a spherical shell covering 90 degrees, the surface normal points with angle "an = r * pi/4" (direction pointing away from the center of the lens). The thickness of the lens, with sharp edges, is "h = cos(an) - 1/sqrt(2)". Refraction gives "n1*sin(a1) = n2*sin(a2)" which in this case can be written as "ar = an - asin(sin(an)/1.5)" where 'ar' is the angle against the vertical. Radial displacement due to trip the rays make through the lens gives "dr = h*tan(ar)". Refraction in the flat bottom can be skipped since the background is most probably touching the lens directly. Multiply 'dr' with (x, y) and you got the distortion for one point.

Since lens effects were declared as being cool and Ben had a rather "anticlimactic" way of solving it, I thought I'd just bring up the details for the interested :) There are of course simpler ways (like setting radial displacement as "dr = scale*r"...), but "true" simulations can be fun.

EDIT: Is it just me, or do people stop posting whenever I try to start some weirdo discussions involving maths/physics in programming?
Nope it's not you, it is in fact true :roll:

_________________
"They say that sea was created by a man named Maarten Zwartbol, a long time ago...." - Duck, an old Corbin version


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Fri 17 Feb, 2006 11:29 am 
Offline
Maxcoderz Staff
User avatar

Joined: Thu 16 Dec, 2004 10:06 pm
Posts: 3064
Location: Croydon, England
coelurus wrote:
EDIT: Is it just me, or do people stop posting whenever I try to start some weirdo discussions involving maths/physics in programming?
It's more like I don't follow what you're saying; the maths tends to confuse me a lot (which is why I used my horrible solution).


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Fri 17 Feb, 2006 12:43 pm 
Offline
Calc Wizard

Joined: Sun 19 Dec, 2004 9:02 pm
Posts: 585
Location: Sweden
Oh, but I hope that's not reason enough to abandon a thread? These threads are the most viable regarding realtime calc programming, so start discussing something else that's relevant (not "could somebody make a game out of this?"). I'm happy as long as threads like this one are active, knowing that this forum is used to further calc tech, not just for chit-chat.

I wouldn't even mind a bit if my ramblings were totally ignored as if they had never been there :)


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Mon 20 Feb, 2006 11:22 pm 
Offline
Sir Posts-A-Lot

Joined: Tue 09 Aug, 2005 9:34 pm
Posts: 252
Location: south of the north pole
Totally AWESOME!!! That blew my mind...

_________________
cheese=yum
Image


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Tue 21 Feb, 2006 6:58 pm 
Offline
Calc King

Joined: Sun 27 Mar, 2005 4:06 am
Posts: 2195
Location: sleeping
This thing is INSANE!

_________________
Image


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Wed 22 Feb, 2006 2:28 am 
Offline
Calc Wizard

Joined: Wed 22 Dec, 2004 5:37 am
Posts: 680
Location: West Palm Beach,FL
nice work ben, the graphics are crazy.

_________________
Blog, programming, life, yep
Free Ipod w/ video playback!


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Mon 27 Feb, 2006 5:26 am 
Offline
Calc King

Joined: Sat 26 Mar, 2005 2:45 am
Posts: 1619
Location: your shadow
HOLY SHIT! Dude, that was...I mean, how the...what on the...ben, you need to...well...make something more out of these...because it seems like a travesty something so beatiful would be JUST a tech demo.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 29 posts ]  Go to page Previous  1, 2

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB ® Forum Software © phpBB Group | DVGFX2 by: Matt