Sunday, 26 August 2018

I FINISHED ON HER PREMATURELY AND THAT'S A GOOD THING, HERE'S WHY

wtf I love videogame journalism now.

Good to see you, anon. It's Sunday Progress Report time.
This week I finished up the first round of Battle AND Adventure modules and planned out a few days to replicating the Hentai scene engine from the old title in pure, sexy Javascript.
I've actually got it 90% finished in half the time I'd allocated, I guess the brainwork was already done and I was just figuring out a smart way to set it up this time.

Before: Each scene was scripted in its own event page with hardcoded values based on manually-filled counters (number of frames x time between frames), I'd give it a counter of eg. 459 frames, then tell it to count down.
Meanwhile my audio component would listen out for set frame numbers appearing and play a sound I'd told it to, based on horrific If/Else trees with every file again written in manually.
Result: 4 or 5 concurrently running scripts processing inputs, scene changes, calculations, dialogue, sounds.
Scripting boner: Floppy and a bit scared.

Now: I write out the bare minimum values in script, these are added together and use maths to work out which pictures I want to show and which frames I wanna play which family of sound, with sounds automatically processed to sound differently based on speed etc.
Result: About 200 lines of Javascript, to which I feed a single line and maths takes care of the rest. Thanks, Maths.
Scripting boner: Absolute and unquenchable.


Changes since last Sunday:
- Items can be scheduled as NEEDING to appear in a particular room, in containers, on enemies or both/either
- Trying to check underfoot while standing on multiple dead NPCs will give you a menu to select which (see below).
- NPCs have their equipped item appearing in their inventory
- Player can switch out their equipped weapon with any other they find in containers or on dead enemies
- Player sprite and attack animation update to match equipped weapon
- UI updates to match equipped weapon
- Faster generation of initial stat values for enemies
- Added new weapons and categories - unreliable but potentially deadly cable whips and ballistic firearms
- Overhauled UI to be more responsive and better laid out
- Difficulty balancing on combat, player takes less damage than before and regens a small amount per turn
- Animation scripting changes
- Stopped button press event listening during pause, nullifying crashes
- Objects and weapons directly copy, then overwrite rather than inherit and overwrite, meaning they persist through save/load and keep all their functionality. (explained below)
- Hentai engine recreated ( 90%, will be actually finished today)
- Hentai anims restart/reset current loop when returning from pause to avoid sound and audio falling out of synch
- Hentai scene system is clean, crisp and maximally reuseable- press button. receive bacon



During this week I ran into a HORROR scenario I wasn't really expecting or necessarily equipped to deal with.
On saving and loading games, it turned out that most items were reverting to their default parent type. I'm still learning JS so I don't know for sure, but it seems like inheritance of parent objects works as a link, fine for normal purposes, but that link is severed by RMMV's save/load game processes, so loading an old save would turn all your items from [Micro Cassette] into [item], the default parent object's '.name' value.
I spend what felt like hours on this and found that weapons weren't affected because it turned out how I handled weapon objects was slightly different, and the answer was to replace all shallow references with deep copies.
I rejigged the way I handled items to a way that made more sense to my brain instead of the old way I made following advice from Stack Overflow not meant for my application, and this problem went away but FUCKING HELL was I scared for about a day there.

That brings me up until today, I'll be continuing to work on the hentai system for the next few days.
Polls going out on Patreon shortly to get a better idea of which elements were liked in the last game, which I should scale back, which I should expand upon.

Thanks for reading, I'll check in again soon, getting very close to being able to go back to sexyposting.

Your pal,
Oko

Sunday, 19 August 2018

Sunday Progress Report

Hey, here's what I've been doing this week, getting pretty close to closing both outstanding epics (Battle and Items).



Battle:

- NPCs now have a proper 'dead' state, after which they effectively turn into containers.
- All erased events are removed from the $gameMap listing after battle, to free up their eventId and prevent rare weird bugs caused by Ids not being reassigned, or being reassigned incorrectly.
- Remove 'move' cursor when player starts walking to stop rare bug where event collision wasn't removed quick enough and the move route was cancelled- will revisit.
- 1-handed Quality of life improvements to battle controls, double click an action to confirm it, press any other action's button to cancel (press 3 to aim, press 3 again to shoot, press 1 to choose where to walk to, press 1 again to confirm and start processing move)
- General walk action refinements, removed some early, now-redundant checks and additional scripts
- Fixed a really rare, difficult-to-reproduce bug was fixed after weeks of vexing me- I'd accidentally given global scope to a single-letter variable, so under certain conditions it was being accessed and changed elsewhere, wrecking a concurrent for loop
- On the back of that, learned how to list all defined global variables and fixed all similar out-of-scope instances

