Dynamic Shadows (+Fullscreen)

Mods, guides how to use and install mods go right in here.
Post Reply
User avatar
Automatik
Posts: 1073
Joined: 20 Jul 2012, 17:54
Contact:

Post » 19 May 2013, 13:10

Download : https://www.dropbox.com/s/60u468gay94tz ... s-1_2.love
Old(1.1) : https://www.dropbox.com/s/z7p0y2ue7xz6j ... s-1_1.love
Older(1.0) : https://www.dropbox.com/s/9md8u8l1qd65z ... s-1_0.love

Scenario: Both the Mushroom kingdom and Aperture Science has been put into darkness by Bowser.
It's up to Mario to kill Bowser, using the light emmited from his portal gun to know where he walk to.

So, this is a mod that add Dynamic Shadows.(It require canvas support)
In other "words", it look like this:
ImageImageImageImageImage
http://i.imgur.com/zyfW0Zv.png
http://i.imgur.com/DdltBsx.png
How can you set the quality of the shadows? Well,there is a settings in the misc. tab of the options.
Image
And also, there is a "True" fullscreen mode.
Last edited by Automatik on 20 May 2013, 12:08, edited 3 times in total.

Camewel
Posts: 2996
Joined: 02 Feb 2012, 21:32

Post » 19 May 2013, 13:30

Is this GLSL, or...?

I'd like to add that this is beautiful.
My only suggestion would be to completely remove the HUD as it's pretty useless as it is and having it appear when you go to the top of the screen breaks the illusion slightly.

User avatar
Automatik
Posts: 1073
Joined: 20 Jul 2012, 17:54
Contact:

Post » 19 May 2013, 13:52

No GLSL, but I'm using a canvas and blend modes.
I'd like to add that
You mean, in vanilla?
My only suggestion would be to completely remove the HUD as it's pretty useless as it is and having it appear when you go to the top of the screen breaks the illusion slightly.
Mhh... I don't want to remove it because knowing how much time you've left, In which level you're in, or how many coins you have is useful. Maybe I should simply draw the HUD at the end, so that it's actually an Head Up Display.

User avatar
Mr.Q.Marx?
Posts: 849
Joined: 15 May 2012, 18:35

Post » 19 May 2013, 14:23

In fullscreen, I found the line of sight to be a few blocks off Mario, it still fired the same.
The darkness however is wonderful. I tried playing 'Into the Abyss' and was disappointed with the effect on it but every other mappaack I tried since was great.

User avatar
Automatik
Posts: 1073
Joined: 20 Jul 2012, 17:54
Contact:

Post » 19 May 2013, 15:27

New version:https://www.dropbox.com/s/z7p0y2ue7xz6j ... s-1_1.love
-Fixed line of sight being offset
-Lasers now don't light as much when blocked.
-HUD is now drawn on top on gameplay

User avatar
Costinteo
Posts: 705
Joined: 09 Mar 2013, 17:49

Post » 19 May 2013, 16:26

Oh my, this is... BEAUTIFUL!

It's really awesome.. With this mod great stuff can be done in mappacks. Should try and add a tile that has a light effect, like a Minecraft glowstone or something.
Also, if it can be done, it would be awesome if you manage to make tiles have a 7th property( properties like breakable/portable/etc) that makes the tile produce light.

You've done a great job. Here, have a star:
Image

User avatar
Automatik
Posts: 1073
Joined: 20 Jul 2012, 17:54
Contact:

Post » 19 May 2013, 17:30

A 7th propriety? That's a great idea. I've though about adding a light entity, but with this method, mappacks could stay compatible with vanilla.

User avatar
Superjustinbros
Posts: 2119
Joined: 29 Mar 2012, 20:39
Contact:

Post » 19 May 2013, 18:53

This looks badass.

Maurice
Stabyourself.net
Posts: 2145
Joined: 01 Feb 2012, 20:19

Post » 19 May 2013, 19:36

