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.

 
 
Pages: 1 2 3 4 5 6 7 8 9 [10]
 91 
 on: January 27, 2022, 11:10:34 PM 
Started by Holey Moley - Last post by Holey Moley
Oh man, not another PATCH :frown:

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

I felt sick at my stomach when I found out I messed up the do_fix_circle_trip_zone_radius code from the other day's patch. I knocked out the event's radius instead of the unwanted one! I guess that was wishful thinking since it turned out the other one was too difficult to get at. I honestly don't understand how I miss these things. (Edited: I just rewrote the subroutine instead.)

I also found a bug in the sky routine I use to resituate the sky in front of the transparent scene elements. It kicks in when the sky has more transparent elements than the scene itself, and there aren't 0 such elements. I guess I never saw it before because SOM's skies only have one transparent element, so that means it could never be more unless there are 0. So maybe this isn't interesting. (Edited: When blending skies all elements are transparent and there are two skies for the moment.)

There's also code in place to blend the fog and sky across maps in this patch. I expected blending the sky to look kind of funky, but it's actually perfectly smooth and even. That's a relief. I was afraid it would be a weak point.

I haven't quite figured out how to drive the blending parameter. In this patch it just blends it over the course of two seconds. That's actually what Dark Souls does. But it's not what I have planned. The one problem with my plan is it needs a notion of what is moving towards the new map and away from the old map, and that's not an obvious metric. I have some ideas but I have a feeling there won't be a perfect solution. But it should work fine most of the time if you don't do anything funny.

I have to work on fading out the BGM. I'm surprised SOM doesn't have a system for that. I think it's mute function just cuts out. But I could be wrong. It's worded that way. Anyway, after that and some work on the Japanese language pack the next release cycle will be wrapping up. It's always annoying when the previous release gets patched to the degree it's the same as the new release. Sometimes it's easy to isolate features to a release and sometimes it would be more work than is worth it for "alpha" software.

 92 
 on: January 25, 2022, 11:42:18 PM 
Started by Holey Moley - Last post by Holey Moley
REPOST: I had to pull this post after more problems started to arise. It sucks to be a programmer sometimes. So, some time has passed since I originally posted this. (The new problem was because some new code I'd written in haste failed to make some important thread synchronizing objects because C++ has this annoying thing where if you don't write the name of an object it just pops in and out of existence as if it never really existed. In this case the threads were stepping on each others toes.)

------------------------------------------------------------

Patch Patch (Important)

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

The patch I put up the other day with map streaming capability has a critical problem where the textures will be lost when an old map is unloaded from memory (kicks in a few minutes after switching maps without using the standby map system.)

Off-topic: While working on blending skies I found out that some extension code I think I thought was doing a "Z-test" optimization on the sky was being defeated by some code I might not have understood, although it's possible I did but couldn't solve it at that point, but I don't see notes to that effect. So I rewrote the sky subroutine and it wasn't working with the Z-test, and that's because opaque MDO elements force on z-buffer writes. To get around that this has to be momentarily overruled just for the sky. Anyway, what this amounts to is a pretty good optimization when portions of the sky are hidden. I.e. this should improve frame rates significantly where applicable.

Oh yeah, another weird thing I noticed yesterday is the circular trip zone event system actually adds the radius it's given to the object/character that's bound to the event's own radius. I've disabled this behavior. I added a do_fix_circle_trip_zone_radius extension to the Ex.ini file in case this breaks a game that can't be fixed. The square trip zone doesn't do this. I guess someone didn't get the memo.

