Thursday, September 3, 2026

Sophomore Mysteries - Post-mortem.


Preface

I say “post-mortem”, but no-one knows what Sophomore Mysteries is as it was never finished. (So I guess its a ... pre-mortem?) Its the original project of the “Zero” version. “Zero?” Well its a sort of a short prequel, introduction to Sophomore Mysteries. (Here’s a link to itch.io for a free copy of it, and more about this at the end.)

I’ve wanted to do my very own point and click adventure game since forever. I’ve been playing these games since kid; Full Throttle, Space Quest, The Dig, Gabriel Knight series… list goes on and on. “I do have an idea, why not make it into a game. I’ve dabbled a bit with game making, I’ve released a thing already, I’ve been doing beta testing for point and click games for some time now so why not.”

There were a couple of things that have been bothering me since forever, how you have to do some things in a specific order that should make sense to be able to do in a different way as well. Like the staple of point and click games where you have to combine two things to form another thing. And thing number one is in your inventory and thing number two is on the floor right there in front of you. Why do I have to pick it up first and then combine everything in my inventory? Why can’t I pick the piece I have already in my inventory and put it on the piece that is right there on the floor and then pick up the completed piece? Or do the piece picking up in the reverse order, pick up the thing on the floor first, and go to the place of the other thing.

Or when I talk to NPCs, I should be able to piece together a sentence to ask, right? And if that sentence makes sense in context, there should be a suitable reply from the NPC. As a player I’ve gathered different questions than the ones presented as options sometimes. If I’m allowed to try any object on anything and get at least a generic “Dunno” answer, why not the same for dialog?

Yeeeh, I can do something about it!


What’s in a name

Sophomore Mysteries”, where did that come from?
Well, in the beginnings of what eventually became this small game basically, the player was a professor of criminology (that used to be a detective) in a university with multiple disciplines, and the idea of it was to use that for potentially different kind of puzzles, ranging from chemistry to tech to acting. In fact, the first cut-scene that introduced the victim-
to-be of the title was shown there, along with some other characters to act as potential future suspects. A pompous prickly sort of professor that berates people, students that don’t want to deal with it anymore, a criminology professor (the player character) that perhaps thinks too highly of themselves, too smart, (for their own good perhaps), a detective friend that might be too trusting sometimes for his own good, and a bath of corrosive chemicals to get rid of things.

But, it wasn’t coming along. I knew the beginning, knew how to finish it and even had the scene all planned out how to play out with two possible endings. I just didn’t know how to glue them together, and in a happy-go-lucky way I was thinking to my self that it’ll pan out as I go.


Wheel re-invented (Systems created from the ground up)

When i say "systems created", what i actually mean is that i sat down to code them, instead of looking online to see if anything like that was already made, or at the very least something that i could modify to warp it into what i wanted.

Interactables

The first thing is a script that I guess all games start with. It is a script added to each object that I wanted to be interactable. It basically adds the capability of that object to detect clicks, it has the objects name, what kind of interaction is possible with said game objects; sorry, I meant ~gameObjects~. It also force-attached some other scripts that enabled the character to give out a basic description of the thing that was clicked. Basically if you click and an object is detected under the pointer, if it has an interactable script attached, you get a small description or comment if you right clicked, or the interaction menu if you left clicked. If it didn’t have one attached, you walked there. Thing of the interactables script as the receptionist you meet at a building that directs you to where you want to be. (NPCs also get that interactable script, they just get some other scripts on top of that.)

Click to expand

Status (State machine)

This one is simple and something that all games have. A big list of tick boxes (flags) that is used for tracking down what things happened or not. My system used a class array that holds the name, ID number, and state of an inventory objects, and another class array that holds general states of things I need to keep track of, with the same class structure as the inventory items. The “state” field is not a bool, but an int. Because I thought to myself, “what if I need to track the state of something that is neither on or off?!” Which to be honest, I did in some stuff. 0 is off, 1 is enabled, 2 is “used”, 3 might be “go check the object for a custom/specific thing to do in that object.

NPCs or interactions the player performed can set or check states from the arrays to keep track of game progress, dialog and items.

Yes, the code is a mess, but it works!




Inventory System

