Hair Physics

Game progress has slowed down somewhat over the middle of this year, but I’m hoping for it to start picking up momentum again. I decided to show off some new hair physics I’ve been working on. I had made the changes to the physics engine required to make this possible some time ago, but I decided to finally get around to implementing the hair physics themselves.

activity_screen.png
WIP RPG activity screen

I’ve actually a lot more features which are almost complete which I plan to show off in the coming weeks, including an SMS messaging system, RPG stats and activity system, real-time mode, a character creation system, more visual novel features, and functioning weather effects with clouds. Please check back soon.

Slow Month, But Update…

skinship

Don’t worry, I’m still alive. I just haven’t had much chance to work on stuff specific to the game over this past month, things have just been very busy. On one hand though, I have added some new features to the engine which might of interest to people interested in the underlying technology of the game.

The most notable of the engine features I have now is an experimental live script reloading system, which to put it simply, allows me to edit the game logic while the game is already running. This should help significantly with prototyping and iteration, and I imagine will also be very useful for people who want to make mods. I’m quite proud of this feature and I’m hoping it will be available in the mainline version of the engine soon. I’ve also made significant progress on the occlusion buffer feature, which mainly requires me to write my own software rasterizer from scratch, though exclusively concerned with the depth buffer. With this in place, it should be possible for me to start including larger locations to explore. Smaller features including a new multipass material system which should replace the hacky method I’ve been using so far for handling character outlines, as well as new controls for customizing shadow casting options of game instances. Most other things are minor features and bug fixes.

That said, the big thing I wanted to show off, in line with my objective to introduce new gameplay mechanics is a new skinship minigame. I was hoping to show that off today, but unfortunately I’m still waiting on some extra sound and graphical effects to be made before. Also, I’m going to be away for the next four days and will be unable to really do any work on the game or engine at all, though I may still be able to answer questions. When I get back though, I intend to finish up the minigame and show it off.

See you then 🙂

Obligatory Valentine’s Day Post

obligation

‘Hmph…well it’s Valentine’s Day today. I don’t even care, it’s just another pointless ritual designed to ostracise and mock anyone in society who refuses to participate as being a NEET virgin loser. Utter nonsense. Oh well, there’s no real purpose in trying to fight it this time, and I guess you are my senpai, so you might as well take your stupid obligation chocolate.’

So yes, Happy Valentine’s Day…I guess. Like this character quote, I don’t particularly care for the holiday, but given the subject matter of this game I felt I had to acknowledge it in some way, so I decided to do this drawing. Yeah…

Anyway, even if you’re not celebrating Valentine’s Day with another person, you can still spend it chilling with your favourite anime waifu.

As for the game, it seems that according to the poll the majority of people would like me to focus on implementing stat-building gameplay first and foremost, so that’s what I’ll do. That said, I’ve actually already gone ahead and implemented the VN engine extensions I’d hinted towards including menu choices, conditional branching, and inline code embedding. My test cases compiled and executed code as it was needed, but now it get pre-generated when the game starts and should suffer no significant performance penalities. I’m generally quite proud of how elegant this solution turned out to be, and although I haven’t got much to show for it yet, the way it’s implemented has basically limitless possibilities since VN scripts can now interface with any aspect of the game logic. I’m actually going to be using this system to implement a lot of the stat-building gameplay since it’s very easy to work with and choice menus are quite flexible in regards to implementing a lot of basic gameplay options.

screenshot_0029.png

Another thing I worked on recently is that I stepped forward and managed to get GPU skinning working, which is something I’ve mentioned several times as something which will likely be important in improving performance when it comes to rendering characters. It does indeed improve things, but there are still other issues making the game slow right now that it’s hard to fully assess things. Regardless, this is an important step forward, and introduces the possibility of soon being able to have more characters rendered in a single location.

I apologise again for anyone who’s still waiting for playable updates, but I’ve still got lots of newly introduced glitches and bugs I want to iron out before putting anything else out there. It will still be happening soon, but I want to get it as polished as I can before doing so.

Day/Night Cycle with Procedural Scattersky

