Status
Not open for further replies.

Skunk

Melody Master
Veteran
Joined
Mar 2, 2013
Messages
1,081
Reaction score
423
First Language
English/Slavic
Primarily Uses
RMMV
I am very confused as to what exactly this does.. what is "fog of war"? the black on the screen?
 
Last edited by a moderator:

Lantiz

PunyMagus
Veteran
Joined
Dec 29, 2012
Messages
723
Reaction score
1,075
First Language
Portuguese
Primarily Uses
Other
Yes, that effect of revealing the map as the player walks.


Like this one: link to youtube
 
Last edited by a moderator:

Lantiz

PunyMagus
Veteran
Joined
Dec 29, 2012
Messages
723
Reaction score
1,075
First Language
Portuguese
Primarily Uses
Other
It's tile based so it's possible to change the shape chosing the tiles to be revealed around the player, some shapes won't fit the design to work with a changleable view range as a radius tho.


I've done another one with round corners (see it here) but I could not manage to save it when the player saves the game, so everytime the map is loaded, the fog of war is rebooted.
 
Last edited by a moderator:

Crashic

Villager
Member
Joined
Nov 10, 2014
Messages
19
Reaction score
6
Primarily Uses
Hey. Thank you did it :)
But what am I doing wrong?

RPGMV_2016-07-13_18-57-27.png

Game_2016-07-13_18-57-16.png
 

Lantiz

PunyMagus
Veteran
Joined
Dec 29, 2012
Messages
723
Reaction score
1,075
First Language
Portuguese
Primarily Uses
Other
There was a bug and has been fixed. You can download it again.
 

Jonforum

Veteran
Veteran
Joined
Mar 28, 2016
Messages
1,640
Reaction score
1,468
First Language
French
Primarily Uses
RMMV
It's tile based so it's possible to change the shape chosing the tiles to be revealed around the player, some shapes won't fit the design to work with a changleable view range as a radius tho.


I've done another one with round corners (see it here) but I could not manage to save it when the player saves the game, so everytime the map is loaded, the fog of war is rebooted.

this one are geat with canva 


http://codepen.io/zyklus/pen/prvnb
 

Lantiz

PunyMagus
Veteran
Joined
Dec 29, 2012
Messages
723
Reaction score
1,075
First Language
Portuguese
Primarily Uses
Other
Yes, the one I linked was made using canvas, the problem is that I didn't find a way to store the map canvas when saving the game.


It's drawn in a Bitmap object which has a cyclic reference with it's parent, so I can't parse it into a JSON object to store in the save file.
 

Jonforum

Veteran
Veteran
Joined
Mar 28, 2016
Messages
1,640
Reaction score
1,468
First Language
French
Primarily Uses
RMMV
Yes, the one I linked was made using canvas, the problem is that I didn't find a way to store the map canvas when saving the game.


It's drawn in a Bitmap object which has a cyclic reference with it's parent, so I can't parse it into a JSON object to store in the save file.

am not shure but.


var ctx = canvas.getContext('2d'); //Get canvas and context
ctx.restore(); //So this should restore the canvas to what I save earlier, right?
ctx.save();




or

Code:
var lines = JSON.parse(localStorage.getItem(canvasName));
lines.forEach(function (line) {
    ctx.beginPath();
    ctx.strokeStyle = line.color;
    ctx.moveTo(line.x1, line.y1);
    ctx.lineTo(line.x2, line.y2);
    ctx.stroke();
});
 

Lantiz

PunyMagus
Veteran
Joined
Dec 29, 2012
Messages
723
Reaction score
1,075
First Language
Portuguese
Primarily Uses
Other
Im not sure also, last time I tried, I needed to stringify the bitmap, where it was failing.


I'll probably remake that canvas plugin when I have time, maybe it works this time.


EDIT: I won't change it anymore, please check the first post.
 
Last edited by a moderator:

Lantiz

PunyMagus
Veteran
Joined
Dec 29, 2012
Messages
723
Reaction score
1,075
First Language
Portuguese
Primarily Uses
Other
Updated and fixed.


Even saying I would not change it, I took the time to fix the save bloating.


The fog of war won't be save anymore and it's going to reset everytime the player enters the map.


Also there was a bug and was not working at all, no one told me before... but it has been fixed and is working nicelly.
 

Sidbot

Villager
Member
Joined
Oct 16, 2012
Messages
21
Reaction score
4
Primarily Uses
This is cool, I hope you keep working on it.
 

Lantiz

PunyMagus
Veteran
Joined
Dec 29, 2012
Messages
723
Reaction score
1,075
First Language
Portuguese
Primarily Uses
Other
I'm not sure if there's much to add to it [:
 

Lantiz

PunyMagus
Veteran
Joined
Dec 29, 2012
Messages
723
Reaction score
1,075
First Language
Portuguese
Primarily Uses
Other
Updated:


v1.03 - Fixed reset after pushing a new scene. It won't reset on scene transitions anymore (like shop)
 

mlogan

Global Moderators
Global Mod
Joined
Mar 18, 2012
Messages
16,689
Reaction score
9,243
First Language
English
Primarily Uses
RMMV

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

 
Status
Not open for further replies.

Latest Threads

Latest Profile Posts

Signing divorce papers today. Still makes no sense to me that this is a step I need to take to get my hubby the help he needs and deserves :( Life is strange people and sometimes it throws you a curve ball you have no chance in hell of catching
Just laid down a sick nasty new post in the MagiCats! Infinite Sadness thread! Lemme give ya a big ol' hug for it.

bg6.jpg
MacAdams wrote on Frogboy's profile.
Hey is there an MZ set of D&D style plugins yet?
Wheel of Attacks.png

MORE GAMBLING THEMED ATTACKS!

I AM UNABLE TO STOP!
Is it ok to repost stuff that i've posted to threads in the status feed?
If so, here's art of Shiloh, the main protagonist of the game i'm making:20220807_181702.jpg
They are meant to be ambiguous in gender, like Frisk from Undertale or Gogo from FFVI. I haven't decided what their age will be yet. Any ideas?
Please comment what you think about the art and design!

Forum statistics

Threads
124,468
Messages
1,163,880
Members
163,294
Latest member
Monochrome4992
Top