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

RobotSquirrel

Arcane
Developer
Joined
Aug 9, 2020
Messages
1,513
Location
Adelaide
This old engine of mine didn't use atlases at all, it even had a separate lightmap per polygon yet it worked fine even on some on-board Intel GPU that a Pentium 3 PC i have from 2000:
You've got the camera facing down so your draws are minimal, you've got good efficient use of tiling and all of your characters are reusing textures. Makes sense why it runs well.
You probably didn't need an atlas, and texture arrays didn't exist back then so it was probably best practice for what you were trying to do at the time.
 

LarryTyphoid

Scholar
Joined
Sep 16, 2021
Messages
1,740
What sort of scene complexity do you have in mind? If it isn't anything complex you may not need texture atlases at all.

This old engine of mine didn't use atlases at all, it even had a separate lightmap per polygon yet it worked fine even on some on-board Intel GPU that a Pentium 3 PC i have from 2000:
Just a simple 2D game. I might not need to do it, but I'd rather do everything in a relatively efficient manner rather than being sloppy and relying on modern PC power as a crutch.
 

Bad Sector

Arcane
Patron
Joined
Mar 25, 2012
Messages
1,989
Insert Title Here RPG Wokedex Codex Year of the Donut Steve gets a Kidney but I don't even get a tag.
You've got the camera facing down so your draws are minimal, you've got good efficient use of tiling and all of your characters are reusing textures. Makes sense why it runs well.
You probably didn't need an atlas, and texture arrays didn't exist back then so it was probably best practice for what you were trying to do at the time.

Camera didn't make much of a difference, i don't show it in that video but there were keys to switch cameras to behind the player. Also remember that this used a separate "draw polygon" call for every single (world) polygon in the world *and* each (world) polygon had a separate lightmap texture.

As another example Post Apocalyptic Petra's Direct3D renderer doesn't have a top down camera and runs fine on a Voodoo 1, no atlasing either:

JssBdox.jpg


...though it does try to minimize state changes (also no lightmaps). But while it was expensive back in the 90s, in modern hardware (where modern means anything released in the last 10 years) state changes do not affect that much (you can do more than a million texture state changes per second even on 10 year old GPUs - and you are likely to hit other limits before reaching that :-P).

I think unless you are going for something like early 2010s AAA 3D scene complexity you most likely wont see much of a difference in practice on modern hardware. Which is why i asked for the scene complexity.

Just a simple 2D game. I might not need to do it, but I'd rather do everything in a relatively efficient manner rather than being sloppy and relying on modern PC power as a crutch.

On a 2D game you are more likely to notice overdraw issues and that only on weak hardware and assuming your game has a lot of overlapping 2D elements (GUIs, etc).