I’m putting a strawpoll here to help me determine which of these two features you would prefer for me to focus on next. Please read the second to last paragraph to understand exactly what each would involve and require before voting (http://strawpoll.me/6632748).

Okay, sorry for the delay without any further significant update, but I started working on one of the features I’d promised in December and really wanted to get it working as a functional prototype before doing anything further. Here’s a video of it being shown off with some music generously contributed by OnlyWednesdayMusic. What this feature is is mainly a skydome with the sky’s colour and atmospheric scattering determined through algorithms rather than a static cubemap as it was before, primarily Rayleigh and Mie which are a tried and tested approaches to a feature like this. To my knowledge, this is the first time such a feature has been implemented in the Godot engine, and while some aspects of this implementation were inspired by the implementation in the Torque 3D engine, it is mostly implemented from scratch in the engine’s own intermediary shader and scripting languages.

This feature should be easy enough to implement in anyone’s Godot project now, but the only exception is two features exclusive to my fork of the Godot engine, that is the ability to create a single render viewport out of multiple cameras ordered with a new ‘depth’ property, and the ability to tint the baked lighting in realtime for the full effect. The way it is structured is there is another spatial scene in the root of the tree which contains the skydome, the sun model, another camera, and a directional shadow-mapped light which acts as the primary light source for an entire scene. This scene is hooked into the already existing timeflow system which determines the state of clocks in the world, and then I use node groups (which is a very useful feature in Godot I wasn’t even really aware of before hand but really helps in managing such complex game logic) to update the skydome state. The first thing it does is run this information through an algorithm which, along with specifying a latitude and longitude value, theoretically provides the correct azimuth and elevation properties of the sun for a particular time of day based on where the scene would be located in the world, I then take that information and use it to determine direct and ambient colour based on customisable colour ramps, the direction of the sun, ect., and use this to map the appropriate values. Finally, I update the sky shader uniform with this information and apply the scattering algorithms in order to determine the final colour of the sky, which is rendered first and the rest of the scene rendered on top of it.

screenshot_0010
The sunsets can actually look quite appealling at times.

There are still some issues which I would like to tweak and polish further, but on the whole, I think it looks quite convincing for what it is. I still plan to include clouds and precipitation as part of this system, and while clouds should be fairly easy to do, precipitation will be more of a challenge due to the feeling that it would need to affect materials in the world itself to truly look convincing. Two more pressing issues I’m still working through are the facts that the character shaders have some serious problems when rendered at night time (basically coming out practically all black), and that since shadow mapping is largely a brute-force rendering technique requiring the scene to more or less be rendered twice from an orthogonal angle, the performance issues are again a large concern depending on the direction of the sunlight. I’ve also switched the default shadow mapping algorithm from PCF to ESM due to the shadows looking slightly off at certain angles, though you’ll be able to easily switch back to PCF even though that is not the primary source of the game’s performance issues; they still seem to be mostly related to scene traversal and skinned mesh rendering.

Now this brings me onto another participation-related request. Usually I have to take authority on where my efforts are going to be focused simply because I feel it’s necessary to develop a game as complex as this somewhat as a pyramid of features, focusing more on the foundation before implementing more game-specific elements, meaning a lot of the time I feel obligated to focus on one feature before it feels appropriate another as it would depend on the existence of the previous feature. In this case, this feature opens up a lot of possibilities of implementing stuff in the game related to time management. The core of the game, while more open-ended than most similar dating sims, is still going to based around balancing stats over the course of ingame months and even years, and having the game visually change to convey that certain actions results in time passing should help make these mechanics more convincing and impactful, as well as making the world feel more dynamic and realistic.

photograph_0020
Exploring the school at night time gives it a very different atmosphere. It actually feels slighty foreboding now.

That being said, I am now at a situation where I could focus on two main areas: I could continue to attempt to implement gameplay related activities which would include things like attending classes, studying, travelling between locations, and balancing stats over the course of several ingame months, and this feature, along with the fact that the protagonist’s apartment is mostly finished and just pending being prepared for the game itself, would make this viable direction to go. The other option is to attempt to implement something which I was going to hold off until later due to the perceived scope and complexity of what I wanted to get out of this feature, but would consider pushing it forward due recently discovering a quirk of the engine I might be able to exploit in order to cut out a ton of effort required to make this feature as powerful and flexible as I wanted. The game already has a rudimentary visual novel parser based off the Ren’Py scripting language, and it’s used right now for examining objects but not much else. The main thing that Ren’Py has that my implementation does not have is the ability to embed native Python code inside of the scripts which is what makes it so powerful. While it does not use Python, it does use a very similar language, and I may have discovered a way to dynamically execute native script code inside my custom VN script files in the same that Ren’Py does. This would automatically give me the full power of the game’s scripting language inside my custom Ren’Py-esque implementation without the need for any fancy parser of virtual machine which could potentially save a ton of effort and give practically unlimited flexibility. In fact, while I won’t promise anything, this may even result in the visual novel aspect of the game becoming robust enough that it could be spun off into its own independent project, giving VN creators access to familiar framework built on the foundation of a powerful, 3D-capable engine. Getting this feature in would primarily require three things: implementing this ability to embed native script code, creating some new idle animations, and writing some script for said scenes. I consider both of these features equally important to the overall experience, but I’m going to let my readers help determine what I should focus on first. I was going to add optimization overhauls as one of the potential options, but I decided I’d rather focus on something which would result in something more gameplay-related first, and neither feature should result in any further significant performance implications.

I still intend to put out another playable update of the game soon, but I feel I need to solve some of the newly introduced issues beforehand.

Inverse Kinematics

Update 1: Sorry for the delay again. I actually decided to go off and work on one more big feature before releasing a new build, and it’s nearly done now. It just requires a bit more polish. I’m quite excited about this one since while it is another aesthetic feature, it actually plays a highly significant gameplay role. I’ll be showing it off in the next few days…

I just wanted to show off a short video with a new feature I’ve been working on: dynamic inverse kinematics. Inverse kinematics is a technique where the rotation of joints are dynamically calculated based providing the final position of the end joint. In this case, I’m using it in conjunction with a variety of raycasts in order to prevent the character feet from intersecting when walking on uneven surfaces. There will be a new build hopefully coming out in the next few days featuring a few minor incremental fixes and features, and I’ll try to include this as part of it.

On another note, it’s now officially 2016. Will 2016 finally be the year of waifuism? I guess we’ll have to find out.

Merry Christmas!

xmas.png

Nothing really special to show here, but I wanted to wish everyone who still follows this blog a very Merry Christmas. I’m working on some fixes for a few bugs I’ve had reported via email, but there should be some more interesting stuff coming very soon.

Stay tuned and thank you for following!

Advent Release – Second Test Build

(Update 5: Another build released which may solve the bug people have reported regarding being unable to interact with objects. If it doesn’t please send me the log files again. Ammendment: very sorry, but I forgot to update the download link to the latest version until just now. The latest version is actually ‘galatea_win32_public_build_2d.zip’)

(Update 4: New build provides logging and no longer causes player movement to freeze if object examination fails (but probably doesn’t fix the problem itself since I can’t reproduce it), proper interpolation for third-person camera motion, and mouse cursor no longer gets locked if the game window loses focus (Alt+Tab, ect.))

(Update 3: Another build has been released which should solve the crashing issue. I’ve had a chance to test this on another PC, and while I still haven’t discovered why it runs fine on my own machine, it seems related to texture compression. I also fixed a bug which resulted in the girl not being able to blink and a missing interaction hotspot.)

(Update 2: Based on the reports I’ve gotten, I’ve uploaded another build which is based on a hunch of what I think might be the problem. Again though, I can’t test this because I’m unable to reproduce the crash on my own system.)

(Update 1: Since I got a report regarding the failures in the loading screen I can’t reproduce myself, I’ve uploaded a new build which attempts to generate error logs. If you experience crashes or lockups at the loading screen, send me the error.log and console.log file found at C:\Users\$yourname\AppData\Roaming\Godot\app_userdata\Galatea via email)

window.png

Okay, I’m putting out the second major test build of Galatea tonight. You can find it on the download page. I understand this build has been a long time coming, but I’ve been trying to put as much polish into it as possible, and a lot of underlying systems were changed between this and the last release, which resulted in a lot of things breaking. While this build is still fairly light on what I would consider interesting content, this release does mark the first showcase of my character model functioning in the environment. She doesn’t yet do much, as that requires more animation and AI, but you can ask her to follow you and she does so relatively bug-free now from what I’ve tested. Due to popular demand, we also have a fully-functional third-person camera written from scratch which also seems relatively bug-free. While most people reading this blog are likely aware of these features, one new feature I haven’t yet talked about is the ingame music player.

music_player.png

What’s noteworthy about this feature is that as well as three original tracks contributed by AkiMiso (https://soundcloud.com/aki_miso), I have also made it possible for players to import their own music. Instructions on how to do so are contained on the downloads page and the included readme.txt file. There are many other smaller features, including rewritten player physics, making the key to the secret room easier to find, and a bunch of new configuration settings, but there are really too many to note down and I’ve probably forgotten most of them, so you’ll have to see for yourself. I apologise for the large download size by the way; I’m running into some issues with the engine’s image compression methods.

Things I Wanted to Include but Couldn’t Because of Reasons…

Although I’m generally happy with the level of polish in this release, there were several things I planned to release but couldn’t because I didn’t want to delay this any longer. There were going to be more random students using the same AI routines, but I’m still waiting on some engine optimizations which are needed to make such a feature practical. Along with that, we have several original hairstyles which I planned to include through console commands, but I ran into some last minute technical issues. These hairstyles are very high quality, and I’m looking forward to sharing them with you soon. I was also hoping to have the vending machine fully functional along with a few extra applications on the ingame phone, but I simply didn’t have time to complete them. A couple of people also contributed early localizations to the project, but again, I’ve not been able to include these due to some technical issues. I would also have liked to put in a small collection quest, but I simply didn’t want to delay this any longer. Hopefully though, some of these features may yet appear shortly; I’m hoping that I can get another smaller point release out before the end of the year to include some of them.

Where to go From Here…

For these first two major test releases, I generally focused around a particular theme, the first being the environment, the second being to get a character functioning in the environment. My next major focus is going to be the introduction of the actual gameplay flow and mechanics. Although I don’t have anything substantial to show for it yet, I have already implemented the databases which are intended to be the backbone of the how the game functions. Basically, some of the planned features are as follows: a working day/night cycle (possibly) with weather, player stats, the ability to attend classes and other activities such as studying, travel between your home and the school, more random students, and expansions plus visual improvements to the school environment, particularly the outdoor area, but this is dependant upon how optimized we can get the engine. Basically, I want the ability to play out a fully functional albeit basic gameplay loop. The introduction of the databases will also make it fairly easy for people who want to mod the game. In the next few days, I’m planning to reformat my computer and install some new hardware, and since I’m doing that, I plan to get a Linux port out. I may also be moving my entire development system to Linux too, since all the tools I use on a regular basis in developing the game are open source and run on Linux.

https://galateaproject.wordpress.com/download/

Anyway, I might have more to post soon, but for now, enjoy.

Improved Character Model and Speech Bubbles

Okay this is a fairly small update, but I just wanted to demonstrate some things I’ve been working on. I’ve made some effort to address some of the concerns people raised regarding the quality of the character model, and while it’s not a complete overhaul, I’m hoping it is a significant improvement now. As well as tweaks to the body and face, she is also using a brand new shader which features artist-defined warped half-lambert shading, subtle rim-highlights, view-dependant outlines which resize depending on camera distance, and material-specific colourized shadow-mapping. My hope is that this shader will help the characters look better in more varied lighting conditions. I have also fixed some bugs with the morphing system I showed many months back connected with using meshes with UV seams, which actually went unnoticed before since the test models I was using all had separated UV faces. You may notice the blinking which I feel goes a long way to improving the character’s sense of believability in the world.

screenshot_0104.png

I am also showing off some new speech bubbles which will allow characters to talk and interact outside of the visual novel segments. My plan for this is to create a whole dynamic rule/response which will choose appropriate phrases depending on the state of the character, player, and the world.

I also added MSAA-support to the engine, probably the best form of anti-aliasing albeit with a significant performance cost, but I will likely be using this in all future forms of media released for the game from now on, and it will be available to anyone with a machine which can handle it. It’s actually not as big of a performance hog as you might expect, since most of the game’s performance problems are currently CPU-bound rather than GPU-bound.

 

I probably would have had more to show, but unfortunately during my work on this update, I suffered a very severe crash which resulted in me loosing several days worth of work. I keep very frequent backups and utilise revision control, but I still lost my uncommitted changes as a result of this crash, which slowed me down and actually burnt me out quite a bit having to rewrite code I had already written. I will be sure to take more meticulous precautions in future in order to prevent any similar issues from occurring.

I’m at least back on track now so expect something more interesting coming soon.

Basic AI Navigation and Pathfinding

Here’s another short update and video. I’ve been experimenting with basic AI navmesh pathfinding and navigation. For the NPCs, I’ve refactored the player’s movement code in such a way that it can be used by NPCs too, and while I was doing this, I also redid the movement code yet again to solve most of the physics-related glitches people had reported in the last playable build. When I release the next build, movement should be more stable and graceful. I’m going to focus mostly on polish and bugfixing, and then I may release another build shortly after featuring the AI character. Although I’ve gotten a lot of feedback on the character, I haven’t had time to do any further revisions just yet, but I plan to improve it in the near future. There’s also a feature which I think people might actually find really interesting which I may consider implementing soon, but I’m keeping it a secret for the time being since I don’t want to implicitly promise one way or another as to whether it’s actually going to be implemented, but I get the feeling it’s something people might find a lot of fun, especially with the project in such an early state.

Regarding, the translations, the response to this has been incredibly positive. I’ve been receiving early translations in Polish, French, Russian, Germany, Spanish, Italian, and Swedish. I would like to take this opportunity to thank everyone who has contributed translations so far. This is still something of an experiment, but so far, I think it is going very well. Galatea is still a very small project and this blog does not get much traffic, but it appears that for the traffic it does get, it seems to have a very international audience, so allowing even these early builds of the game to be enjoyed by people in their native languages can only be a good thing. I hope people will continue to send me further translations as the game develops.

First Footage of Original Character Ingame.

Sorry for the delay with this update, I ran into a lot of issues along the way, but I’m happy that I finally feel ready to share what I’ve been working on. The majority of my time has been spent on completing the character model I’ve been working on, rigging her, animating her, and finally getting her into the game. Getting this character into the game has raised some further issues though. Continuing what I mentioned a while back, performance regarding skeletally animated character is particularly poor in the engine right now, but I’m hoping this will be improved soon, and there are also various parts of the import process concerning animated character which are downright broken and will need to be addressed. Still, at least now you can see her in motion, and this should give you some insight into whats coming in the next major update.screenshot_0053A lot of the delays on this character came from feedback I got from a select few people who suggested a lot of improvements. I’m still not entirely happy with it, and will likely continue to improve it further, but I would really appreciate your feedback on seeing this character since this is actually my first attempt at character modelling, rigging, and animating. I am aware of some issues already like a slightly unconvincing run animation and the fact that the hair intersects with the body, but this will hopefully be solved with the introduction of physics simulations for the hair model.

Incidentally, if you’re an artist who thinks they can step in and improve this character, either via modelling, animation, or texturing, please consider contacting me.

Quick Localization-related ammendment

A few people have contacted me about wanting to translate Galatea into their own language. While there isn’t all that much to translate, I’ve decided to host the strings .csv file on a Github repository so people, if they want, can contribute translations of Galatea into their own language and I’ll include them whenever I update the game. Now, this won’t encompass all the strings in the game, and there are two types of strings which would both need to be translated for a full localization: generic system strings contained in csv files, and visual novel scripts written in a custom scripting language. While I will start to include some of script files, there is likely to be a LOT of narrative planned for the final game, and I don’t want to make everything public for the sake of story spoilers, and would generally prefer to work on this aspect with more professional localization people/teams. However, if you just want to have the base game available into your own language, feel free to translate what I have made available. The engine is unicode, so it should be possible to translate into any language, but there might still be some font issues related to CJK and right-to-left languages which I don’t yet know about.

Now, about git. I understand that git is very complicated for non-programmers (and even quite a few programmers), but since the strings in the game will be subject to very frequent change, I want a system which instantly allows me to update and revise data in the same way I work on code. This of course means that translations will become obsolete very quickly, so you will be responsible for making sure your translation remains in sync with the rest of the game. If git is too complicated for you to deal with but you still want to translate the game, just click the ‘Download Zip’ button on the Github page, and send me the updated file via email and I’ll commit them for you. Either way, you can find the first .csv file in the game here (https://github.com/SaracenOne/galatea_localizations).