simple machines forum

Please login or register.

Login with username, password and session length
 

News:

Remember to make your own backup of posts before submitting.

 
 

Author Topic: EXIT: A light at the end of the tunnel...  (Read 5155 times)

Holey Moley

  • Website System
  • Administrator
  • *****
  • Offline Offline
    • MaleView Profile
    • twitter.com/m__7761
look out honey, 'cause I'm using technology
Holey Moley says,
« on: July 21, 2015, 10:49:25 PM »

I’m not sure where to begin. There’s a new mega-release up. With lots of surprises in store! It finalizes the jumping model, and adds a way to lower the point-of-view 1/3rd, letting you pass beneath things at about 22% below head level. It might not sound like much (these figures are adjustable) but even for the default height — that’s a bit on the short side — this comes out to about a full screen at nose length; which will seem like a lot.

The new feature complements jumping, since jumping now requires the release of the ground-based movement inputs. If you do not jump but instead move away, then you are able to squat/hunker down in this way. If running this is automatically done so that you do not have to stop to do so. If pressed up against a passageway or obstruction, beginning to run will pass beneath it at walking speed, at which point you can stop running if you only wish to enter the space. (If you do not jump while running you simply return to a walking gait. This should go without saying.)

There is the beginning of a way to run at full speed. There is no penalty for doing so at this time. It is not possible to run at full speed when there is not room to stand fully erect. Doing so requires that you hold down all three buttons. This release was supposed to add the ability to look behind while running, by holding down either button, so that when they cancel each other out you run at full speed instead. Run for your life as it were. However because a bigger priority was finalizing the jumping model, all efforts got directed at its complement in order to fill the hole opened up in the control scheme…

A secondary goal was a reexamination of the ceiling clipping facilities; or that is, ensuring that you cannot go through the ceilings and bottoms of things. One way to go through the ceiling is jumping. Of course jumping has been possible for a while, so this was to be more of a critical analysis. Still the addition of lowering of the head height to the control scheme came as a surprise. It meant that all of a sudden not going through ceilings would be absolutely critical; as critical as not falling through the floor. So the thrust off this release shifted radically, becoming an all encompassing appraisal of the clipping facilities touching on every dimension, including bugs and/or incongruences in nearly-if-not-every case.

This came as a surprise, but ended up being a really good thing for Sword of Moonlight. Graphically it’s been solid for some time, but in terms of the impermeability of its creations, it’s been anything but. I’m almost embarrassed that it took so long to take a serious look at this after all of the problems that turned up. It’s truly a case of lacking the senses to see the problems before you. I couldn’t feel the holes in the world, but I could reason my way through Sword of Moonlight’s programming; and in the course of doing so I stumbled into more than my share of invisible holes game-side.

But that’s not the only thing this release has in store! Toward the end of the development cycle I got involved in extracurricular activities. I had a lot on my mind, chief among which was how to improve Sword of Moonlight’s performance profile on my own computers. This meant disabling antialiasing, but not wanting to, I devised a simple stipple technique that I reasoned could exhibit the same pros and cons as basic antialiasing; which did. But even better! It works with the pixels that are knocked out of their “textures”. Normally these become second class pixels, unaffected by antialiasing. (Raising the question: should AA even be used at all?) But what was unexpected is, the stippling makes the telltale signs of polygons disappear so that what remains is pure form, pure form in the form of dots. Not pixels. Dots. Dots simulating points of light.

Mid thinking up the stipple technique I thought to tryout an interlacing technique. Not knowing what to expect, I reasoned it ought to halve the pixel calculations, which in theory would be great, since high resolutions tend to run my computers straight into the ground. I knew it would also create the impression of blurring, but wasn’t sure what to expect. I was pleasantly surprised that its unbiased motion blur really brought Sword of Moonlight to life. So it seems to be a win-win salve just as long as it doesn’t make anyone motion sick or anything like that! Still in its current form it doesn’t even come for free, performance wise, BUT I have a plan that should actually work to halve those pixels and is more broadly applicable … I’m so excited I’m certain this is the next thing I’m working on. I can’t stress how impressive this effect is. I don’t think anyone will ever want to play a game without it; and of course better performance can only be a good thing.