To give you an idea, i wrote a quick and dirty program that generates 4096 128x128 textures and then draws a 64x64 grid with them (4096 unique sprites at the same time on screen is most likely way beyond what most 2D games show - assuming 32x32 sprites you'd fit less than half of that in a 1080p monitor without any form of scaling and that is, again, about drawing all unique sprites at the same time):

mimYSmy.png


(the textures are random and while they all look the same each "box" is a unique texture)

On my PC (which is already ~4 years old) i get the ~350 fps shown above, however it drops to about 30fps on my GPD Win 1. Note however that this is done via the simplest way possible using client side vertex arrays (i.e. sending the same vertex data over and over for every frame) and the GPD Win 1 struggles to run the original FEAR with its CPU (which is the limiting factor) being a weak Atom from 2015.

In a more realistic scenario where your game does some texture reuse and you only try to draw what'd be visible on screen instead of everything, even by still sticking with the client side vertices you'd easily be able to get 60fps on the GPD Win 1.

If you are trying to make some first person dungeon crawler ala Wizardry, etc you could just dump everything on screen without any concern for performance. This crawler-like maze i wrote some years ago:



...doesn't try to do any optimization (it draws the entire maze and objects all at once) and yet it runs even on some ancient Pentium 133MHz laptop using Microsoft's software rendered OpenGL, let alone anything with a 3D capable GPU :-P.

IMO it is much better to make something that works first as you need it and if there is a performance concern try to fix once you have something to compare your optimizations against. Even if you just want to optimize for the fun of it, it helps to have a reference point as well as some sort of target hardware in mind for what you are making (personally i use old/weak computers i have around).

Also keep in mind that i'm not trying to dissuade you from using atlasing or texture arrays, just making clear that if you are worried about them then depending on what you are trying to do they may not be a concern in practice.
 

RobotSquirrel

Arcane
Developer
Joined
Aug 9, 2020
Messages
1,513
Location
Adelaide
I think unless you are going for something like early 2010s AAA 3D scene complexity you most likely wont see much of a difference in practice on modern hardware. Which is why i asked for the scene complexity.
I mean its valid. I'm just recommending things on that its one extra thing in the toolbox that I find interesting as an alternative. As has been said countless times by game developers, you only optimise when it clearly appears what you've done simply isn't working as efficiently as possible. If your implementation runs fun there's no need it is overkill. That said I'm recommending it from a standpoint that I have run into these problems in the past and in the present, this is of course more truer for 3D games especially at the scale I work at (ie. lots of unique objects in a scene) in that situation you need those tricks to keep everything smooth. For a 2d game it comes down to how many unique sprites are being rendered at any one time. If working to limitations you won't need these tricks.
To give you an idea, i wrote a quick and dirty program that generates 4096 128x128 textures and then draws a 64x64 grid with them (4096 unique sprites at the same time on screen is most likely way beyond what most 2D games show - assuming 32x32 sprites you'd fit less than half of that in a 1080p monitor without any form of scaling and that is, again, about drawing all unique sprites at the same time):
I've written a similar program myself, but my resolution was a lot higher and limited to 32-Bit single core. I was able to get into the thousands of textures on screen and still hit 60FPS using individual textures not atlases or arrays. Textures are extremely cheap. If we use the modern methods though it can be even cheaper, depends on the scope.
diagonallevels.png

This was meant to be a doom style engine, whilst all of those textures look like they're the same they're actually individual instances (there is no actual tiling going on I hadn't implemented it yet, I eventually did and broke the entire thing so had to abandon it, it broke because the face normals kept flipping and I couldn't work out why, I suspect it was a bug with using Directx9 on modern windows because it worked fine in XP, frankly it was a dumb project but I learned a bit from it). Fortunately it was only about 6 months of work, I eventually decided 3D engines were the way to go instead and haven't looked back since. The characters used 32 possible viewing directions, it was super smooth and utterly horrendously optimised, no atlases/spritesheets and it still ran perfect. Reason for the rainbow texture is that its the most taxing on color use so it was really filling up the Vram, the textures are 512x512 if I recall properly.

It certainly does depend on the scope of what you're trying to do.
 
Last edited:

Bad Sector

Arcane
Patron
Joined
Mar 25, 2012
Messages
1,989
Insert Title Here RPG Wokedex Codex Year of the Donut Steve gets a Kidney but I don't even get a tag.
I've written a similar program myself, but my resolution was a lot higher and limited to 32-Bit single core.

I kept the resolution small to avoid VRAM availability and bandwidth becoming an issue itself and affecting the benchmark (4096 512x512 RGBA textures would already be 4GB of VRAM data - that is 8 times more than the entire memory XBox 360 had and 16 times more than the VRAM PS3 had :-P). Atlases and texture arrays would still have the same (if no larger) VRAM requirements and the issue atlases (and for this particular use, texture arrays too, though there is more to them than that) is CPU bottlenecking the GPU due to multiple draw calls.
 

RobotSquirrel

Arcane
Developer
Joined
Aug 9, 2020
Messages
1,513
Location
Adelaide
4096 512x512 RGBA textures would already be 4GB of VRAM data - that is 8 times more than the entire memory XBox 360 had and 16 times more than the VRAM PS3 had :-P
Well I mean I was looking at it from the perspective of this game would take years to develop, so by the time it came out that would be the norm as far as hardware is concerned sure enough I was right. But having your game stuck on windows XP due to a bug was a bad idea given its market share which is why I gave up, and well the 90s shooter fad pretty much died down in recent years I was trying to get it out during its peak, when Ion Fury released I was just like "nope not gonna get anywhere near how good this game looks and plays with this tech I've built" credit to Ken Silverman guy knows how to make an engine that can stand the test of time. If I could've licensed Build I would have. (I was under the impression the commercial license was separate from the source license you find online, I can't find reliable info on it but Ken says to do it you have to contact 3D Realms/Apogee)

This program was supposed to work with that voxel program I showed earlier in this thread, eventually I would've combined the two programs as I said reason for abandoning the voxel program was due to the fact there are better programs now, given the success of voxel doom though I think I was onto something, I just didn't have the resources to get it to where it needed to be and covid ruined everything. Voxels were replaced with pre-rendered meshes which is what you see in that screenshot. Eventually I just figured, well I'm going this far might as well start using Unity again. And now I'm using both Unity and Godot. Prior to this doom clone I was working on a flight sim in unreal 4, that project failed because someone beat me to it. (world war 1 battlefield clone focused on Aviation, yeah bad timing yet again).

I'll repeat that saying indies say, Don't develop tools, develop games. Most of what you're going to want to do has been done and probably been done better.
 
Last edited:

Bad Sector

Arcane
Patron
Joined
Mar 25, 2012
Messages
1,989
Insert Title Here RPG Wokedex Codex Year of the Donut Steve gets a Kidney but I don't even get a tag.
I'll repeat that saying indies say, Don't develop tools, develop games. Most of what you're going to want to do has been done and probably been done better.

That saying is actually kinda different from that interpretation: it is "write games, not engines" but the idea behind it isn't to not make your own engine (IIRC was written before even Unity was available on Windows, at a time where you either had to write your own engine or buy something like Torque). The idea is that if you are making an engine to make it for a specific game you have in mind with specifical goals, gameplay functionality, development limitations, etc instead of trying to make an engine without any specific goals as this will result in a bunch of random functionality that most likely is going to be useless in practice. In other words, your goal should be "write a game", not "write an engine" as the former will have specific needs whereas the latter is too vague.

Also note that this was originally written mainly as advice towards new developers who wanted to make their first engine (and besides a lot of commercially successful indie games have their own engines), though even big fat engines nowadays often started as games (e.g. pretty much all id Tech engines were written for specific id games, Unreal Engine started as the engine for Unreal, etc - even Unity was originally written for GooBall :-P).

With that in mind, here is a screenshot from my latest work in Little Immersive Engine :-P

S2VtAn6.jpg


It has been a long time since i last worked on the engine since i was busy with work and (most importantly) other projects (i got a modded original xbox and wrote some graphics for it - it is interesting since i'm using the open source nxdk instead of the original SDK and nxdk does not really have a graphics API aside from a few helper functions to construct a push buffer for the GPU, so you essentially have to write your own 3D graphics driver - and that without documentation, just looking at existing code from projects like the xemu emulator, which itself isn't 100% accurate :-P, as well as nouveau and whatever samples come with nxdk).

Recently i mostly fixed bugs with face deletion and undo/redo support. But now i also added some new functionality to extrude selected brush faces into new brushes, thus allowing the creation of the structure in the image above :). I still need to implement grid at some point - and of course some way to assign materials to faces (though ok that is kinda easy so i keep on skipping it).
 

