Commit Graph

1379 Commits

Author SHA1 Message Date
Mathew Velasquez 78c4c3b9bf Niko/Journal for windows 2016-11-03 18:37:14 -04:00
Michael Shirt e80454a0d6 Adding fast travel destinations 2016-11-02 16:38:00 -06:00
Jonas Kulla 541e24f678 Bitmap: Use more accurate HSV-based hue shift algorithm
The previously YIQ-based algorithm turned out to be both slow,
and horribly inaccurate.

Another algorithm based on rotating the color value in the
RGB cube along the diagonal axis was also considered, which was
acceptable in terms of accuracy, and very fast.

In the end, I decided on a HSV-based one, because it is by far
the most accurate one, while still being a tad faster than the
YIQ solution.
Algorithm source: gamedev.stackexchange.com/a/59808/24839

A very simple GPU time benchmark when shifting a 2048^2 bitmap:

         YIQ rot   RGB rot   HSV shift
radeon   13.4 ms   2.8 ms    11.4 ms
intel    13.0 ms   6.0 ms    10.5 ms

radeon: HD 3650 mobility
intel:  N3540 integrated (Baytrail)

However hue shifting has never shown up as a bottleneck before,
so these are more academic.
2016-10-30 08:50:45 +01:00
Mathew Velasquez 50d64ea060 Window shaking 2016-10-29 22:22:22 -04:00
Michael Shirt 01b4e7e2a0 Fixing textbox width issue 2016-10-29 18:47:54 -06:00
Michael Shirt 2a03b10d7c Fixed a bug with quit_game_bed
The interpreter needs to +1 to the index before saving or else
quit_game_bed will have the game stuck in an infinite loop of quitting
the game when reloading, but we need to -1 immediately after because
otherwise the interpreter will skip a command after this is called.
2016-10-29 18:46:52 -06:00
Michael Shirt 01be2d6f4c Added 5th pixel puzzle for tower, S2 is no longer being used but will be left in the script anyways 2016-10-29 18:45:21 -06:00
Michael Shirt c7c4948817 Adding more footstep sfx for some tilesets 2016-10-29 18:44:48 -06:00
Michael Shirt 312672f160 Added courtyard as fast travel destination in Glen 2016-10-29 18:44:25 -06:00
Michael Shirt 1cba1adf66 Fixing bug with window prompts and adding credits message box
The game would try to catch up in frames when a window prompt was
opened, so if the window was open for 140 frames the game would process
the next 140 frames instantly after the game was closed.  To fix this, I
have the window prompt time how long it's opened and then I tell the
game to sleep for however many frames it was opened for.

Credits message works but does not yet have all the desired features,
will finish up later.
2016-10-29 18:44:06 -06:00
Michael Shirt d43e176b4c Footsplashes moved slightly lower to be more centered around feet 2016-10-22 20:10:13 -06:00
Michael Shirt ae62b5800d Added step sounds for endgame areas 2016-10-22 20:06:35 -06:00
Michael Shirt 6b91671ad0 Reducing house ambience
Cuz night said so
2016-10-22 20:05:21 -06:00
Michael Shirt 1750dc7c98 Changes to how the game handles quitting
With these changes the game technically never "allows" you to quit, and
instead the input is handled by Scene_Map.  This lets us run an event
before they quit.
2016-10-17 15:34:45 -06:00
Michael Shirt d403608189 Finishing footsplashes for the water room.
With these scripts the map properly loops and the footsplashes do as
well.  Footsplashes were also made bigger.
2016-10-17 15:27:52 -06:00
Michael Shirt 2e73c99b8a Fixes
Moved get_user_name back to where it belongs, and added self to the
wallpaper methods so they would be accessible from the event parser.
2016-10-15 01:06:27 -06:00
Michael Shirt cea46f76e8 Added footsplashes
These can be controlled with switch 101, to be primarily used in the
Tower area.