[EDITED: I also patched x2mdl (http://csv.swordofmoonlight.net/x2mdl.dll/1.0.0.2.zip) earlier today. It wasn't working with when the model has no (0) polygons/vertices (i.e. a dummy) because of some error checks I wrote for reasons I'm not sure why.]

 93 
 on: January 20, 2022, 02:12:40 PM 
Started by Holey Moley - Last post by Holey Moley
Attachments * Neutral_SOM_MAP.zip 
Here (attached) is a copy of SOM_MAP that can be copied into the TEXT/English/Neutral.zip (or if unpacked dropped into the Neutral folder) to add an event "module" to SOM_MAP to be able to direct an event to load a map in the background. It's just something to play around with in the meantime if anyone wants to try this out. (I've been talking some lately with "Verdite" who's responsible for the Moratheia project.)

A word of warning is if you remove (rollback) this patch or this language pack feature then SOM_MAP will quietly remove the event "module" from your events.

I've also updated yesterday's patch just now just to add a little readout to the F6 display that will show the second map in memory under the "map" heading. You can confirm it's working that way. I'm thinking about how to display the percentage of the maps' loading progress, but didn't add that yet. Generally they will load in a second or so, but there's no precise way to say given that PCs all have different capabilities. If loading is that fast then a loading percentage readout might only be a blip.

In the present state you need to check the new "Relative" option in the map transfer event module to get the maps to change without any visual indication. I don't know if there's any other route to doing this than this way. I have to study it some more if so. (Edited: The problem is that the preexisting behavior likely has to change to let the other modes be used this way, and I'm not sure it's worth it given limitations.)

Of course the sky and fog settings will be a tell unless they're identical. I'm still working on this. I think that lights system I spoke of will also entail settings for overriding the fog and sky and map title and BGM. This will let you designate organic subsections of maps as having different conceptual localities. Plus KFII has tiles with custom fog that have to be implemented for my project to faithfully reproduce them. It's still possible to blend in the fog on map changes, as it would be possible to do with the ambient light if it wasn't burnt into the maps' vertex colors. (I don't know what it will mean to have a variable sky, most likely it will just be a way to switch between interior and exterior sections.)

 94 
 on: January 19, 2022, 07:59:24 PM 
Started by Holey Moley - Last post by Holey Moley
Emergency Patch

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

I learned 2 days ago that I messed up again and had broken sound effects on "objects" and the magic equipment (and a few other things too) but I was too deep into debugging the new background loading system to be able to publish a patch... and a little embarrassed to be making so many patching posts.

I hoped I could iron out some troubles yesterday, but it took me 2 days of keep running into things. (Plus I figure probably next to no one is downloading these patches. I make them out of principle.)

I don't like how the work on the next release is being consumed into this release. It's about tantamount to just roll it into this release as an early demo. I will announce it since it's an interesting juncture. Technically it can be used with this patch but just requires a language pack with the extra event module for SOM_MAP. I may upload that tomorrow as a sneak preview. I still have to work on blending the fog and sky to call it good enough to officially publish it.

I won't be surprised if something breaks, but this patch/version will start loading the first map either when the New Game option is chosen, in which case an intro sequence can hide the loading, or if do_start and start_mode=1 is used it will start loading as soon as the first title screen. I also intend to work on starting the load when a save file is chosen, since it takes some time to move the button up to Yes (it defaults to No) which can be enough to load a game.

Currently it can take time to process textures, which this patch doesn't do all immediately. I've been able to improve the start of maps, especially when they fade in. The first frame will process everything that's in its scene, but after that it starts processing in the background and goes ahead and starts playing the map. This would benefit from implementing the prioritization system I've in mind even now. But I also intend to move that processing into x2mdl ASAP. Technically even x2mdl runs in the background now, so it might not even be noticed if lucky.

I've had to switch Direct3D 9 over to a "multi-threaded" mode, which is supposedly pretty flaky and naive. It might not be necessary if these textures were processed by x2mdl but it can take several milliseconds to process them at runtime, which is too much to do on the same thread as Direct3D. It seems to work, but it can't upload textures without jamming, so I've set it to upload one processed texture per frame. Of course if a model actually requires a texture it will be uploaded in addition to this, and too many can result in a hiccup. It might be nice to be able to fade things in a little late in that case to avoid frame drops. I think only NPCs and items fade in normally.

Support for NPC reskins is limited too. The model preloading system isn't fully aware of skins now, so it will apply the first skin to a model, so that model will never have a different skin if there's more than one. I will work on this. I don't know if the Moratheia 2.1 demo doubles up models with skins. Now with MDL+MDO skins aren't required but can be an optimization for "palette swapped" NPCs.

There's also the start of an alternative "item" pickup experience, but it feels a bit flat. I will have to study KFII to see if it has any sound effects involved. It can be jarring to not have the visual spin around and rise up. I have to work on that. Luckily this can be turned on and off in the Options menu. I will probably update the TOOL folder again after some sleep and more testing and confidence this time.

 95 
 on: January 16, 2022, 04:45:52 PM 
Started by Holey Moley - Last post by Holey Moley
follow-up

I found myself doing a small project at the end of the day from the previous reply in this topic/thread about converting a useless option into a way to get classic KF style experience when examining items. I just laid down the basics. I still have to work on animating the item transition and manipulating it with the controller to call it finished.

But something really weird I discovered is the third toggle option that hides items in menus doesn't actually prevent the model files from being loaded up. That's really weird because I assumed its purpose was to speed up the menus. And I was surprised it even hides items from the pick up screen... which is doubly bizarre since they completely disappear from the scene before appearing in the menu display, so that with this option enabled (or technically off) it looks as if the object (item) has disappeared entirely from the game.

I hope I can find time to mess around with this more before long but it's good either way to be rid of that funky option in the meantime. I have set up a button toggle to turn the menu on and off with the triangle button or J key, but it only works when examining items outside of menus. I'm thinking about having the other button show text, but the menu shows the name too, so it can be used to reveal the name briefly before taking the item.

Edited: Oh yeah, for the default English I called it "Examine Display" and I'm thinking of leaving the Japanese alone since it calls it Item Display (in Japanese) which seems close enough to the meaning.

 96 
 on: January 15, 2022, 01:28:15 AM 
Started by Holey Moley - Last post by Holey Moley
Patch Patch

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

Yesterday's patch had a bad number in it (offset to the PARAM/OBJ.PR2PRO index in PRM records) I'd inputted incorrectly into Ghidra. I also forgot to use the loading routine I wrote for object instances... luckily my brain told me this when I woke up this morning. I don't know what I'd do without my brain figuring this stuff out while I'm sleeping and pointing out my mistakes in the morning.

I had to update the TOOL folder (again) and I'd like to consolidate the last three posts, but I feel like there's information in them that would be collateral damage if so. Daily patches never get old. It feels like once a release is published its patching draws on until the next release. Probably a good reason to hang back one release cycle.

 97 
 on: January 14, 2022, 11:43:15 AM 
Started by Holey Moley - Last post by Holey Moley
Patch

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

I found out I missed two subroutines that attach equipment graphics to the arm model. One of the annoying things about Ghidra is it tells which subroutines use which subroutines, but not how many times they do or the places that they do, so it's easy to forget to manually use F3 to search for duplicate instances. I've updated the TOOL folder to complement yesterday's arm equipment related patch. I should've put some gloves on (in the game) but I usually don't have that on in my tests.

BTW today I had to rewrite the equipment code from scratch. I figured out yesterday it had a lot of problems around ref-counting its sound-effects and SFX (special effects) references. The hacks I'd accumulated around it were getting to be too much anyway. It's a lot nicer system now. The NPCs and objects (character models) didn't have code for decrementing their ref-counts, so I had to add that, and rewrote their code too to only make references for each item in SOM_PRM instead of each in SOM_MAP. There's also numerous (fixed) bugs in the SFX and SND references code itself.

I think I'm through the woods on improving how resources are juggled. Next is (finally) loading object/character models in the background. The background loading system will also be helpful for speeding up the start of the game. I'm going to add something to the game INI file to remember the last map you played and assume it will be the one you will play next time, and go ahead and start loading it from inside the title screens.

 98 
 on: January 13, 2022, 05:52:34 AM 
Started by Holey Moley - Last post by Holey Moley
Important Patch

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

This patch fixes a new crash on leaving the Inventory screen (a minor screen for hiding items to have fewer to scroll through) AND the arm model (arm.mdl) has special needs for using the new MDL+MDO system that didn't occur to me. Namely it needs to hide its segments (i.e. the hand, forearm, etc.) selectively. The arm code needs a patch to hide the MDO elements instead of the MDL elements (which don't exist) so no the arm segments aren't going to be hidden when putting on gloves for example without this patch.

 99 
 on: January 08, 2022, 10:52:11 AM 