Twiglard

Poland Stronk
Patron
Staff Member
Joined
Aug 6, 2014
Messages
6,602
Location
Poland
Strap Yourselves In Codex Year of the Donut
Here's the initial revision of the object inspector. Eventually it's going to support references between objects and similar non-trivial features. It has a declarative syntax that runs at compile-time.

Untitled.png


There's not much else done so far (json and sprite pipeline improvements, fix for a nasty coordinate formula bug, fixed-point 16-bit scenery time deltas) but I've had trouble resuming work on the game in the first place so it should be easier from now on. I should revise some specifics of the collision detection implementation and then add a barebones player character.
 

Nathaniel3W

Rockwell Studios
Patron
Developer
Joined
Feb 5, 2015
Messages
1,035
Location
Washington, DC
Strap Yourselves In Codex Year of the Donut
Hey Bad Sector are you the Das Geisterschiff dev? I just picked up Duskers for free on the Epic Games Store. It looks like it has kind of the same feel as your game. And it looks like Duskers may have been pretty successful. Almost 2000 reviews on Steam makes me think that game must have made at least $500,000 in revenue. Have you played it? How do you think it compares to the geister games?

Edit: My bad. It's zwanzig_zwoelf. Wazup zwanzig?
 
Last edited:

zwanzig_zwoelf