This is really cool.

User avatar
neosaneo5
Posts: 9
Joined: 02 Nov 2012, 01:10
Contact:

Post » 19 May 2013, 20:18

Checkmate, Slime.

User avatar
Qcode
Posts: 1479
Joined: 05 Feb 2012, 18:00
Contact:

Post » 19 May 2013, 20:18

...
Last edited by Qcode on 21 Oct 2021, 17:43, edited 1 time in total.

User avatar
LightningFire
Posts: 1828
Joined: 10 Mar 2012, 17:24
Contact:

Post » 19 May 2013, 21:56

This is just absolutely amazing, Auto. You have just outdone yourself.

User avatar
sonicthehaxghog
Posts: 38
Joined: 17 May 2013, 04:49

Post » 19 May 2013, 22:45

may i use this in my mod please?

User avatar
Automatik
Posts: 1073
Joined: 20 Jul 2012, 17:54
Contact:

Post » 19 May 2013, 23:33

yes.

HAPPYFACES
Posts: 524
Joined: 02 Jun 2012, 03:40

Post » 20 May 2013, 10:36

Amazing. Just amazing.

Do you think, that instead of just a circular dispersal of light, you can make conic directional lights? Like spotlights and such?

User avatar
Automatik
Posts: 1073
Joined: 20 Jul 2012, 17:54
Contact:

Post » 20 May 2013, 12:07

That's technically possible, but I don't see how it would be implemented. An entity will make mappacks incompatibles with vanilla mari0, and there is no vanilla entity that is supposed to do that.

--

Also,I've finished the 1.2 version!
-Tons of small fixes on disposition of lights.
-Tiles can now also emit light, with a 7th property! The color of the light is taken from the color of the pixel. The property will be activated if the pixel's alpha value is over 127.
-Shaders now works.
-Dyn shadows are disabled if it don't work.
Image
https://www.dropbox.com/s/60u468gay94tz ... s-1_2.love

ucenna
Posts: 615
Joined: 11 Jan 2013, 20:06

Post » 20 May 2013, 17:59

Automatik wrote:That's technically possible, but I don't see how it would be implemented. An entity will make mappacks incompatibles with vanilla mari0, and there is no vanilla entity that is supposed to do that.
How about a tile property that blocks light? Alternatively the 7th property, if completely black, might work.

User avatar
sonicthehaxghog
Posts: 38
Joined: 17 May 2013, 04:49

Post » 20 May 2013, 18:24

Automatik wrote:That's technically possible, but I don't see how it would be implemented. An entity will make mappacks incompatibles with vanilla mari0, and there is no vanilla entity that is supposed to do that.

--

Also,I've finished the 1.2 version!
-Tons of small fixes on disposition of lights.
-Tiles can now also emit light, with a 7th property! The color of the light is taken from the color of the pixel. The property will be activated if the pixel's alpha value is over 127.
-Shaders now works.
-Dyn shadows are disabled if it don't work.
Image
https://www.dropbox.com/s/60u468gay94tz ... s-1_2.love
yey now i can make it work in meh mod!

User avatar
Automatik
Posts: 1073
Joined: 20 Jul 2012, 17:54
Contact:

Post » 20 May 2013, 18:35

ucenna wrote:How about a tile property that blocks light? Alternatively the 7th property, if completely black, might work.
You might as well make your tile 100% black, since it has the same effect.

ucenna
Posts: 615
Joined: 11 Jan 2013, 20:06

Post » 20 May 2013, 18:43