Started by Holey Moley - Last post by Holey Moley
Important Patch

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

I'm not sure when this started, but I just noticed the Brightness option was disabled. It turned out a whole file (http://svn.swordofmoonlight.net/code/SomEx/dx.ddcaps.inl) was excluded from the build by a // programming comment, that I swear I doubt I inputted. Sometimes the editor inserts random things into text based on esoteric key combinations.

In this case it probably made the video card seem to have no functionality. Fortunately the brightness (gamma) functionality was the only thing I noticed trouble with, but it could have further reaching effects.

I've updated the TOOL folder with the previous patch. The last patch also probably breaks synchronization of the "systemwide" events on map change. (This one--hopefully--fixes it.)

I've been working furiously the past 2 days on shuffling a lot of things around to decouple loading MPX files from the global game level state so more than one map can be managed at a time. There's a good chance this will cause some fallout afterward as sometimes its hard to remember what has been manipulated to change SOM's behavior. It's dicey to publish patches with this degree of changes in play but in this case the bug is too great to ignore. That "decoupling" is done now. I still have a lot of work ahead to transition maps without being noticeable. The main things are loading files (of course) and then controls (sounds trivial but it's not) and finally the parameters of the source and destination maps has to be smoothly blended (faded) somehow. I hope to do this gradually and imperceptibly only as you move away from the spawn point, but for some things like sky models it's going to be pretty obvious without sacrificing too much performance.

 100 
 on: January 06, 2022, 07:15:54 AM 
Started by Holey Moley - Last post by Holey Moley
Moratheia demo patch (and NPC skin bug)

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

Update: I remembered last night after going to bed that there was a clerical error that broke the skin system (and caused everything to go haywire) so that this fix is not strictly limited to plain/legacy MDL models, but also affects the new MDL+MDO models. IOW this patch is required for "skins" but I'm not patching the TOOL folder because this is an advanced feature that SOM's own models don't utilize.

I missed some things for old projects not using the new MDO+MDL system like this (http://www.swordofmoonlight.net/bbs2/index.php?topic=154.0) Moratheia 2.1 demo for example.

One thing is the "skin" feature of NPCs and monsters. Another problem pertains to this demo more specifically since its arm.mdl file (floating first-person arm) depends on the old behavior of ignoring "translation" movement on the root node of the arm's skeleton. To deal with this I had to tie the new behavior to the new "modern" bit setting in the MDL file. The new behavior subtracts the base CP from the node both to make it behave like the other animation type, and to be less counterintuitive. (Edited: being "intuitive" functionally means greater flexibility.)

Pages: 1 2 3 4 5 6 7 8 9 [10]