Graverobber Foundation
Developer
Joined
Nov 21, 2015
Messages
2,965
Location
デゼニランド
Hey Bad Sector are you the Das Geisterschiff dev? I just picked up Duskers for free on the Epic Games Store. It looks like it has kind of the same feel as your game. And it looks like Duskers may have been pretty successful. Almost 2000 reviews on Steam makes me think that game must have made at least $500,000 in revenue. Have you played it? How do you think it compares to the geister games?
Duskers has been on my radar for a long time and I bought it a while ago, but I'm yet to play it and thus unable to say if they have anything in common.
 
Joined
Jan 9, 2011
Messages
2,696
Codex 2012 Codex 2013 Codex 2014 PC RPG Website of the Year, 2015 Codex 2016 - The Age of Grimoire Make the Codex Great Again! Grab the Codex by the pussy Insert Title Here RPG Wokedex Strap Yourselves In Codex Year of the Donut Codex+ Now Streaming! Serpent in the Staglands Dead State Divinity: Original Sin Project: Eternity Torment: Tides of Numenera Wasteland 2 Codex USB, 2014 Shadorwun: Hong Kong Divinity: Original Sin 2 BattleTech Bubbles In Memoria A Beautifully Desolate Campaign Pillars of Eternity 2: Deadfire Pathfinder: Kingmaker Steve gets a Kidney but I don't even get a tag. My team has the sexiest and deadliest waifus you can recruit. Pathfinder: Wrath I'm very into cock and ball torture I helped put crap in Monomyth
Hey Bad Sector are you the Das Geisterschiff dev? I just picked up Duskers for free on the Epic Games Store. It looks like it has kind of the same feel as your game. And it looks like Duskers may have been pretty successful. Almost 2000 reviews on Steam makes me think that game must have made at least $500,000 in revenue. Have you played it? How do you think it compares to the geister games?
Duskers has been on my radar for a long time and I bought it a while ago, but I'm yet to play it and thus unable to say if they have anything in common.
I haven't played zz's game, but Duskers is good stuff. One thing I didn't like though
is that none of the plotlines are ever conclusively resolved. Would really like to know more about what is the shit that went on.
.
 

Bad Sector

Arcane
Patron
Joined
Mar 25, 2012
Messages
1,989
Insert Title Here RPG Wokedex Codex Year of the Donut Steve gets a Kidney but I don't even get a tag.
RPfG3Ee.png


Added a polygon tool in the brush editing mode where i draw an arbitrary polygon and it converts it to brushes. I still haven't implemented texture alignment options or even grid, so the test in the screenshot above is a bit off but in the future it'll be possible to make odd shapes and rough layouts quickly using this.
 

Nathaniel3W

Rockwell Studios
Patron
Developer
Joined
Feb 5, 2015
Messages
1,035
Location
Washington, DC
Strap Yourselves In Codex Year of the Donut
Finishing up a huge system--actually, a combination of several systems--in Septaroad Voyager.

So first you learn a legend, which provides you with a map.

DynamicQuestBuilder.jpg


Then you have to fill in the map using clues. Each clue can be used on certain spaces, and each clue modifies the legend's difficulty and treasure. You can learn clues directly from NPCs, but mostly you'll get clues from artifacts that you find.

Deconstruct.jpg


I think it's important for the player to have interesting choices. So here you have the choice between selling artifacts for money, or using them for clues to find the next dungeon.