And what’s more, there just happened to be a problem with jumping/falling breaking down at low frame rates. It may be too soon to say, but the work I did to resolve this issue looks like it may have ALSO solved all of Sword of Moonlight’s timing issues (resulting in a chronically irregular frame rate even under ideal conditions.) I’d never seen it hold a steady 60 frames per second before, but now I do, regularly. I think my video adapter (GPU card) may be responsible for some of the intermittent irregularities, so it’s really hard to say, but the jumping/falling problems are definitely fixed, and I’ve placed an order for a new adapter.

And last but not least, or at least until I recall something else! Xbox-like controller support got added the other day. Previously you’d have to map the Start-and-Select-like buttons to critical functions. Sorry! I just never had an Xbox controller in front of me, and hadn’t really thought about it; although this had occurred to me from time to time. (Still what can you do without a physical controller? or anyone demanding Xbox controller support for that matter!)

SO, what I’m hoping IS that all of this means Sword of Moonlight is getting very close to being capable of carrying top-shelf, prime-time, commercial-if-you-want, video, games. Or at least it feels like this is no longer inevitable, but suddenly something tangible that is almost just within reach…

Pro forma Forum Discussion post. I'm spent. Spent the morning setting up Visual Studio 2010 on my XP box so I could debug a crash on it. Incidentally it's no longer available on microsoft.com. It's tempting to drop XP support, but it has a knack for revealing bugs born of logical errors (incidentally the jump from 2005 to 2010 is also new in this release I think)

The XP box actually performed better game-wise than my workstation. Which is good news if I have to use the VR headset that I hope to be working with next month with the XP box. Like the blog says I have a new GPU on the way for the workstation, which I expect to outperform the XP box considerably, but the workstation only has VGA out being laptop based, so I'm just assuming VGA won't be an option VR headset wise, but since OSVR is supposed to be extremely flexible maybe it will be.

