#Game_screen
Explore tagged Tumblr posts
Link
Jacob Roach / Digital Trends Microsoft is working on a new patent that aims to bring unprecedented levels of control to displays. The new technology, called Pixel Luminesce for Digital Display, lets you micromanage every pixel on your display,... netgainers.org
0 notes
Link
Play Brain Baazi. Answer simple questions and win daily cash prizes. Use my code "krnlevd" to sign up. main, Jeete India!
3 notes
·
View notes
Text
Purple for poison, red for pain
Forward - my first of (hopefully) mini-code quests/how-to’s involving RPG Maker VX Ace and the things it does not do out of the box but really should. Any code create here is free for y’alls to use - but remember me for free copies of things you make and positive praise ;)
RPG maker VX ace has floor damage and slip damage (poison, otehr stats, etc.) support built in, but both flash the screen red. Nice for saying “Ouch, something hurt you” - but in a situation where more than one ‘something’ may be hurting you (party is a combination of poisoned, burnt, and bleeding and the user decides to walk onto a lava tile) - what hurt you? I want the screen different colors for different states - Red for world sources (lava tiles) and purple for ailments (we could do different colors per state... but not right now).
Where to start? A cntl+f for “slip” in the scripts window gets us four results:
“def max_slip_damage” on line 756 of Game_Battler looks good, lets go there!
Line 757 says that slip damage cant kill a hero, unless you checked the box that said it could. Cool, but not what we need. Cntl+F the function name within the script (or scroll up some 7 lines) and we see where it is actually used (line 750). Right above it, we see
perform_map_damage_effect
This looks promising, except for the ‘if in battle’ bit... So this code only tints the screen red in battles (which makes sense - the class is named “Game_Battler”). Wrong place, but the function looks correct, so lets fire up our good friend cntl+f and search for ‘ perform_map_damage_effect ’ in all the scripts.
Game_Actor comes back with three hits. One for floor damage, one for status ‘ticks’ on map, and one defining ‘perform_map_damage_effect’ yet again. The first two prove our theory about red screen tints for both ailments and map damage, and the third points us where to go:
def perform_map_damage_effect $game_map.screen.start_flash_for_damage end
We could cntl+f for “start_flash_for_damage” or jump to Game_Screen (see the variable path?) - either way, we end up on line 231 of Game_Screen where we see:
def start_flash_for_damage start_flash(Color.new(255,0,0,128), 8) end
No matter how we get hurt, its always red... time to change that. We want tow different colors, so we can copy and paste the function and change its color - right? It works, but what happens when we want a third color, or a fourth? Rather than have numerous functions doing the same thing (sans the color) we will make our own that will take any color we give it (and it will like it).
First we make a new script above MAIN. We do this to redefine/add to pre-existing RPG maker code (a positive about ruby). And we do that for two reasons: 1. it makes it easier to find our edits if they are in their own file. 2. By keeping the internal RPG maker code the same we wont cause conflicts with other scripts and stuff that expect the original despite our changes.
So, our new script:
# telling the code we want to add to this class class Game_Screen
# Defines a new method that takes 4 variables: R, G, B, A # A is optional and if not given will default to 128 def flash_color_for_damage(r, g, b, a=128) #Call an 8 frame screen flash based on our RGPA given. start_flash(Color.new(r,g,b,a), 8) end end
# telling the code we want to add to this class class Game_Actor < Game_Battler
# this plays when we take 20 steps on the map and have states that hurt us def turn_end_on_map if $game_party.steps % steps_for_turn == 0 on_turn_end # adding the color - a nice fuchsia perform_map_damage_effect(255, 0, 255) if @result.hp_damage > 0 end end
# plays when we step on a damaging floor def execute_floor_damage damage = (basic_floor_damage * fdr).to_i self.hp -= [damage, max_floor_damage].min # adding the color - using default RED perform_map_damage_effect(255, 0, 0) if damage > 0 end
# Overriding the original to accept our 4 color numbers def perform_map_damage_effect(r, g, b, a=128) $game_map.screen.flash_color_for_damage(r, g, b, a) end
end
Done. Different colors for floor and state damage.
Future things:
1. If you use Yanfly’s battle code/stuff, he/she turned off on map status flashes... we should turn that back on to see our pretty purple.
2. Any state based damage will flash the screen purple. We probably want to flash the screen based on what status we have - right? Well... this isn’t as easy as it sounds - but not due to programming - more so design questions like which color to show if more than one state? All, just some, the most pressing?
We might cover these in the future...
9 notes
·
View notes
Link
Jacob Roach / Digital Trends Microsoft is working on a new patent that aims to bring unprecedented levels of control to displays. The new technology, called Pixel Luminesce for Digital Display, lets you micromanage every pixel on your display,... bitrise.co.in
0 notes
Link
MSI MSI may have some high-end gaming monitors, but unfortunately, some are obviously more desirable than others. A Reddit thread revealed that MSI won't allow firmware updates for much of its QD-OLED display lineup, and customers aren't happy... netgainers.org
#News#Computer_engineer#Computer_hardware#Computer_monitor#Computer_use#Computers#Game_screen#MSI#QD_OLED#Technology
0 notes