This isn't finalized yet but works as is atm, will be finished soon.
2016-10-13 18:32:34 -06:00
Michael Shirt f2368993d7 Made get_user_name script function
In the barrens during the prophet bot scene, the game was comparing the
entered name to Oneshot::USER_NAME.  But this was incorrect, as the name
could be either the steam name or the pc username and the name has some
preprocessing done to it.  With this new script function, we can compare
the name correctly
2016-10-13 18:32:34 -06:00
Michael Shirt ad48a874df 2 changes to basic text boxes
-If niko's character graphic is one of the gasmask graphics, change all
his facepics to the gasmask facepic
-User can now prompt text to show instantly by pressing action or cancel
while text is scrolling
2016-10-13 18:32:33 -06:00
Michael Shirt 99fbdf04cc Fixing a mistake with this script, should be checking for equality instead of inclusion 2016-10-13 18:32:33 -06:00
Michael Shirt 8314371b4f Rehauling the appearance of doc messages to look more like paper 2016-10-13 18:32:33 -06:00
Michael Shirt c04f442b0a Adding step sfx for the blue mineshaft 2016-10-13 18:32:33 -06:00
Mathew Velasquez 99c9a27f2a Wallpaper functionality restored for windows 2016-10-13 20:26:01 -04:00
Mathew Velasquez 0dc872bcea Journal screen stuff 2016-10-13 20:26:01 -04:00
Michael Shirt a0c9e2eeff Updating niko reflection script
Sink is no longer solid so the positioning of niko's reflection is
changed to "reflect" this.
2016-10-10 12:44:33 -06:00
Michael Shirt 77fdd558cb Added fadein functionality for bgm
This lets the user fadein bgm after using a normal "play bgm" command in
the event editor.  Just simply call "Script.fadein_bgm(target, speed)"
with the target being the target vol % that you want the fade in to
eventually reach and the speed being how fast you want it to reach it (1
- slowest, 100-instant)
2016-10-10 11:44:17 -06:00
Michael Shirt da01da31e7 Name checks
Checks for the name the player inputs, so that niko can have unique
dialogue for each situation.
2016-10-07 16:55:37 -06:00
Michael Shirt d884cbc2a6 Removing counter functionality of tiles
This was causing footsteps tiles in the barrens to allow the player to
interact with objects an extra tile in front of them, which was causing
issues (ex: letting players talk to doors through walls)
2016-10-07 16:54:29 -06:00
Michael Shirt 436a0f996f Bathroom mirror reflection
The bathroom mirror now reflects niko, with the aide of these scripts
2016-10-05 20:41:16 -06:00
Michael Shirt 583499f004 Added codebg to scrolling bgs
Night wanted this bg to be a scrolling/clamped bg as well
2016-10-04 01:34:05 -06:00
Michael Shirt 73c6ae14af Added splash step for tower
For the water room in the tower
2016-10-04 01:33:36 -06:00
Michael Shirt ab9856ef22 Made loading respect the fixed camera
Switch 100 is the fixed camera switch, this makes sure the game won't
try to focus on the player for the first frame.
2016-10-04 01:33:18 -06:00
Michael Shirt 4939d4678d Added more step puzzle solutions/checks
For the step puzzles in the tower
2016-10-04 01:31:28 -06:00
Michael Shirt e1a834220c commenting out debug so game respects the debug setting better 2016-10-03 11:04:17 -06:00
Michael Shirt 316283c78c Added step sfx for tilesets that didn't have them yet 2016-10-03 11:04:00 -06:00
Michael Shirt 30e53b9998 Added another check for a dream-time flag (last one) 2016-10-03 11:03:45 -06:00
Michael Shirt 21104415cf Added flag check for dream 3 2016-10-02 11:44:14 -06:00
Michael Shirt 91f95bcd06 Clover flash
This gives the clover item a flashing effect if used.  Should also add a
check for a switch or something later so it only works in the maps
necessary?
2016-10-01 06:21:55 -06:00
Michael Shirt 3f6034ae10 Fixed followers not following niko
Followers still weren't following niko after loading a save, but this
code fixes that.
2016-09-29 19:53:03 -06:00
Michael Shirt 5d30984821 Camera functionality added
With this we can now fix the camera to a set position.  I also added
script functions to get the X and Y of an npc, which is useful for
events.
2016-09-28 22:43:14 -06:00
Michael Shirt 6c1f0f8bf4 Added flag check for dream 2
Will probably add more checks as dreams 3 and 4 are done
2016-09-28 22:41:34 -06:00
Michael Shirt 9514e2dfa3 More changes to player footstep sfx 2016-09-27 10:30:10 -06:00
Michael Shirt 0b3fc4527b Added fading water animation for blue and green areas.
This cycles the panorama through 3 different images, fading them in as
they show up.
2016-09-27 10:29:53 -06:00
Michael Shirt 4ebcd19352 Made auto saving/loading fully functional
With this, autoloading upon launching the game should be fully working.
Also added some randomness to the pitch of step_sfx to make them sound a
bit less repetitive, and made it so the game can only save if the
current scene is a Scene_Map (because auto_saving at the titlescreen
breaks things pretty badly).
2016-09-26 08:59:21 -06:00
Michael Shirt 154681d853 Added Message box functionality
This adds 2 new things to the vanilla text box.  "\>" will now make the
script wait for user input before continuing to display text.
"\@facepic_name" will change the face graphic to facepic_name without
needing to reopen the message window.
2016-09-26 08:55:01 -06:00
Michael Shirt c0bd0ff2f7 Adding real_load function
Just so I have something I can call ingame to load the "real save"
2016-09-23 17:55:53 -06:00
Michael Shirt 876316ac22 Changing look/color of Doc Messages
Now it looks prettier, as per Night's instructions.
2016-09-23 17:54:34 -06:00
Michael Shirt 2a8c3bd62f Changed Password Input colors part 2
Reordering the colors
2016-09-22 14:36:10 -06:00
Michael Shirt 5e3470a1c4 Updated Safe puzzle
Document is now named "DOCUMENT.oneshot.txt", and flavor text for the
document has been added in.
2016-09-22 14:35:37 -06:00
Michael Shirt 7aade486cf Adding Desktop Message
Displays messages for the Desktop screen, can  be called with "@desktop"
just like how "@ed" calls ed messages.
2016-09-22 14:34:33 -06:00