Items:

- All NPCs and Containers have a priority for being picked up by the context system, so standing on dead NPC bodies won't prevent interaction with adjacent doors, living NPCs or containers or other high priority items occupying the same space as a dead NPC
- Dead NPC priority is affected by their inventory being full or not, stacks of dead bodies occupying the same position can be looted in turn systematically, empty bodies going to the bottom of the deck
- NPC and Container position, direction and contents stored and restored on exit/leave to circumvent the way RPGMaker resets events on room reload
- Contextual quality of life to container interaction, interacting with a locker before it's opened will open the locker, previously the player would need to open it with another key before being able to interact with its contents.
- Added item USE cases, which allow things like health regen by USEing food
- Added item pool probability to make some objects much more likely to show up than others.
- Added range for item quantities, so you're likely to come across a dozen rounds of ammunition, but only one handgun, for example.
- Set up item Schedule which makes 100% sure to place key items which NEED to drop in a specified room into a container or enemy inventory in this room.
- Player inventory, containers and enemy inventories are sorted alphabetically with key items listed alphabetically up top like:

Key A
Key C
Normal A
Normal B
Normal C

This happens once for containers and enemies on creation and happens for player on inventory open.
- Player inventory upgraded with the behaviour improvements I gave to containers last week


Misc:

I wrote about 60% of the story for the first mission last week, which informed some of my priorities this week and I've made 5 mins of new music, which I'd like to keep fresh for the first trailer, but I'll happily share on youtube if there's enough interest.

I spent two full days getting instruments and mastering set up to sound how I'd like and really happy with the results. Learning Javascript has also improved the way my DAW is set up, chaining instruments and effects more logically and things like that.
Hopefully my production sounds to others like the step up I think I'm hearing. It's hard to judge too definitively.

That's about it from me, this next week will be improvements to item lists, implementing proper weapon switching (switch out your main weapon with one the enemy dropped) and I think then it'll be complex enough to move onto completing the mission story and begin scripting it out.
I'll maybe take another day out to work exclusively on music, too, because I've got the bug.

Hope the week's been good to you,
Oko

Sunday, 12 August 2018

New game clarification and little improvements


Hey, so I know I haven't shown anything sexy yet.
Not so much as a pixel nipple, nothing.
This game WILL be an adult / erotic title, but right now I'm just handling gameplay and interaction.
I appreciate it's nowhere near as fun to look at as anime tiddies, but the good stuff definitely IS coming soon.

New game clarification:

A few people are asking if Lateshifter is dead or if there's going to be a continuation of the story from the last episode and the answer is to both of these is "nah, sorry".
LS was always supposed to be slice of life episodes without continuity, so even if I stayed with the exact setting, the next episode was always meant to be another anon with his own problems and work assignments. I figured if every time it was a different protagonist, there was always a chance he could die or goto jail or whatever else. There'd be no set 'canon' except the ending YOU get, and that's what's important to me.

The good news, though, is that I plan for this new title to be a continuing narrative, so there will be returning characters as well as ones you meet in passing, and it'll still be made up of contained smaller adventure releases.
This might mean a different release (.exe) for each episode, but it's inevitable that I'm going to want to build cool new features into later episodes and I don't really want to hold back for fear of breaking earlier episodes by improving systems to be more flexible, agnostic or intelligent later.

I also don't really want to do incremental patches every week, making you download ¬200mb every week to get 5 more minutes down the line.
That can work well for other devs but I'm not sure that's best the best approach for what I'm trying to do.

This new game will otherwise be an expanded version of the original formula but with a couple of tweaks:

>Minigames will be replaced with small scale combat and exploration
Because fighting & loot > arbitrary high score

>The game will be less cutscene-intensive, with the player retaining direct control for much more of the time.
Because Lateshifter: Night Rain was very much an on-rails experience, and the plotted movement of characters introduced a lot of bugs and scripting tedium

>The setting is expanding too, so we'll be getting out of the city