I will write a likely longish breakdown for this release tomorrow. It's my bedtime :goodnight:
« Last Edit: July 22, 2015, 07:59:38 PM by Holy Diver »
Formerly "Holy Diver" ("Holy") [Holy will be back as soon as I'm back to full form]

Holey Moley has 2726 posts

Holey Moley

  • Website System
  • Administrator
  • *****
  • Offline Offline
    • MaleView Profile
    • twitter.com/m__7761
look out honey, 'cause I'm using technology
Holey Moley says,
« Reply #1 on: July 22, 2015, 03:24:32 PM »

EDITED: First the release files:

http://csv.swordofmoonlight.net/SomEx.dll/1.2.0.6.zip

It isn't necessary to update this file with the updater for this release.



Now I'll try to recount everything.

There's a list of bugs that were turned up here (http://en.swordofmoonlight.org/wiki/Sword_of_Moonlight_Extension_Library/bugfix_extensions#do_fix_clipping_player_character)

This is the new bugfix extension. It is on by default, and does not affect NPCs or missiles as its name suggests.

Manual climbing (generally desirable for anything much higher than stair steps) now requires tapping the Action button, and it's a little more sensitive than I'd like it to be. You have to be pressed up against what you're about to climb. I intend to make it so the tap can occur while you are on your way towards the edge of the climbing surface.

I slowed down the climbing speed when manually climbing by a third. I felt it seemed glitch-y with the new ducking period before climbing owing to the tap.

There is a kind of development journal here (http://www.swordofmoonlight.net/bbs2/index.php?topic=223.0)

There's the beginning of footsteps, but you must provide a sound effects file number, that can be programmed to change according to circumstances. I intend to develop this further after a game has been setup to use it. That extension is footstep_identifier in a new section called [Sample].

The extension for the new squatting height is player_character_height2 in the [Player] section. Its default is 1.25. I'd like to make it so that if you do not manually squat you'll stand back up even if walking when exiting a crawlspace, but I think crouching while inside crawlspace will register as a manual squat, as if resting your legs. So the rationale is by the time you leave an extended crawlspace your legs will have to readjust to the outside, so you can take your time to manually stand up then.

As always you climb if you're jumping onto the face of a ledge, without pressing the Action button. But you still have to recover the movement inputs and press up against the ledge. I like this, but there's little choice because if you don't press up against it there isn't anything behind you to get you onto the top of the ledge. It may not be necessary to push if you clear the auto climbing height, as if your knees made it onto the top of the ledge... I'd rather it not be, but I don't know off the top of my head.

I would like to revisit what happens when you move more than halfway off the ledge and one of your feet must then drop off of it if not moving. I think this needs more work to be of the same quality as everything else at this point. But my will for working on this class of problems has been exhausted. I have to work on something else to recuperate before I can return to them with enthusiasm.


Problems remain for very gently sloping ceilings and climbing onto floating platforms (eg. a cantilever) made of MHM polygons from the side/below. They cannot be addressed without peeling back the next layer of SOM's clipping subroutines at a later date. The MHM files that come with SOM seem to use a lot of cheats and so will not behave correctly until they can be redone. Likewise the sloping ceilings, especially in the cave tiles don't function fully as ceilings. But if you are making new MHM files you can just slip in a flat ceiling to do the job. The cave ceilings are so slight that they should've been flat in the first place.


SOM has/had a horrendous bug where slope tile polygons meet flat ones that's been fixed. Lots of other bugs are mentioned in the bugfix extension description above. Still if two slope meet each other in a V that hasn't been fixed. I recommend slipping a flat polygon between them somehow, however thin-or even underneath them, if you must have that shape. If you want to be able to jump off of a slope that ends in a cliff you should add a flat lip to the top of the cliff that connects to the cliffside, because if not the player will begin falling as soon as their center is on the edge of the cliff, and will likely be kicked out then by the wall. So you want jump and you will get a clipping glitch to boot.


The new stipple and interlace/motion-blur extensions are do_stipple and do_halve in the [Option] section. The stipple overrides do_aa if dithering is in use. To use dither you must use do_dither and be in a 16-bit High Color mode (the dither dithers from 32-bit color to 16-bit color, so the underlying color is still 32-bit)


All of the ways to jump and crouch, etc. with dedicated buttons/keys have been disabled, including the old way to put the game in stealth mode with the Caps Lock key/Select button, so that keyboard users can no longer be stealthy. I don't know that they will be returning. The keyboard is not fit for regular play and never will be. For now you have to use the Action button/key for everything. The Select button is now equivalent to pressing Escape, and so lets you change the Analog Mode, which I think is the best use of select for now.


The changes I made to timing that may or may not improve the frame rates could potentially hobble your system while the game is running. That's because it's supposed to be given top scheduling priority. You'll want to Pause your game when not playing it and be sure do_auto_pause_window_while_inactive is on. I should probably make the auto-pause detection more aggressive for this reason. I'm still not convinced the thread scheduling priority changes are making a difference, but they felt like night and day the first time I tried it that way...

Operating systems like Windows are really not the best for games. It needs a dedicated game mode that prevents programs from doing regularly scheduled maintenance tasks in the background.


Fast turning is now fixed at 360 degrees per second. I don't have a problem making that an extension, but it isn't tied to the SOM_SYS turn rate anymore. When using do_dash you'll now turn at the walking turn rate while running, but there is a short window at the top of the dash where the turn rate will speed all the way up as before, before coming back down.
« Last Edit: July 23, 2015, 12:35:16 PM by Holy Diver »
Formerly "Holy Diver" ("Holy") [Holy will be back as soon as I'm back to full form]

Holey Moley has 2726 posts

Holey Moley

  • Website System
  • Administrator
  • *****
  • Offline Offline
    • MaleView Profile
    • twitter.com/m__7761
look out honey, 'cause I'm using technology
Holey Moley says,
« Reply #2 on: July 24, 2015, 01:20:25 PM »

Yesterday I worked on switching the interlace extension over to using a stencil buffer model. It all shook out alright in the end, and wasn't any worse or any better performance wise. Which is a good thing since it means it can be relied on to halve the workload of the pixel shaders if necessary.


I can't seem to find any information on my workstation about how much onboard memory the GPU card has. I think there is an area in the Nvidia control panel with Nvidia System Tools installed that's supposed to say this, but it's blank for me. But I remember at some point seeing somewhere that the card I'm using only has 256MB of memory. It may have just been when I was shopping, but I distinctly remember seeing it on a screen somewhere...

Anyway, I think the reason my computers run slow/wild at higher resolutions is a 1080 HD frame buffer needs about 64MB of memory. So SomEx typically uses an effects buffer and a back buffer, plus a 32 bit depth stencil buffer, so that works out to 190MB of memory, leaving only about 64MB for textures and things. So it's a wonder this works at all (much less with multisampling.) The memory must be juggled.

Even if the window fills the screen, Windows 7 is still probably going to be fighting for some of the memory for its compositor, which is itself a 1080 back buffer, and so could fill up the entire remaining 64MB of memory.

So the moral of the story is there needs to be at least a GB of video memory on your system if you want 1080 games. 256GB is probably only enough for movie playback. 512MB might work, but barely if so.

My XP box has either 512MB or 256MB according to Wikipedia. Like the blog says I have GT model GPU card with 1GB en route from China to replace my workstation's card. It's an upgrade but it's also been a while so I worry it needs to be cleaned out and reseated. I don't remember having a lot of options when I ordered the card more than a few years ago. It's an MXM II slot (the whole damn laptop has to be disassembled)


Strikeout: it seems I did calculations based on bits instead of bytes. So it's the square root of these figures that apply, and I don't know why this would be a problem for it unless there are internal buffers.


EDITED: Oh yeah. Because everything is interlaced, the do_smooth extension samples between the scanlines, so I had to clean up the PAUSED screen. It temporarily disables the interlacing at the end of the last frame so that the black tint and text isn't interlaced. Unpausing is a smooth transition.
« Last Edit: July 24, 2015, 11:47:16 PM by Holy Diver »
Formerly "Holy Diver" ("Holy") [Holy will be back as soon as I'm back to full form]

Holey Moley has 2726 posts

Holey Moley

  • Website System
  • Administrator
  • *****
  • Offline Offline
    • MaleView Profile
    • twitter.com/m__7761
look out honey, 'cause I'm using technology
Holey Moley says,
« Reply #3 on: July 25, 2015, 03:35:03 PM »

The source code is now up, including the stencil based do_halve implementation. I didn't update the DLL but I can on demand.

I'm going to look at the NPC shadows next. I'm approaching this by writing to a secondary buffer with "multiple render targets" the Z coordinates of everything on screen, to be used to reconstruct the shadow correctly when they are displayed. For shadows on transparent surfaces, my strategy is to use the closest surface, so NPC shadows will disappear if they go behind transparent surfaces. But will appear on top of the transparent surface.


EDITED: I forgot to mention that the MRT approach doesn't seem to be compatible with multisample based antialiasing in Direct3D 9. It doesn't look like it's possible to access the depth buffer or copy it to a texture either. So this means if I can get this working, do_aa should probably be deprecated or something. I've been thinking that it's of dubious value because MSAA doesn't work for all pixels anyway, so my thinking is if for no other reason, consistency of presentation should be more important than a mere effect. And do_stipple seems to work as well as MSAA for me, although I never tried cranking up the "quality".

My XP box has FXAA, which I think would work. I don't see the option on my workstation. It might be there after I replace the card early next month. Super sampling would be better to do internally, but may also be an option for people that can afford it.
« Last Edit: July 25, 2015, 08:56:53 PM by Holy Diver »
Formerly "Holy Diver" ("Holy") [Holy will be back as soon as I'm back to full form]

Holey Moley has 2726 posts

Holey Moley

  • Website System
  • Administrator
  • *****
  • Offline Offline
    • MaleView Profile
    • twitter.com/m__7761
look out honey, 'cause I'm using technology
Holey Moley says,
« Reply #4 on: August 07, 2015, 01:39:45 AM »

Surprise Somversion Release

I just uploaded a new version of Somversion.dll (1.0.2.8) that fixes a bug introduced by trying to convert its temporary file folder into a long file name (just so it looks nice printed out.) The bug happens if the folder doesn't exist, which is probably a likely scenario for first time users!!

I discovered this after upgrading to Windows 10. It must've wiped the temporary folder, or changed its location. In any event I've recently done a fresh install--a month or so ago--with this build, and it seemed like it basically worked; although I have no idea how.

Somversion is used to update DLL files whenever possible so to try to keep them from bloating the SVN database on the server. It also handles language packages and probably fails to download or downloads very slowly for lots of people because I think I have to program a way for its downloader to resume the download after the connection times out.
Formerly "Holy Diver" ("Holy") [Holy will be back as soon as I'm back to full form]

Holey Moley has 2726 posts

Holey Moley

  • Website System
  • Administrator
  • *****
  • Offline Offline
    • MaleView Profile
    • twitter.com/m__7761
look out honey, 'cause I'm using technology
Holey Moley says,
« Reply #5 on: August 10, 2015, 08:39:00 AM »

My workstation is without a GPU card right now until I can decide what to do (it's like a 3hr job to put the old one back in and I'm waiting for some mail to see if the new one can be used or not by updating the BIOS)

I'm also facing the prospect of reverting back to Windows 7 after upgrading to 10 because it keeps switching the signal to the monitor off. So I was going to just take a break, or switch to working on my backup PC. But even with the crippled video without the GPU card or with it only half functional (I don't know which is which) at least Windows 10 isn't switching the monitor off (getting it back requires a reset)


So! I recalled the problem with the updater/downloader I wrote about in the last post, and thought I should challenge myself to work on that instead. It's never too soon to fix that problem (if there is a short order fix) and it isn't something that requires a GPU card, so it seems like the right thing to do at the moment.

I need my work more than it needs me. I always regret not having more time to read or this or that much less play a video game once a year, but without my work something is missing from my life. I'm unfit for anything except nose to the grindstone, monastic work.


And so with any luck I'll probably be posting a new version of Somversion soon. But probably not with the same fanfare of a SomEx release.
Formerly "Holy Diver" ("Holy") [Holy will be back as soon as I'm back to full form]

Holey Moley has 2726 posts

Holey Moley

  • Website System
  • Administrator
  • *****
  • Offline Offline
    • MaleView Profile
    • twitter.com/m__7761
look out honey, 'cause I'm using technology
Holey Moley says,
« Reply #6 on: August 17, 2015, 06:21:58 PM »

Fix/demo

I just noticed that I broke the newly added object bottom clipping when I was adding the probing for passing beneath objects while running.

Strikeout: it was supposed to be added, but technically this is its first appearance.

There is a demo attached that fixes this. It's technically a demo for the next release. Right now it just has an improved sky, and probably some things that will improve the frame rate.

It also has jitter built into do_stipple. The extensions including do_halve are officially part of the next release. I'm inclined change do_halve's name since I've increasingly convinced myself that its goal of halving the number of pixels computed is likely futile since AFAIK GPUs work on batches of pixels that tend to be small square grids, but I think I'll hold out in case the technology exists or will exist to do line shaped batches.

(I honestly think the interlaced motion blur effect is so effective it should be built into hardware so that batches know to exclude every other row. I wish I knew what to websearch to find out if anything like this exists.)


PS: Where the skies blend into the horizon is smoother than ever with dither since the stipple/jitter techniques add two additional levels of subjective blending. You have to setup sky blending into the skyline for this demo, but I intend to make that automatic by default in the final (non-demo) version of the next release.
Formerly "Holy Diver" ("Holy") [Holy will be back as soon as I'm back to full form]

Holey Moley has 2726 posts

Holey Moley

  • Website System
  • Administrator
  • *****
  • Offline Offline
    • MaleView Profile
    • twitter.com/m__7761
look out honey, 'cause I'm using technology
Holey Moley says,
« Reply #7 on: August 25, 2015, 09:16:07 AM »

FYI

I have a new SomEx.dll build that fixes a problem with SOM_MAIN's New Project dialog that says not enough disk space. Somehow (I don't see how after fixing the problem) this doesn't always happen (edited: Verdite alerted me to this)

And a fix for opening SOM_MAIN up into script editing mode from one of the new buttons in the other tools that is/was crashing in the Release builds.

If anyone needs this post or email me.
Formerly "Holy Diver" ("Holy") [Holy will be back as soon as I'm back to full form]

Holey Moley has 2726 posts

Holey Moley

  • Website System
  • Administrator
  • *****
  • Offline Offline
    • MaleView Profile
    • twitter.com/m__7761
look out honey, 'cause I'm using technology
Holey Moley says,
« Reply #8 on: September 13, 2015, 02:08:52 AM »


There is a new version of Somversion.dll (1.0.3.2) up that addresses the longstanding issue with the downloader on some systems. I had to bring my workstation into town to debug this, so it's been a while coming.

Just update your TOOL folder. The updater may want to update Somversion.dll afterward, but you can just cancel (it will report that the versions are the same)
Formerly "Holy Diver" ("Holy") [Holy will be back as soon as I'm back to full form]

Holey Moley has 2726 posts