HTML5 Canvas
Page 1 of 1
PumpAction
[Schmadmin]



Posts: 26759

PostPosted: Tue, 2nd Jul 2013 21:13    Post subject: HTML5 Canvas
Was playing around on my way to work and then back home while sitting in the train Smile

http://pumpaction.prestige-gaming.net/canvas/

I was just excited to test some lighting and blend effects with canvas, never did that before Smile Actually wanted to program that with XNA but don't have that on my laptop right now and t.b.h it's so easy to do it with pure javascript :]

I will put the lighting calculations on a separate canvas and then scale the final canvas by 2 or 3 depending on the screen size... should help with the fps. Of course the background will be tile based, scrolling and shizzles, water reflections are also planned and active objects will cast shadows... And not fake ones like this shitty shadow which I just put there to see what the light additions look like.


=> NFOrce GIF plugin <= - Ryzen 3800X, 16GB DDR4-3200, Sapphire 5700XT Pulse
Back to top
LeoNatan
Banned



Posts: 73193
Location: Ramat Gan, Israel 🇮🇱
PostPosted: Tue, 2nd Jul 2013 21:25    Post subject:
Back to top
PumpAction
[Schmadmin]



Posts: 26759

PostPosted: Tue, 2nd Jul 2013 21:40    Post subject:
Oh, webkit only (opera next, chrome, safari & friends), firefox has bugs with "darker" blending.


=> NFOrce GIF plugin <= - Ryzen 3800X, 16GB DDR4-3200, Sapphire 5700XT Pulse
Back to top
sabin1981
Mostly Cursed



Posts: 87805

PostPosted: Tue, 2nd Jul 2013 21:45    Post subject:
Yeah, it's just a static image on Pale Moon; the page shows a Zelda LttP image and then goes black when I move the mouse over it - but loading up Chrome has it "work" but it's not accurate;

Back to top
PumpAction
[Schmadmin]



Posts: 26759

PostPosted: Tue, 2nd Jul 2013 21:47    Post subject:
The shadows do not work if you move the light sources below it. This is due to me being a lazy fuck and canvas not supporting inverted masks, but I already have a workaorund for that... in my mind Very Happy Will program that properly :]


=> NFOrce GIF plugin <= - Ryzen 3800X, 16GB DDR4-3200, Sapphire 5700XT Pulse
Back to top
sabin1981
Mostly Cursed



Posts: 87805

PostPosted: Tue, 2nd Jul 2013 21:49    Post subject:
Ah! Well in that case, it works properly on Chrome then Smile
Back to top
Page 1 of 1 All times are GMT + 1 Hour
NFOHump.com Forum Index - Programmers Corner
Signature/Avatar nuking: none (can be changed in your profile)  


Display posts from previous:   

Jump to:  
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 vote in polls in this forum


Powered by phpBB 2.0.8 © 2001, 2002 phpBB Group