Putting the 'role' back in role-playing games since 2002.
Donate to Codex
Good Old Games
  • Welcome to rpgcodex.net, a site dedicated to discussing computer based role-playing games in a free and open fashion. We're less strict than other forums, but please refer to the rules.

    "This message is awaiting moderator approval": All new users must pass through our moderation queue before they will be able to post normally. Until your account has "passed" your posts will only be visible to yourself (and moderators) until they are approved. Give us a week to get around to approving / deleting / ignoring your mundane opinion on crap before hassling us about it. Once you have passed the moderation period (think of it as a test), you will be able to post normally, just like all the other retards.

Vapourware Codexian Game Development Thread

Bad Sector

Arcane
Patron
Joined
Mar 25, 2012
Messages
2,223
Insert Title Here RPG Wokedex Codex Year of the Donut Codex+ Now Streaming! Steve gets a Kidney but I don't even get a tag.


So, after i saw the UE5 demo, i wondered if they manually rendered the high poly objects on top of proxy (low poly) objects and decided to try and do that myself as a quick test. I spent most of yesteday writing that test that shows a scene made up of 2.7 billion triangles (these models may not look like it but each one is around 12.5 million triangles - i just hit subdivide again and again in Blender :-P).

The idea is actually quite simple: a fragment shader run on the low poly model (automatically generated... by Blender :-P) that performs raycasting on the high poly model geometry. To avoid checking all triangles, a precalculated texture is mapped to the low poly model where each texel is an offset in a (precalculated too) buffer texture that contains a "bucket" of triangles to check against (the bucket is generated by finding the closest triangles at each texel) which is usually very few (a few tens usually, some hundreds maybe, really depends on the texture resolution). So basically all the fragment shader does is grab the offset and check against the triangles.

The two main issues with this approach are that it seems to do more raychecks than necessary and that there are glitches in the silhouettes where there is a mismatch between the shape of the low poly model and the high poly model. I *think* both can be addressed (or at least worked around) by doing the entire process as a later pass in screen space, but that is just a guess. TBH i'll probably wont try that because i'll need to set up render targets and other boilerplate that i feel too lazy to do :-P.

FWIW i do not really have a use for this, i mainly did it as a test after thinking yesterday about how UE5's developers would do their stuff (obviously in a much more polished way). Personally if i needed to work with high poly models i'd... not work with high poly models and just use normal maps :-P. I'd probably just try a way to generate things automatically, even if not at the best quality as i'm not a big fan of trying to do things at runtime that could be precalculated.

Still, it was interesting to try.

EDIT: also the data size isn't something i like... just that single model is around 1.5GB after preprocessing. It can be compressed by itself but for having multiple models you'd need a virtual texturing system (everything outside the low poly geometry is in the form of textures) that loads arbitrary pages automatically and that would most likely not compress as easily. Also i didn't include actual textures at all.

EDIT 2: i know i wrote i wont work on this, but i was curious about how it'd perform if i did the raycasting in screen space, so...



...not bad, that is now ~135 billion triangles at 30fps (it is CPU limited, probably because of me using ancient OpenGL and AMD not being particularly great at handling OpenGL, especially the ancient variety :-P). On the other hand the glitches are a bit more visible. If i'd ever decide to make an engine and also decide to use this (not likely due to the size reasons i mentioned above) i'd spend some time trying to get rid or at least hide those. But for now, i'll probably shelve this - for real this time :-P
 
Last edited:

Bad Sector

Arcane
Patron
Joined
Mar 25, 2012
Messages
2,223
Insert Title Here RPG Wokedex Codex Year of the Donut Codex+ Now Streaming! Steve gets a Kidney but I don't even get a tag.
In other news, i made an update (version 0.99e) to Post Apocalyptic Petra with a better Windows version allowing for custom resolutions and some timing fixes for low framerates:

This update adds a slightly better Windows version that allows selecting a custom resolution. The game still uses GDI and scales to the desktop resolution, just now it isn't locked to 320x200 nor uses a hardcoded aspect ratio. Also the code has been modified to compile with Free Pascal 2.2.4 which is the last version that could create Windows 9x compatible executables, meaning that it will now work on retro PCs - at least retro PCs powerful enough to run the game in GDI anyway (meaning that you most likely wont get any decent framerate unless you both the game and the desktop is at 640x480 and you have something like a Pentium 3). Perhaps in the future i might add a DirectDraw graphics driver.

Note that even though you can select something like a 4K resolution, chances are that even on a modern PC the software renderer will be too slow to run smoothly. In general i do not recommend anything above 960x540 or so. The configuration dialog that appears when you start the game provides two automatically calculated resolutions based on the current desktop resolution, one that is always at 200 pixels high (so that in-game screens appear at their full size) and another that is the closest integer scale to 320x200.

In addition to the above, this update fixes some timing issues when the game was running at low framerate - previously the animation was using the current system time but because the current frame was also used for some events and state changes, these frames could be skipped, causing the events and state changes to not happen. Now the animation time is updated at a fixed rate synchronized with the overall engine update rate, meaning that no events should be missed due to skipped frames.

The full changelog is this:

  • The Windows version of the game (gdipetra.exe) will now display a configuration dialog before starting, allowing for custom resolutions (an appropriate resolution for the current aspect ratio is automatically chosen).
  • The Windows version also works under earlier versions of Windows, like Windows 95 and Windows 98 (note that this is only valid for the game, the editor still requires Windows 2000).
  • Game screens are now centered depending on the game resolution (this is not ideal since at very high resolution everything appears tiny, but fixing this would require changing how screens are drawn - perhaps in a future update).
  • The aspect ratio is now calculated properly from the resolution.
  • Animation time is now updated in sync with the overall update time, fixing some issues when running at lower framerates and using animation frames as events (running at lower framerates skipped frames which caused events to not be fired) and state changes (e.g. jumping forward could cause the game to "softlock" for a few seconds).
  • The game code now compiles with Free Pascal 2.2.4 which is the last version to support Windows 95.

EDIT: That feeling when your timing bug fix introduces a much worse timing bug in another place :-/. Soo.... verison 0.99f is out, fixes timing bug in entity motion (so stuff like ladder falling down or rotating platforms now move at their proper speed). "Fortunately" according to itch.io nobody downloaded the previous fix anyway :-P.
 
Last edited:

LESS T_T

Arcane
Joined
Oct 5, 2012
Messages
13,582
Codex 2014
2D game engine Defold is now "open source":
https://defold.com/opensource/
https://www.github.com/defold

This was originally developed by King, the casual game company, and now it's maintained by its own foundation.

It uses a modified version of Apache 2.0 license. The modified bit is an extra restriction: You can't sell original or modified editor and engine. Which, I guess, practically does not matter for usual game dev purposes. But at the same time this virtually prevents other open source projects (Godot, Love2D) to adopt parts of it.
 
Last edited:

Bester

⚰️☠️⚱️
Patron
Vatnik
Joined
Sep 28, 2014
Messages
11,003
Location
USSR
Too little too late.

Defold is a lightweight engine with barely what you can call an editor, but it's got quick compilation, it's optimized, it cold starts in seconds, etc. This is all good and well, and you could become open source while you had these advantages, while Unity was a bloated mess.

Now Unity has DOTS, and now Unity has moved a lot of its bloat into optional packages. Now Defold has nothing over Unity.

Another problem with Defold is their philosophy. They don't want ANYTHING in terms of new features. They HATE new features. Wonder how that's gonna go when people start sending in pull requests now.

And while I say all this, Defold is the only good non-AAA engine. Godot and the likes are complete bullshit, while Defold is a very professional product.
 

Bad Sector

Arcane
Patron
Joined
Mar 25, 2012
Messages
2,223
Insert Title Here RPG Wokedex Codex Year of the Donut Codex+ Now Streaming! Steve gets a Kidney but I don't even get a tag.
Well, limiting a project's scope is how you avoid bloat and make it easier to ensure quality for what your project actually does.
 