Portal.jpg


When you have enough clues to complete the legend, you unlock a dungeon entrance somewhere in the world. For testing purposes, I put this dungeon in the middle of the path next to a save point. The real dungeon entrances are going to be more remote.

Bandits.jpg


Inside the portal is a procedurally generated dungeon. This one is a 5x5 grid, each tile chosen at random from an array of possible tiles. The tiles are connected as a maze built using a recursive random depth-first search algorithm. The enemies and decorations are chosen from a set of possible themes, for example bandits, cultists, spiders, or necromancers.

The player then explores the dungeon, fights the enemies, defeats the boss, and wins the treasure. And maybe you'll get a map that starts a new legend.
 

Nathaniel3W

Rockwell Studios
Patron
Developer
Joined
Feb 5, 2015
Messages
1,035
Location
Washington, DC
Strap Yourselves In Codex Year of the Donut
Hey! Check it out. Adding some postprocessing effects to tweak the look of Septaroad Voyager. What do you think? I'd love to hear some feedback.

PostProcessComparison.gif


The big games in the HD-2D (TM) style, like Octopath Traveler and Wandering Sword seem to have some kind of vignette effect around the edge of the screen. I tried doing something like that, plus some color grading with red shadows and yellow midtones. Octopath Traveler also has some kind of strange color shift within the vignette and I'm not entirely sure what's going on in there. Maybe I'll try messing with it some more to colorize the shadows inside the vignette.
 

Gandalf

Arbiter
Joined
Sep 1, 2020
Messages
1,349
I've loaded a screenshot of your picture into gimp and had some fun with it. Bascially just changed the balance of shadows, penumbra, touched curves a little and added some gaussian blur around the corners.
Dee0N1t.png
 
Joined
Jan 9, 2011
Messages
2,696
Codex 2012 Codex 2013 Codex 2014 PC RPG Website of the Year, 2015 Codex 2016 - The Age of Grimoire Make the Codex Great Again! Grab the Codex by the pussy Insert Title Here RPG Wokedex Strap Yourselves In Codex Year of the Donut Codex+ Now Streaming! Serpent in the Staglands Dead State Divinity: Original Sin Project: Eternity Torment: Tides of Numenera Wasteland 2 Codex USB, 2014 Shadorwun: Hong Kong Divinity: Original Sin 2 BattleTech Bubbles In Memoria A Beautifully Desolate Campaign Pillars of Eternity 2: Deadfire Pathfinder: Kingmaker Steve gets a Kidney but I don't even get a tag. My team has the sexiest and deadliest waifus you can recruit. Pathfinder: Wrath I'm very into cock and ball torture I helped put crap in Monomyth
Hey! Check it out. Adding some postprocessing effects to tweak the look of Septaroad Voyager. What do you think? I'd love to hear some feedback.

PostProcessComparison.gif


The big games in the HD-2D (TM) style, like Octopath Traveler and Wandering Sword seem to have some kind of vignette effect around the edge of the screen. I tried doing something like that, plus some color grading with red shadows and yellow midtones. Octopath Traveler also has some kind of strange color shift within the vignette and I'm not entirely sure what's going on in there. Maybe I'll try messing with it some more to colorize the shadows inside the vignette.
I never understood the appeal of vignette, motion blur, or DoF in games. On your screenshot vignette makes it look like the PC is a light source (a la Diablo and the rest of ARPGs) and the whole scene is underground. Without it, it looks like a nice and vibrant forested canyon.
 

Bad Sector

Arcane
Patron
Joined
Mar 25, 2012
Messages
1,989
Insert Title Here RPG Wokedex Codex Year of the Donut Steve gets a Kidney but I don't even get a tag.
I never understood the appeal of vignette, motion blur, or DoF in games.

The point of vignetting is mainly to drive the focus towards the center of the image, it is an image composition artistic choice.

But it doesn't fit all games - IMO at least it makes more sense in games where you want to give a gloomy/oppressive and/or claustrophobic atmosphere. I don't think it fits the cartoony style in Nathaniel3W 's game, at least in those shots (though perhaps it might make more sense in another environment).