So in a lot of point and click games, (or at least the ones I played since the late 80s all the way to current times of writing this) the modus operanti is that you pick up what you find, (basically everything and anything that isn’t nailed down to the floor) and if you need to combine things together, you do it in your inventory screen. You had to put them together in there and nowhere else. I’m sure there must be some titles that let you combine things that go together anywhere and any time, but I don’t remember having played one.

So I decided that my game would have a system that you could combine the inventory items that went together, wherever you liked, meaning, you could pick all the parts of a thing and combine them in your inventory, or pick one thing and keep it in your inventory, and then when you found the other piece, use the one you already have on the piece that’s right there waiting for you to pick up. The pieces will instead be combined right there and the piece object that’s on the environment will be replaced with the combined part for you to pick up.

The way I thought about doing this (for better or worse) is with having each object hold info about which other piece can be combined with it and which object is the finished one. Then both inventory items have their state set that they are disabled and used, so that they disappear from the scene, and the finished part’s state is set that it is enabled in the game world…



Save/Load System

...so when you load your game, the save/load manager reads the status arrays and while the screen is still black, it enables or disables the objects according to their state...state if they are inventory items, or sets their progress flags/dialog flags if they are events or NPCs.
Once the
save/load manager went through the save file and populated all of the state tracking arrays, the objects at the scene (everything is enabled when first loading the scene) would read the state that game is in, and appropriately disable themselves if they are not supposed to exist yet/any more, and the NPCs know if you’ve talked to them yet or not. This is where you deal with Unity’s script execution order panel to make sure that each script is executed in the right order. You don’t want the object to check if it has to be on or off and the array says to it “you do not even exist”.

Oh yes, the save file is just me serializing the two arrays and just writing them in a file with a custom extension. Nothing more.

Then on load I just de-serialize the file back.


Dialog System

Oh boy. This is where I really got all “I might need this thing, I might need to account for needing that thing in the future. I might decide later on to do this idea as well. I’ll try to implement as universal a thing I can!”

No, stop that. Get some help. Do each type of dialog in its own script instead of one monolithic wall of text, and just add them to the NPCs as needed. “Types of dialog”? Yep. There’s a) normal banter that you go back and forth with the NPCs, b) dialog that uses dialog trees, and c) interrogation mode where you compose questions by combining keywords. Some keywords are common words like “what”, “who”, “when” etc, then you combine that with something like “is”, “talked”, “heard”, “saw” and then tie it all up nicely with something like “victim”, “you”, “they” etc.

Then the compositor would take those - basically tags - and check against the equivalent dialog file for that particular NPC. If it found something that matched, then the player character would make a question or a statement, and the NPC would reply accordingly. OH! And I made an editor tool to help me compose the dialogs and save them to individual files! Because dialogs could also trigger events, change game states or unlock new keywords for the phrase compositor. (It was actually fun to code the dialog system and rewarding when it worked. Even if the interrogation mode is only used once in the finished thing).


Camera System

Its nothing special at all. Its based on triggers, pass from a certain path and the camera will travel to a predetermined position with a predetermined focal length. The camera can either jump to a new position and aim, or it can ease into it. It is also used in certain situations where there is a close up of an object with the camera in a weird place, that would force something from the environment to obscure the thing that needs to be in view. For example when in the early scenes, the player needs to find the dead body’s redacted that slid off all the way redacted redacted. The camera’s position is saved in the general state array and then in the save file, since a single scene might have multiple camera positions and angles.


Plot holes

Yes.

Ok fine. Basically, I couldn’t see a complete path from start to finish, and instead of trying to see one, I started doing the fun parts of modeling and coding and thought that I could connect the bits down the line, that somehow things will fall into place. In the end I caught myself doing changes to scenes that were either mid development, or close to end. I knew how the whole thing would end, and had the beginning made, but forgot I needed a middle part.


Cut stuff

Basically everything from the original idea. Gameplay and style is exactly the same, and so is the whole code. But on top of the scenes and puzzles cut, (that only the police station would have been the same scene and the first alley scene), we have an intro cutscene, puzzle cutscenes, murder(!) cutscene, character introduction cutscene...


Lessons Learned (?)

Even though this didn’t go where or how I planned, it doesn’t mean that it fails in everything. At least now I am more aware into actually designing the scenes as complete as possible and then go into making assets and the like. And anyway, things will still change, but at least with a better understanding on where they should head to. Oh and perhaps check if there are packages that I can modify before heading out to create everything from scratch. Looking at you save system. Though… nah. I actually had to learn things while making it, so yeah; still not a lost time.


