Creating A Screen Overlay With Bitmaps in JS

Hayolee

Villager
Member
Joined
Jan 18, 2015
Messages
28
Reaction score
0
First Language
English
Primarily Uses
Hi!
I'm a little unfamiliar with the RPG Maker MV API, but I have worked in Javascript before briefly (not a master) just to give you some insight.
I'm currently trying to create a few plugins that need a screen overlay/bitmappy stuff. I'll list them both before I go into more detail:

1.) I want a very, very simple lighting plugin (I know there are some out there, but I'd like to make my own for certain... reasons)
2.) I want to have a hotbar (or, just one box) on the bottom of the screen

I'm not entirely concerned about these being glitchy or bug-free. I would prefer if when text appeared it did so over the hotbar, but beggars can't be choosers.

All in all, I would like to see some example code perhaps on how to create an overlay. If someone could point me to some documentation that would also be very cool.

For 1.) I plan on creating a circle around the player (so have the circumference and radius). I want to be able to have everything that's not in the circle around the player covered with black and almost barely visible, so I want it to be relatively opaque. I'm planning on doing this to kind of simulate a field of vision in the darkness. I also plan on updating it on player movement (so that the circle follows the player). I have some very rudimentary drawings for it here, one of them is demonstrating an idea I had with four circles and then coloring in the pixels around the circle black, but I've realized that if I can color pixels I just want to make a certain amount of them transparent. Not sure if this will work, but I'm willing to try both ways:
I'm having difficulty with bitmaps. Do I create a sprite that's black and somewhat opaque? Then do I create a circular bitmap on top of that and make it completely transparent? Do I need to create a sprite? Can someone please explain bitmaps to me?

For the 2.) I believed I would just create a basic box overlay at the bottom of the screen. Then, use like an if statement popup asking if the user wanted to put whatever item they just selected in their hotbar. If yes, then put an overlay/bitmap of the icon of the item on the box. I know there are a lot of things that could be glitchy in this situation, but I essentially just need a proof of concept before I focus on any of those things. I don't have any image examples of what I would like for this because it's just a little square box in the bottom center of the screen.

If anyone could point me to some examples, documentation, etc. it would be greatly appreciated. Also, I'm not sure if I posted this in the correct thread, so please let me know if I didn't, thanks.
 
Last edited:

Hayolee

Villager
Member
Joined
Jan 18, 2015
Messages
28
Reaction score
0
First Language
English
Primarily Uses
So, like, can I get a rundown on bitmaps/screen overlay stuff? The documentation I found is not incredibly helpful.
 
Last edited:

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

Latest Threads

Latest Profile Posts


The GIF of this seemed too cool to bury in replies. :LZSwink:
You may have slept with my aunt... but, given the circumstances, cheers.

- Professor Ian Duncan, 2013
Ami
--- Swimming ---

F.Knight: This Shrine always Flood. We don't have a choice,we have to Swimming in this place
F.Healer: That Insane!
F.Mage: We can use…Boat,rather than Swimming
F.Knight: You guys…Can't Swim?
F.Healer & F.Mage: (Shocked) Eehh??
Trying to get back, trying to get better...

Forum statistics

Threads
105,525
Messages
1,014,390
Members
137,206
Latest member
Kreinus
Top