(note that AFAIK in photography it has more uses but unlike games, photographs are static)
 

Nathaniel3W

Rockwell Studios
Patron
Developer
Joined
Feb 5, 2015
Messages
1,035
Location
Washington, DC
Strap Yourselves In Codex Year of the Donut
Yaar Podshipnik I'm pretty sure the reason behind a lot of video game VFX is movies. Motion blur, DOF, chromatic aberration, lens flare, grainy tone mapping, bokeh blur--these are all digital implementations of phenomena from a physical camera. And in many instances, those real-world artifacts are the result of cheap equipment. Then developers try to mimic those phenomena because we think that's what's supposed to go on a screen.

I've heard some people with your same view say things like "These effects are the result of a camera, and in a video game your character is not looking through a camera, so you wouldn't see these effects." And that has some merit. But then the publisher or artistic lead says "We want this to look like an action movie," and the developer adds artifacts from cameras to make it look like an action movie.

Gandalf that looks pretty good. I'd really like to add blur around the edges. Unfortunately, I don't know of an easy way to add blur to a screenspace location. I think UE3 only does depth-based blur. I did build an effect once that samples color from adjacent pixels and averages them, and that creates a blurry effect, but that might be too costly. I'll see if there's some other way to do it.
 
Joined
Dec 24, 2018
Messages
1,637
Gandalf that looks pretty good. I'd really like to add blur around the edges. Unfortunately, I don't know of an easy way to add blur to a screenspace location. I think UE3 only does depth-based blur. I did build an effect once that samples color from adjacent pixels and averages them, and that creates a blurry effect, but that might be too costly. I'll see if there's some other way to do it.
Here is a shadertoy example of how you might go about it.
https://www.shadertoy.com/view/Dsy3RR

Of course, ShaderToy requires a bit of adaptation to use as a regular fragment shader, but that shows the general gist of it - measure the distance from each edge of the screen take 1 minus that distance, use the greatest of those distances as your "blur factor", then apply the blur algorithm of your choice to a copy of the image you're working on (eg whatever you've been rendering so far), then use that blur factor to interpolate between the original texture and the blurred texture. There are some constants up at the top to adjust things like how much of it is blurred or how pronounced the blur is.

(Note that the blur algorithm and the line distance function here are both other people's work, not mine, so this shader falls under Creative Commons noncommercial sharealike blah blah so if you copy it make sure to rewrite / obfuscate those portions if the source code will be accessible so it isn't recognizable.)
 
Last edited:

Bad Sector

Arcane
Patron
Joined
Mar 25, 2012
Messages
1,989
Insert Title Here RPG Wokedex Codex Year of the Donut Steve gets a Kidney but I don't even get a tag.
But then the publisher or artistic lead says "We want this to look like an action movie," and the developer adds artifacts from cameras to make it look like an action movie.

In my experience 100% of the time where an effect like that is added isn't due to publisher demand but because artists find it looks better.

I remember talking with an artist colleague of mine some years ago when i noticed the depth of field effect in the editor's viewport and said something along the lines of "this blur effect hides all the effort you put there" - his reaction was that it does look better with the filters and he insisted even when i mentioned that it destroys the sharpness.

Note that not all effects are added for the same reasons: e.g. the vignette mentioned above isn't added for the same reason as, say, motion blur (which tries to give the impression of motion "between frames"). Some effects are added to drive the player's focus in specific parts of the scene (vignette, depth of field in cinematics, etc), others are added to make the final image less artificial by mimicking imprecision artifacts (chromatic aberration, film noise, etc) while others are added to enhance the mood the developers are going for (color grading, saturation/contrast adjustments, etc) - and of course some are used for multiple of the above (e.g. film noise and vignette can also be used to provide a specific mood).
 

Twiglard

Poland Stronk
Patron
Staff Member
Joined
Aug 6, 2014
Messages
6,602
Location
Poland
Strap Yourselves In Codex Year of the Donut