I guess but the light could still be displayed past the tile (not that you couldn't put black tiles there too.)

User avatar
copy
Posts: 417
Joined: 17 Apr 2012, 16:29
Contact:

Post » 20 May 2013, 18:58

I was just about to ask if it worked with shaders!

User avatar
Jorichi
Moderator
Posts: 964
Joined: 11 Feb 2012, 02:08
Contact:

Post » 20 May 2013, 19:24

An awesome mod I must say. It makes the game a lot more dynamic, especially in the castle levels.
However, it's not really dynamic shadows... It's more dynamic lighting. Details, details.

Random thought that popped up:
If you could be able to make the light cast real shadows, by things blocking light (blocks, enemies, etc) you would create a whole new way of gameplay.
Think of Monaco's topdown perspective engine, except it would be the casting of the lights.
Amnesia: Mario's Dark Descent. Anyone? Give Mario a lantern and some tinderboxes and you'd be ready to go! Heck, if this would be done I'd make a mappack to go with it.

User avatar
Costinteo
Posts: 705
Joined: 09 Mar 2013, 17:49

Post » 23 May 2013, 19:33

Would it be hard to mod the portal gun to toggle the seventh property of a tile if it has it?
For example, if it has the seventh property and shot to toggle the light?
Image <--- example of possible toggling light tile. If shot toggles on/off property. Not sure if it is possible, I don't know how to code for now, but pretty sure it's easy to be done.

That would make a great beginning to what Jorichi suggested with Amnesia.

Also, probably it would be a good idea to have even an eight property that allows turning on/off the seventh property.
Actually you can just make an eight property that allows that by just pressing "e" near the tile.. Would that be possible, or do you need an entity for that?

User avatar
Automatik
Posts: 1073
Joined: 20 Jul 2012, 17:54
Contact:

Post » 23 May 2013, 19:46

If you could be able to make the light cast real shadows, by things blocking light (blocks, enemies, etc) you would create a whole new way of gameplay.
Blocks are squares, so they would just need to draw a polygon for every on-screen block. Ennemies howered would need a shader, and I don't know the needed algorithm.
Also, probably it would be a good idea to have even an eight property that allows turning on/off the seventh property.
Actually you can just make an eight property that allows that by just pressing "e" near the tile.. Would that be possible, or do you need an entity for that?
Possible.

User avatar
copy
Posts: 417
Joined: 17 Apr 2012, 16:29
Contact:

Post » 23 May 2013, 23:29

I'm no good at making mappacks, but I'd like to make one dedicated to this mod. Auto, please add a light entity or/and shadows in 1.3 for all the enjoyments. Thank you.

ucenna
Posts: 615
Joined: 11 Jan 2013, 20:06

Post » 24 May 2013, 00:13

I'd skip adding the entity. Although maybe one of the entities could be given a light function. Adding entities tends to break mappacks.

User avatar
Superjustinbros
Posts: 2119
Joined: 29 Mar 2012, 20:39
Contact:

Post » 24 May 2013, 03:57

ucenna wrote:I'd skip adding the entity. Although maybe one of the entities could be given a light function. Adding entities tends to break mappacks.
Seconded.

User avatar
sonicthehaxghog
Posts: 38
Joined: 17 May 2013, 04:49

Post » 25 May 2013, 02:48

dangit. i modified the file for the player and then the shaders no longer worked. :( . guess ill change it bak

Megadardery
Posts: 15
Joined: 07 Jan 2014, 22:45

Post » 08 Jan 2014, 21:23

Can you make a changelog of the original Mari0, so it would be easier to merge it with other mods?

User avatar
Automatik
Posts: 1073
Joined: 20 Jul 2012, 17:54
Contact:

Post » 08 Jan 2014, 23:03

Luckily, most of the code is in canvaslight.lua .
Here's the diff:http://hastebin.com/wudalecuru.diff

Megadardery
Posts: 15
Joined: 07 Jan 2014, 22:45

Post » 08 Jan 2014, 23:08

Well, thanks.. it is still sorta complicated though

EDIT: and as a suggestion, let the shadow be disabled or enabled with an option.. Yeah that would be great!

User avatar
Automatik
Posts: 1073
Joined: 20 Jul 2012, 17:54
Contact:

Post » 08 Jan 2014, 23:18

Well, sorry, but I'm not working on this mod anymore.

Post Reply