So what about “Zero”?

Well, as said in the beginning, Zero is a short prequel, intended to introduce the sort of universe lets say and the characters. For me, it was an excuse to do something other than the main one, to understand how to do stuff in something that has a smaller scope, and in the mean time find how to properly connect the beginning, to the middle, and then to the end. Instead, I’ve actually wrote the scenes of something completely different, from beginning to middle to end, along with characters, and the puzzles in it, and decided on the art direction. Yep, learned nothing. And jotted down a couple more ideas for short mobile games that are good for 10 minute play sessions. In this ... prequel of sorts, you have to investigate a body that was found in an alley. Was a murder? was it an accident? Gather evidence and talk to people, and cause some mess along the way, to tell the whole story.

Windows x64 and Mac builds.


Sunday, April 2, 2023

Devour everything

 So you are a sandworm, munching on stuff up to a certain size, able to burrow under the surface to avoid danger for a bit. Get bigger by eating stuff to be able to eat … bigger stuff.





Thursday, December 5, 2019

Controls accessibility in a shooter game.

I was wondering how feasible it is to make a "twin stick" shooter game (a shooting game that uses two analog sticks on a controller, one for controlling movement, the other for aiming) but make it in such a way that can be played with only one hand. I'm pretty sure that there are people without full use of both hands that want to play games. So I was wondering how someone could design around this issue.