The video isn't too good, but there are important features. The two big ones are the object inspector (designed to be extensible in the future) and collisions powered by an R-tree (that I only accidentally interact with in the video through the mouse cursor).
 
Joined
Dec 24, 2018
Messages
1,637
A while back I'd been wondering if it was possible to make Dear ImGui windows apply a blur to things behind them (sort of like Amplitude's UIs) and the earlier question about screen space blur, and the approach I went with, got me thinking about that again.

Turns out that making Dear ImGui windows act as a blur mask for a previously rendered scene is actually quite easy - instead of rendering the UI directly onto the previous forward framebuffer, instead render it to an empty (cleared to 0.0f, 0.0f, 0.0f, 0.0f) framebuffer, then take the image you used there, and the image from the forward framebuffer, and use the UI image as a mask for whether or not to apply blur to the forward texture (in this case instead of using its opacity as a mask, just check if it's not completely zero and if it is non-zero set the interpolation to 1.0). Then mix the forward and UI textures.

One shortcoming - UI windows don't blur each other out when stacked; that would require doing a separate render pass for each window (and intervening in the guts of Dear ImGui's own rendering procedure), probably not ideal. And in any case not a frequent situation; I've placed them like this only to demonstrate. But the ability to selectively have a transparent, yet blurred image, is useful in some cases, ie if there's a window that occupies most of the screen (like Victoria 2's topbar windows) and you'd prefer to blur rather than totally occlude the map content outside, or if you want a "glass window" effect on areas of UI elements. Or if you're not using a textured UI at all and just want a setup like Endless Legend uses. I do plan to make a textured UI later, but still, it's a neat little thing.

Also I temporarily broke map labels (and state IDs) as I'm working through cleaning up some older code.

ui_blur.jpg

Edit: actually, looking at it, I don't think Endless Legend does blur things behind its UI. I don't know why I remember it doing so.
 
Last edited:

LarryTyphoid

Scholar
Joined
Sep 16, 2021
Messages
1,740
I need to rewrite my game's main loop to only repeat based on user input. I thought I had already done this, but it seems I was somewhat confused on the nature of loops; in one of the functions called in the main loop, there was a point at which that particular function required user input (or so I had thought), and so the whole program would halt until the user had pressed a key. I didn't account for the fact that the function didn't actually require input; the whole game was running at a real-time framerate, and if that function didn't receive any input at any given moment, it'd just be skipped over. As a consequence of not knowing this and writing code based on the assumption that the program would proceed based only on user input, loads of textures were constantly being loaded into the renderer, cleared, then loaded again at every frame, which had predictable effects on memory usage. I crashed my computer twice before I figured out the problem. Rookie moment.

The good news is that I soon ought to be able to move on from the maze stuff and start tinkering with a combat system. I feel like that'll be a lot less technical. I made a rudimentary turn-based combat in Python for a school project and that was really easy. I'm sure it gets a lot harder as you include party members and stuff (I heard that the developers of Dragon Quest 2 had trouble with party-based combat, since they had no experience with implementing it before), but I'm pretty sure it'll be easier than laying the foundations for the graphics rendering was.
 

Nathaniel3W

Rockwell Studios
Patron
Developer
Joined
Feb 5, 2015
Messages
1,035
Location
Washington, DC
Strap Yourselves In Codex Year of the Donut
Just tested out some smarter enemy AI today (and fixed a couple of bugs related to dungeon generation).

SpiderAttack.gif

The thing I'm pleased with here is that only one of these spiders performed its immobilizing web attack. All the others went for a standard attack. That means the enemies are now coordinating their attacks. If one of them is already applying a status that doesn't stack, the others will choose a different action.

Something else I noticed is that I might need to make the web attack a little more obvious. The spider using web was attacking directly from the side, so the web is about as small as it possibly can be from this angle. Maybe if you get attacked from ahead or behind, the spider web will show up a little better.

And it's probably time for me to go make a dedicated thread under the JRPG subforum. My progress is probably now past the dev-blog-for-other-devs stage and is ready for the advertise-to-potential-customers stage.
 

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