The Avatar

Pseudodragon Studios
Developer
Joined
Jan 15, 2016
Messages
336
Location
The United States of America
Made a water shader-
Water_02.gif


You know how in some old games like Oblivion(maybe Morrowind too), if you stand in just the right spot that the camera is on the water plane, you can see every slaughterfish and mudcrab under the water? Thats because in those games the fog is a binary thing- its either on one setting or another and it effects the entire screen. I have made this water so that it handles situatations where you can see both the fogged water and regular fog at the same time.
Water_01.gif
 

vlzvl

Arcane
Developer
Joined
Aug 7, 2017
Messages
191
Location
Athens
You know how in some old games like Oblivion

My first RPG in CD medium was Daggerfall, back in 1997, with zero Unity presence, boatload of bugs, terrible UIs but endless content. Now that's ancient :) but it was still an evolution to some legendary first person crawlers 4-5 years back. Still have that CD, written in x1 speed. The only water emulation at that times were some 2D demos, no shader of course.
 

Bad Sector

Arcane
Patron
Joined
Mar 25, 2012
Messages
2,223
Insert Title Here RPG Wokedex Codex Year of the Donut Codex+ Now Streaming! Steve gets a Kidney but I don't even get a tag.
It happens in Morrowind too, it is actually how i manage to find that lost ring in the tiny puddle by standing at the edge between the water surface just high enough to clip through the water but not high enough for the fog to kick in :-P. Also happens in New Vegas, though not in Skyrim SE (at least for the Sea, i didn't test the water in Whiterun nor the original Skyrim that used a different renderer).

It usually is because the game has a global environment system that applies to the entire scene and the water has its own environment settings that either replace or get mixed with outdoor settings (Morrowind, Oblivion and New Vegas seem to simply replace the environment settings). It isn't really an old-vs-new thing, it really depends on how environment settings are handled by the engine - you can see a similar effect by going between interior and exterior areas in some games where the environment changes as you move around.

It can often be "hidden" with tricks, in Witcher 3 for example if you put the camera in-between the water and the surface, you can see that the settings for the "water" environment (that include blurriness and thick fog) are blended with the settings for the "outdoor" environment (that have far fog and no blurriness) based on the distance of the camera from the water surface. Those settings are applied globally though, so if the camera is partially submerged you can see the water effect also applying to geometry above the water - the game tries to hide that too though by also taking into consideration the water waves so this effect is blended in and out continuously from the "water".
 

The Avatar

Pseudodragon Studios
Developer
Joined
Jan 15, 2016
Messages
336
Location
The United States of America
It's really a solvable thing though, even back then. Look at Half-Life 2, which came out almost two years before Oblivion- they had proper fogged water that blended correctly so that it only effects whats under the water plane. I guess that would be more difficult if there were not a global water plane, but rather different water plane heights. Not sure Oblivion had a global water plane or not. Could be they didn't have the time or motivation to fix the issue.
 

Bad Sector

Arcane
Patron
Joined
Mar 25, 2012
Messages
2,223
Insert Title Here RPG Wokedex Codex Year of the Donut Codex+ Now Streaming! Steve gets a Kidney but I don't even get a tag.
Sure, but it isn't really about being solvable (it is very easy to implement by itself), it is more about not really being much of a problem in the first place since you very rarely have both views at the same time and the solution is usually having water something you need to keep in mind in your shaders (especially if you want to avoid a separate screen pass), whereas by using an environment system (especially with blending) you have a more generic system that can be used for a variety of other effects. Half-Life 2 didn't have anything like that, all maps are rendered pretty much the same way, so adding support for water most likely didn't interfere with much - but AFAIK it is still a special case for Half-Life 2's renderer, so it did interfere with the rest a bit.

Oblivion (and perhaps Morrowind too) could have blended the environment settings as you approached the surface though, but perhaps the engine didn't had that functionality (and blending environment settings wasn't really much of a thing back then, i think Unreal Engine 3 introduced the effect at some point but i'm not sure if that was available from the start or was added at a later point... and it usually was a very simple timed transition instead of position based).

And really, Bethesda never seemed to be big on small details anyway :-P.
 

Nathaniel3W

Rockwell Studios
Patron
Developer
Joined
Feb 5, 2015
Messages
1,226
Location
Washington, DC
Strap Yourselves In Codex Year of the Donut Codex+ Now Streaming!
I think I would be tempted to hide the transition with a screen-space water-on-the-camera-lens effect. And maybe force the camera to pop up from the water quickly or duck under the water quickly, and not allow it to stay halfway submerged.

I think UE3's only built-in transition is from one post-process volume to another. Not sure when it was added or if it was available from the engine's inception. In addition to the post-process volumes, UE3 will allow you to make fog volumes that you can collocate with your water volumes. A combination of post-process effects, fog, and a good water shader (and maybe a distracting screen effect for the transition) make for some pretty convincing water even in an ancient engine like UE3.
 

Viata

Arcane
Joined
Nov 11, 2014
Messages
9,885
Location
Water Play Catarinense
So, i finished the game. Well, "finished". I was fixing bugs until the end, i managed to submit it just three minutes before the deadline :-P

Here it is:

https://bad-sector.itch.io/post-apocalyptic-petra

Some screenshots:

DxPA7n.png
YNzUMp.png


S3gWHi.png
8I4V6E.png


Despite looking Tomb Raider-y, it doesn't really have much platforming (and the platforming it has is very forgiving). It is mainly about exploring the areas and solving the puzzles to move to the next area.

There will certainly be some bugs in there, but hopefully nothing game breaking. Sadly, due to GOG releasing the Dishonored series, as well as a mistake involving a brand new installation of New Vegas, i couldn't find the time to make many maps, so there are only four in there. This means the game will only take you around 25 minutes to finish if you know what you are doing, though i guess it might take you around an hour the first time. In any case, it is a very short game.

EDIT: forgot to mention that this also contains a Windows executable (gdipetra.exe). It is just a quick hack to allow playing the game natively on Windows in case DOSBox is too slow, but it also has 16:9 aspect ratio instead of 4:3. I'll probably make a direct draw version later so that it also runs on Win9x PCs :-P.
http://www.doshaven.eu/game/post-apocalyptic-petra/
Interesting place to find your game there, mate. :salute:
 

zwanzig_zwoelf

Graverobber Foundation
Developer
Joined
Nov 21, 2015
Messages
3,085
Location
デゼニランド
Having fun prototyping a random-ass idea of doing a real-time & party-based DG spin-off, except you're controlling each mech separately using a mouse.

Somewhat inspired by Hired Guns, a game I really like.
EYtXkkgWoAELwnX
 

V_K

Arcane
Joined
Nov 3, 2013
Messages
7,714
Location
at a Nowhere near you
Let me get this straight. Your two single-character games were turn-based and now you want to do a party-based one, but in real time? Makes sense. Makes total sense.
z2wIuLM.gif
 

zwanzig_zwoelf

Graverobber Foundation
Developer
Joined
Nov 21, 2015
Messages
3,085
Location
デゼニランド
Let me get this straight. Your two single-character games were turn-based and now you want to do a party-based one, but in real time? Makes sense. Makes total sense.
z2wIuLM.gif
It's a prototype for recreational purposes -- been a long time since I did anything not directly related to current projects. The decision to make it real-time was due to control of individual characters -- keeping it turn-based would turn it into another Paradise Cracked.

Don't get your panties tied in the knot, though -- unless this prototype ends up being fun enough to warrant a full-fledged spin-off, I'm sticking to turn-based games.
 
Joined
Jul 4, 2014
Messages
1,563
Let me get this straight. Your two single-character games were turn-based and now you want to do a party-based one, but in real time? Makes sense. Makes total sense.
z2wIuLM.gif
It's a prototype for recreational purposes -- been a long time since I did anything not directly related to current projects. The decision to make it real-time was due to control of individual characters -- keeping it turn-based would turn it into another Paradise Cracked.

Don't get your panties tied in the knot, though -- unless this prototype ends up being fun enough to warrant a full-fledged spin-off, I'm sticking to turn-based games.
Make it use dual mice. Local multiplayer and ambidexterity training in one package.
 

Nathaniel3W

Rockwell Studios
Patron
Developer
Joined
Feb 5, 2015
Messages
1,226
Location
Washington, DC
Strap Yourselves In Codex Year of the Donut Codex+ Now Streaming!
To make it even better, you can also have local multiplayer with your wife/gf:
I've seen parts of that anime somewhere. Can you remind me what it was? Was there ever any explanation given for why they pilot it like that? Or is it purely contrived soft hentai pervertry?
 

Viata

Arcane
Joined
Nov 11, 2014
Messages
9,885
Location
Water Play Catarinense
To make it even better, you can also have local multiplayer with your wife/gf:
I've seen parts of that anime somewhere. Can you remind me what it was? Was there ever any explanation given for why they pilot it like that? Or is it purely contrived soft hentai pervertry?
Anime is Darling in the FranXX. I have not watched it so I can't comment on the rest.
 

Bad Sector

Arcane
Patron
Joined
Mar 25, 2012
Messages
2,223
Insert Title Here RPG Wokedex Codex Year of the Donut Codex+ Now Streaming! Steve gets a Kidney but I don't even get a tag.
So, i finally managed to try out my last engine (this one) on a high refresh rate monitor (120Hz). All these years i was just guessing that it'll work properly, but never managed to test it out in practice since high refresh rate monitors tend to be huge, use awful panels, have ridiculous resolutions, sold at ridiculous prices or several of those combined. But now i tried it and indeed it works perfectly. It is liquid butter smooth.

The way i do updates in the engine is conceptually simple: the engine performs updates at a fixed update rate (60Hz) - if it runs at lower framerates, the update function is called more times per cycle to keep up with that rate, if it runs at higher framerates, the update function doesn't get called at all until enough time has passed since the last call to hit that 60 updates per second. The rendering function is called at every single cycle regardless of updates.

If you had a 60Hz monitor that would be enough, but on higher refresh rate monitors the animations would appear choppy (think of a minute long 12fps video being displayed on a 60Hz monitor - even though you can display the video at 60fps, to have the video be one minute long you'd need to display the same frame five times, so technically the video would be displayed at 60fps but the actual frames would only update at 12fps). To solve this whenever the animation state is updated, i also store the previous state and when rendering i interpolate between the two states by using the time remaining until the next update. This ensures that there will always be in-between frames even if someone uses ASUS's new 360Hz monitor :-P. The negative side is that in the worst case you are running one update cycle behind, though at 60Hz that shouldn't be noticeable at all (and usually when it comes to input events you can handle some things immediately instead of waiting for the next update cycle).

Now the interesting bit.

The irony here is that high refresh rate monitors are considered brand new and all, but the monitor i tested this on was an old early 2000s CRT monitor i bought for ~$10 around last year :-P. Because of reasons i'm not sure about, the AMD APU i used at the time and tried it on was only able to drive it at 85Hz max (and at that rate there isn't really that much difference compared to 60Hz to notice anything) - probably a shitty DAC that is meant to be interfaced to cheap LCDs that will convert the signal back to digital, instead of proper analog CRTs. And the Intel GPU that my retro P3 had (as well as the Voodoo i connected on it afterwards, though that was probably due to the Intel GPU signal it was passing through) also didn't run the monitor at anything above 85Hz.

But a few days ago i decided to try and repair my mid-2000s Athlon 64 X2 PC and while i am at it, do a thorough cleanup to it (using a blower to remove most dust and then a soft brush for the older, more "stuck" dust), install fresh Windows, latest drivers (it uses an ATI Radeon X1950 Pro GPU), etc. So while i was working on it, i decided to try and check if it works before assembled it back and the only monitor i had at an arms reach was the CRT on the P3. I quickly connected the hard drive, GPU, mouse and PSU to get some signal and boot whatever was there and it booted and... moving the cursor around felt *very* smooth. Like, sure, CRTs do feel smoother overall (even Post Apocalyptic Petra feels much smoother to play on the CRT than on my main PC's flat panel... or really any flat panel PC i have around here, despite the difference being only the 70Hz VGA vs the 60Hz everything else that shouldn't make that much of a difference if it wasn't for flat panel's sucking at updating themselves). So i check the setting and it was running at something like 100Hz which i never saw on that monitor, but then i also checked the "Show all modes" list from the advanced settings and noticed i can also put it at 640x480 at 120Hz (that one doesn't show up by default as Win7 hides any mode below 800x600).

That was pure bliss. So i assembled the PC and the last couple of days i am trying a few different games (mainly FPS games and largely older games that can run at 120+ fps on this PC) to experience them running at such a smooth refresh rate (though some games - like Humanhead Studios' Dead Man's Hand, a western FPS - either break horribly at anything above 60fps... or force 60Hz updates regardless of framerate). For some reason my own engine crashed, so i had to install a compiler and tools on the PC to debug it there (reason for the crash was using a dynamically loaded function that was introduced in OpenGL 3.x without checking if it exists - X1950 Pro only has OpenGL 2 support. Normally it wouldn't crash because i check for such cases, but this one was because of some quick experiments shown in the video i linked above that i forgot to remove). I decided to play some games first (one of the reasons i wanted to setup the old PC was to try some games i have in DVD format that use DRM that is broken in Win10), but then i installed a C compiler and fixed the bug.

Now the question i have, do modern high refresh rate monitors feel the same? Sure, they have a high refresh rate, but they also have either awful response times (VA), awful contrast (IPS) or awful everything (TN). We need better monitor tech :-/
 

vdweller

Arcane
Developer
Joined
Feb 5, 2016
Messages
625
I dream of you and ice cream: Horror adventure, hits Switch June 17




A sinister, doll-like entity has enslaved all mankind. Inside the complex where, every day, the entity questions world leaders about aspects of humanity - a potentially lethal process - an old scientist of unspecified gender is building a machine.


bMFpK96.png



Clinging to a few precious memories, with each passing day the scientist gathers components and toils on their obscure project, as the clock ticks relentlessly towards a horrifying climax.


64Ugq5p.png



I dream of you and ice cream is a point-and-click adventure game with a very simple interface and an emphasis on puzzle solving. For every two puzzles solved, players are rewarded with a partial solution which can be used in another puzzle.


There are no spoken lines or written dialogue in the game: Everything is communicated through speech bubbles, symbols and emotions.


5WMcXvy.png



The game will be available for the Nintendo Switch on June 17 2020 at the price of $4.99 USD. Preordering will be available on June 3 with a 10% discount. Touch as well as gamepad inputs are supported. Supported languages are English, German, French, Italian and Portuguese.


https://www.nintendo.com/games/detail/i-dream-of-you-and-ice-cream-switch/
https://store.steampowered.com/app/1343260/I_dream_of_you_and_ice_cream/

Special thanks to Aqualung , AdolfSatan and Atleticano for providing translations for the store page! You are all wonderful :salute:


Other games by the author

Gleaner Heights

https://www.nintendo.com/games/detail/gleaner-heights-switch/

https://store.steampowered.com/app/786580/


I am Ball

https://www.nintendo.com/games/detail/i-am-ball-switch/

https://store.steampowered.com/app/1007880/I_am_Ball/


Emerge:Cities of the Apocalypse

https://store.steampowered.com/app/457600/Emerge_Cities_of_the_Apocalypse/
 
Last edited:

As an Amazon Associate, rpgcodex.net earns from qualifying purchases.
Back
Top Bottom