Noticing that gamepads can basically be cut in half and each side mirrors the other, the controls are also doing the same. Analog stick controls movement, and the bumpers are acting as modifiers, basically altering movement to allow for aiming or moving the tank. The triggers are doing the shooting, with the face buttons being mirrored by the directional pad on the left. (Haven't added any functionality to them yet, but ... they are four buttons and the pad can point in 4 directions and is oriented just like the face buttons...

(Better view the video in full screen.)

This wasn't to make a full game out of it, just see if i could control the tank and not get flustered by not being able to play the test well enough.

Thursday, January 25, 2018

Custom editor in the editor. (editorception)

Just a small P.S.A., sometimes you are messing around trying to create an application that will have to do with lots of data entries, so you use an appropriate application to produce those external files for use in your app. Like a spreadsheet editor to make CSV files, or an XML editor for ... XML files...

What if however the data you want are entered in a specific class and you don't want the files to be readily readable or editable from an external application in your finished product?

You make your own editor that runs in the engine of your choice! (If you are using something like Unity or Unreal that is.)

Don't be intimidated or put off by having to make something custom, it will save hours of work and help with sanity levels later down the line. This small editor is a panel that pop ups from within Unity without the need to enter play mode. It doesn't edit anything in the project this is for, but instead creates files that hold the dialog for NPCs. These files are located in the project's folders and are not hanging around all by themselves when compiled, so someone won't be able to just see them and open them to look around. (This doesn't mean that someone that really wants to peak around won't be able to eventually read the files. All one needs to find out is the format and structure and that's it.)

To get started with something custom in Unity, one would just need to start writing something derived from EditorWindow.

Sunday, August 6, 2017

Feathered Journeys

Released a new mobile app (for iOS and Android) almost a week ago, for a non-profit organization that's for protecting birds and their environment.
The app has a trivia game revolving around the difficulties that birds may encounter when migrating, a compact encyclopedia about a number of birds encountered in Cyprus and the capability for the user to report the location of an illegal bird trap if encountered on the island.

iOS App store.
Android Play store.

Tuesday, November 22, 2016

101 texturing aimed at mobile games. (Just bake'em all in there) - repost from personal blog

Yes, mobile GPUs have gotten really fast. Yes, they can make more things than consoles from some years ago. But there is still something that hasn't improved yet. Battery life.
Forcing more fps means less battery life and a hotter device. But more so does giving more stuff to the GPU/CPU to calculate. Of course they can do effects like normal mapping and real time shadows, reflections/ refractions... But when running on a device that its battery only lasts for one or two days when on standby, that isn't such a good idea.

So... what's usually done on the art department is to cheat a bit.
Consider the scene below. From certain angles the floor looks as if it has some overhang and a relief/sculpted effect. (It's used in fact in a lot of places in the project).

The most common way to do so in a 3D project would be to use a normal map in order to give the lighting information to the rendering engine and have it react correctly with the lighting.

But in a mobile environment you'd want to have the device have the least amount of work to do possible. Think of PCs and consoles good at marathons, with mobile devices good for sprints. Even though a Nintendo 3DS or a PlayStation Vita are mobile consoles running on batteries, they have chips with relatively slow speeds running as fast as they can, while mobiles are given fast, multi-core chips; and we are trying to give them as few things as possible to do, because the more you give those chips, the faster they'll go, and the more battery they'll eat up.


So back to the scene; see that chiseled effect that gives some highlights on the sides? Or that shadow effect? Well those are all baked into the texture, meaning basically that they were pre-drawn in the picture that gets wrapped around the 3D object. Lighting is faked as well, with only a couple objects actually using lighting calculations done in real time. (The ball is one of them since you will be moving it, faking it on the ball won't do as the highlights won't move. It has a small normal map to give it bumpiness. It's ok to do stuff like that if they aren't covering much of the screen.)



Above you can see the actual model of the platform blocks with no textures and in the lower right corner part of the texture atlas that has the texture info for all the platforms in this scene.
Which is another way to save on resources; placing as much stuff as you can on a single file so that the engine will only need to read one file once - but do that for things that won't be needed in a different scene. If you take a single object that uses this texture and put it into another one, then the engine will have to load the textures for that scene, plus the whole texture for that single object even if only a small part will be shown on screen.

All the shadows and highlights in the texture detail shown in the corner above were made in Photoshop, while the ambient light and shadows visible in the scene were precalculated by the engine and saved in their own image file as well. So that information is not being calculated while playing the game. That has its own limitations, but it helps in lowering the work needed. Since the light source and/or the platforms don't move, painting the highlights and shadows before hand saves on resources.



  




Tuesday, October 18, 2016

itch.io

Now available through itch.io for those that prefer it through there. Yeeehh



Tuesday, October 11, 2016

Quality settings on mobile VS battery life

It's always important to try and balance image quality vs performance in every project because when you get up to a certain point with a certain tech, then it'll stop giving out better perceptible image quality, while still eating up CPU and GPU resources. This is even more important on mobile platforms since they are powered by a battery and more strain on those components means less battery time.

When i was making my game i thought of adding an option to select the texture quality in the game in order to save RAM on devices that don't have a lot of that precious resource. All it does is if you set it "High", it will render the textures in their full resolution and have anisotropic filtering on, and if you select the "Low" setting it will render the textures in half their resolution and disable anisotropic filtering.



You can see the difference that the option actually makes. Left is High quality, right is Low quality. It may not look like much of a difference on a small screen, but it halves the amount of RAM used by the textures.


However: One my friends testing the game decided to do a small benchmark on battery life VS textures. Granted, the way it was done needs more refining and better controlled environment variables, but for what he wanted to check it's good enough. He just wanted an indicative value.

He took his iPhone 6s, went into flight mode and then only enabled the phone's WiFi. He then had just the game running and played the actual stages while timing himself.
The first run was done with the quality setting on High, and the second run on Low. He said that his times were very close with give or take just a couple of seconds. (And i trust him on that. He found exploits or "shortcuts" in the stages that i couldn't.)

And the battery life?
On High the battery went from 100% down to 70%.
On Low it went from 100% down to 89%

Granted, it does need a more controlled test with an automatic timer and standardized routes and video evidence, but this does show a bit how just changing the texture quality will affect battery life instead of just RAM usage. Personally i wasn't expecting such a difference on a device that is more than enough to play the game fine while the only thing that changes is the Texture memory use. No Level of Detail thing going on here or polygon reduction on Low setting.

On the left, the options object.
The texture on the "Low" resolution setting gets blurry as it is half the resolution of "High" mode.











On the right we have World 2 Stage 7. Same thing on this one as well. In some elements the texture resolution reduction is more evident than others, but it happens to all textures regardless.















   

Wednesday, October 5, 2016

Consistency in development.

You should always go for consistency. So, when you make an update and fix one thing, you should always strive to brake something else...






















The ball isn't supposed to be THAT big.

Monday, October 3, 2016

The release of "The Adventures of a Rubber Ball"!

Avoid traps and obstacles to reach the end of the each level. Find all the secrets and coins to unlock a special hidden level that's lengthier and more challenging!