biter_fow - Fog of War

Status
Not open for further replies.

Skunk

Melody Master
Veteran
Joined
Mar 2, 2013
Messages
1,069
Reaction score
398
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,074
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,074
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,074
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,623
Reaction score
1,440
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,074
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,623
Reaction score
1,440
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,074
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,074
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,074
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,074
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
15,373
Reaction score
8,536
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.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

Our latest feature is an interview with... me?!

People4_2 (Capelet off and on) added!

Just beat the last of us 2 last night and starting jedi: fallen order right now, both use unreal engine & when I say i knew 80% of jedi's buttons right away because they were the same buttons as TLOU2 its ridiculous, even the same narrow hallway crawl and barely-made-it jump they do. Unreal Engine is just big budget RPG Maker the way they make games nearly identical at its core lol.
Can someone recommend some fun story-heavy RPGs to me? Coming up with good gameplay is a nightmare! I was thinking of making some gameplay platforming-based, but that doesn't work well in RPG form*. I also was thinking of removing battles, but that would be too much like OneShot. I don't even know how to make good puzzles!
one bad plugin combo later and one of my followers is moonwalking off the screen on his own... I didn't even more yet on the new map lol.

Forum statistics

Threads
106,033
Messages
1,018,441
Members
137,820
Latest member
georg09byron
Top