Because I want to have adventures with sultry babes on hot exotic planets, investigate spooky abandoned space stations, get lost on the first day in a big city or try to pass the time at a sleepy remote space port, rather than always be on the way to work in purple Hong Kong.

But all the art, music, story, characters, everything that makes LS good will be there in this new game, and if you're on the fence at all, I'm looking forward to swaying you back toward me because I know you're going to like it. It's going to be much, much better.

Improvements:


Made a few improvements to my systems for item interaction, item discovery and battle movement.

Battle:
- Changed cursor movement when laying out the move path in battle to teleporting rather than sliding into position, makes things much faster and fixed a low repro bug where player move would be skipped due to cursor not changing collision type fast enough.
- Removed a few deprecated extra checks, they were nice to have but it's needless extra calculation

Item discovery:
- Removed the last remaining on-tick check for items in front of player. I previously had a system where after the player moves or turns, a function checks for items in front of the player once, but this function was still being run and returned continuously.
- Replaced the circumstances under which this check will run, instead of running continuously and listening for player direction or position changing, it now runs once when:
- outside of battle and
- player direction changes or
- player has finished moving,
with no extra listening required.
Really happy to have removed these constantly-running processes, I've been eliminating them for the last couple of weeks and the performance impact is measurable.

Item management:
- Changed logic with containers so that the currently highlighted item will remain highlighted as long as its stack exists, then default to whichever item now occupies the same slot, rather than defaulting to the topmost selection after every action.

Misc:
- Text now displays immediately for all text use cases except for during character dialogue.
- Added a couple more menu/window themes

That's it from me, enjoy your weekend pal,
hope you can take her easy on my behalf!
Oko


Friday, 10 August 2018

Let's catch up!

Alright, so.
Without further apologies, let's get going.

For a quick rundown of the last few months, here's what's been going on:

February:
-------------------------


Spent whatever idle time i had trying to come up with a prototype for a simplistic on-map tactics battle system using a tileset I made for a small scenario I wanted to hide inside Lateshifter (like the cryogenic vampire scene from the original demo).
I wanted to spend a little while maybe making an RNG-heavy dungeon delving game, just to cheer myself up at having essentially lost my 'real' game, as with only a few hours to spare a week it wouldn't have been worth it to continue on trying to push that boulder uphill.

I learned a little doing this, came up with a neat idea for contextual button-prompts for all actions- sort of like MMO combat, but also used outside of battle to talk to, look at, open doors, depending on what was nearby.
I think subconsciously I was still trying to design for the one-handed.
I kept running into brick walls, however, and I couldn't get the system to be sustainable long term. I could start up and run a single battle, but I couldn't find a way without scripting to clean up everything and ready for re-use. I abandoned the idea and went back to sulking about losing my real game.

March - April - May:

-------------------------

Nothing of value. I spent some time trying to readjust to normie life, playing online shooters and watching TV, with limited success. I'm just not happy when I've no goal to work toward.
I started messing around with my old project files near the end of the month and decided to learn some Javascript so that I could have the option of editing and maybe getting some esoteric extra functionality I needed from existing RMMV plugins.
(Lateshifter is almost entirely evented, with very, very minor script use, which is a big reason why things like scripted movement of npcs was so buggy and got people stuck. More on that in the eventual retrospective, I guess).

I wanted to make my game, or an offshoot version of it more into a one-player D&D sort of experience, with sliding scale dynamic DMing sort of like the director in Left 4 Dead.
I figure the first thing I'm going to need for an adventurous game is a way to handle combat, then a way to handle items and interactions, the rest theoretically being ground already tread with LS.

From here on I've been checking in at the 10th of every month, logging the current state of the game in screenshots and movies to check how I'm progressing.




June 10th:

-------------------------

June 10th - JS total - 307 lines

Made a little proof of concept for a scripted version of February's battle system, or rather the beginning parts. I think within the space of a week i'd learned just enough to gather all map events and create a schedule for turn orders, so I'd push a button and all the events would spring to life and all move toward the player one square. Progress!

Most of the work done in this month was copying and editing examples from the internet, learning how to do basic things and copy pasting out of fear of spelling mistakes ruining everything.




July 10th:

-------------------------

July 10th  - JS total - 1670 lines


This is where the bulk of the work really started. Every single day working between 6 and 12 hours on learning Javascript and applying it. Above is a test I did with some opposing teams, seeing how well they knocked the shit out of each other. Pretty well, it turns out.

Battle:
- Full battle schedule with alternating AI and Player turns.
- added initiative to determine turn order
- Added a HUD with icons like in February's test game
- Ranged and melee units
- Bullet ownership for ranged units
- Object augmentation to add stats to events
- Framework to have stats determine other things like which sounds are played for that unit (weapon sounds depending on weapon, vocal sounds depending on npc race / sex
- Attack and Defense rolls for combat, modeled on simple dungeon crawler boardgames of the 90s
- Dynamic delay between turns, based on what transpired this turn
- Intelligent turn skipping for boxed-in units
- System to handle sprite animation and misc anim for various battle actions (attack, defend, hurt, death)
- Failsafes for various systems with warnings and error logging
- Ability to mark certain obstacles as half-height (can be shot over, not walked through)
- AI implementation, different units have differing behaviour types
- Player/npc relations to determine who is neutral or an enemy in battle
- Invisible projectile raycasting implementation to determine if players or enemies can actually hit enemies in range
Ranged targets now are enemies in range to whom there is a clear line of sight.


Other:
- Intelligent checking for objects in front of player
- Allow contextual actions depending on what sort of object is in front of player

August 10th:

-------------------------

July29th  - JS total - 2002 lines

August 9th - JS total 2828 lines
Really hard at it now, above shows one of the optional graphical filters I've added.
I've currently settings for old TVs, Lateshifter mode, """HD""" mode and basic filterless mode.


Battle:
- Camera automation
- Check that npcs are actually onscreen before proceeding with turn
- Dynamic target choosing for enemies, prioritize units attacking self, then enemy already targeted if in range, then closest enemy
- Missed projectiles carry on until hitting another impassable object
- Added rudimentary system to add enemies on the fly and integrate them to an ongoing battle if applicable
- Death animations and brief comic gore
- Added 3 more AI types
- Made existing AI types much more intelligent
- Made AI maleable, with injured enemies becoming more cautious
- Set special rules and extended range for pathfinding to be more intelligent
- Added failsafes for any AI troubles with error reporting (no reports yet)
- Weapon-agnostic battle changes
- Weapon pickups
- Intelligent UI for displaying current weapon
- Turn-long 'unsteady' modifiers for successful attacks on unready enemies

Other:
- Added series of graphic filters
- Added series of possible menu skins
- Added custom menu
- Custom menu options
- Repositioning all menu objects
- Changed object/npc detection to be more intelligent, prefer alive units when standing on dead
- Functions to automate number  x of enemy y spawning within range z of coordinates
- Intelligent auto-addition of newly created enemies to ongoing battle, allowing for scripted or cutscene late arrivals or adds.
- Container generation with dynamic and persistent contents
- Inventory system where objects can be removed from containers one at a time or all at a time, inspected and dropped
- Replaced all input common events with scripted event listeners, massively improving responsiveness
- Added battle juice, gore sounds


Which pretty much brings us up until today.
Thankfully I keep notes along with my backups to let me know what I did roughly since last one.
I probably should set up some sort of git repository, but I'm happy right now.

Now:

-------------------------


This week, I've added door pairing, allowing me to randomize which rooms will show up at the start of a new game, to give some replayability. Whether I'll make a lot of use of this or not, I'm not sure. Story beats will need to be more static, obviously.

Right now I'm working on the container system. I have dynamically created containers which get filled with items from a level list at their genesis. I'll be extending the item lists, weighting items to be more or less likely to show up and adding weapon pickups to the item system instead of being a separate thing.
I'd like players to be able to use items inside as well as outside combat, giving a cost to switching weapons or the ability to use suitable found items as improvised melee weapons (dragon di- I mean Iron Bars and cables haha) or ranged weapons (rocks, data tapes, small handfuls of change, whatever). It's a lot of fun seeing it come together.

That's it, catch you later on
Oko


Thursday, 9 August 2018

All systems online

Still alive, relatively safe, having another go at making vidyagaems.
I've been working on something every day for the last few months, but most of that has been learning how to Javascript, so I don't have anything graphic and sexy I'm ready to share just yet.

It's coming, though, and I'm confident this new work is better than anything I've done to date.
I've uploaded the LS OST to youtube meanwhile, because a few people asked for it.




Much love, sorry for the absence.
Let me know how you've been,

Oko