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.

 
 

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - Holey Moley

Pages: 1 2 3 4 5 6 [7] 8 9 10 11 12 13 14 15 16 17 ... 58
91
Devs / Re: EXIT: Long time no update! (Sorry about that)
« on: January 27, 2022, 11:10:34 PM »
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
Devs / Re: EXIT: Long time no update! (Sorry about that)
« on: January 25, 2022, 11:42:18 PM »
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
Devs / Re: EXIT: Long time no update! (Sorry about that)
« on: January 20, 2022, 02:12:40 PM »
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
Devs / Re: EXIT: Long time no update! (Sorry about that)
« on: January 19, 2022, 07:59:24 PM »
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
Beginner and other Nonsense / Re: STICKY: Random News
« on: January 16, 2022, 04:45:52 PM »
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
Devs / Re: EXIT: Long time no update! (Sorry about that)
« on: January 15, 2022, 01:28:15 AM »
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
Devs / Re: EXIT: Long time no update! (Sorry about that)
« on: January 14, 2022, 11:43:15 AM »
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
Devs / Re: EXIT: Long time no update! (Sorry about that)
« on: January 13, 2022, 05:52:34 AM »
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
Devs / Re: EXIT: Long time no update! (Sorry about that)
« on: January 08, 2022, 10:52:11 AM »
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
Devs / Re: EXIT: Long time no update! (Sorry about that)
« on: January 06, 2022, 07:15:54 AM »
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.)

101
2022 translation note

It's been a while since I last posted in this topic/thread. I wonder if the most recent VR post is even best categorized into this dev-log.

I'm trying to frame new programming projects in terms of SOM itself, so that I will reserve this dev-log for only things very specific to this project, like how its art is progressing mainly.

Before too long I intend to break ground on the second map, and I will share some shots of it I'm sure. I'm also working (right now) on connecting maps without load screens.

But now I want to log a recent idea I had. One of the more daunting tasks for this project is translating KFII from Japanese into English without reference to the PlayStation translation. A hard to translate piece of this is how it refers to Dias Basil[1] to hide his identity or possibly an in-universe means of hiding his true identity, i.e. a secret identity. The original translation invents Necron for this purpose. I can't use that for legal reasons, but I want to be closer to the original text, but I don't want it to be clunky.

So I've not been sure how to thread this needle. The original text uses a kanji phrase that is often translated as "pope" (i.e. it would apply to the Catholic office of pope, or Pope?) That was the only translation I could find for many years, but I have seen at least one alternative translation, although I think it may not have been a natural English word or phrase... as in it might fit for a foreign title, or it might've been more of something you'd expect to find in a fantasy story. I don't necessarily want to deploy fantasy terms for KF, even though it is fantasy, I want to give it a patina of something deeper than mere fantasy.

The other day I think I found a solution, when I saw for a moment what was I think an online moniker of someone's pop up in a video on YouTube, maybe a streaming something. It was just the word Pope. It made me think maybe some people have Pope as their name. It sounds like it could be a name, or a surname even if not. I'm not sure. So I thought, what if instead of Necron as proper name the name Pope as proper name was used instead. This seems like it works to me. To explain the difference, upon reading Pope in some places, you might think that it means a pontiff. But in other cases if used as a regular proper name (depending on articles... or lack thereof) then you can begin to pick up that it's being used just like a name and not like a title.

I'm not sure how it will manifest in the translation, but you can see the difference if you imagined we just referred to the pope as Pope, as if using their first name, then that would change its reading. You'd never have to use "The Pope" in the text, which would be awkward I think. And Pope seems like a cool name or nickname to me. Anyway, this is how the sausage is made. One by one these conundrums have to be solved. I'm not going to fly by the seat of my pants like how games were quickly "localized" in PlayStation days. I think more care is given to localization these days even for commercial games, but I'm not sure how illiterate video game texts tends to be ATM. I'm definitely going to shoot for a hyper-literate feeling. Hyper here means I might even stretch it just to underscore this as intent. That said I'm going to shoot for something as natural as possible too, but not unmemorable.

Edited: [1] I just noticed now (same day) on this (http://en.swordofmoonlight.org/wiki/King%27s_Field_II/list_of_in_game_bios) page Dias's surname is given as Bagil. But I checked the Japanese, and it seems I was correct to say Basil. Just for the record.

102
Devs / Re: EXIT: Long time no update! (Sorry about that)
« on: January 05, 2022, 05:33:50 AM »
SOM_MAP shift+drag patch

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

I'm not sure how long Shift selection with the mouse has been broken, but I failed to include a fix in this release with some improvements to mouse input.

I should've dug into it, I couldn't think of a reason it shouldn't work, unless it had never worked. But that seemed unlikely, but there's many unlikely things in SOM. The problem turned out to be something out of left field. In inverting the sense of the Ctrl combo by default, I changed some code that used an unusual approach to calling this subroutine, via a register. I didn't think that the same register would later be used for the Shift test, but that's what was happening. I have a strong hunch this bug was only introduced in this latest release, but it's hard to go back and test this theory.

I'm trying to make this release a stable, long term release, since it jettisons all previous versions of SomEx.dll, so I've gone ahead and updated the binary once again (I wish I'd waited a few hours ago to do this, but I just found myself at the end of my day with enough time and desire to do a small task.) It would be nice to establish a long term release because this release broke from the past, so there's nothing to fall back on. However the next release--or maybe the one after--will have the same problem as this one when the MSM files are changed over like the MDO and MDL files are changed by this release.

103
Devs / Re: EXIT: Long time no update! (Sorry about that)
« on: January 05, 2022, 02:24:46 AM »
load time regression patch (important)

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

Edited: I've also updated these files (and code files) in the SVN (Subversion) repository, so SVN Update is another way to update to this patch.

Since I'm working on better loading maps I lucked into noticing that the Microsoft system (IShellLink) for extracting targets from "shortcuts" was roughly tripling the amount of time it takes for a game to start up since it takes about twice as long as it does to read a file. FYI the new art system introduced by this release uses shortcuts for timestamp files.

Luckily I figured out a different way, which is not online as far as I know, however it's perhaps uncommon to use shortcuts for things like this, so that's unsurprising. I wrote about this in a recent topic about map loading. (Edited: http://www.swordofmoonlight.net/bbs2/index.php?topic=67.msg3267#msg3267)

I also added the technique to x2mdl for when it checks if it needs to extract textures from models or not, and this was another lucky find because I noticed that it was always failing this test owing to not equating slashes and backslashes in file system addresses. I chose to use slashes with the new models, however shortcuts use backslashes. I should've thought of this in the first place. This should speed up conversions when the textures are already converted. (Assuming reading a shortcut file is faster than writing a texture.)

This last bit is really questionable if I should even mention it, but last minute I also wanted to add something, to truncate the data in the MPX file to speed up load times, since normally it would have data for every entry (like all 512 objects) even if the slots aren't filled. This makes the files smaller and load faster. Another odd thing about MPX (and MSM) is the texture section isn't aligned on 32-bit addresses, and this throws off the rest of the file, so that many crucial parts are unaligned, and this isn't good for CPUs since they will run more slowly. It doesn't matter in the game because each section is copied into its own designated address in memory, however if the whole file were to be loaded into memory, these parts of the file would be unable to be used efficiently without copying them out, so it's important to align files. Most of SOM's file formats are so aligned fortunately. And not by accident. So it's odd these aren't. What I did this afternoon to fix this (going forward) is to add some blank textures to the texture section to pad out the extra space. I'm going to do the same for MSM files when I add MSM to x2mdl. I plan to do that sometime in the early parts of 2022. If I don't do it soon it's because things are dragging out... it's in the front of my immediate plans. (Edited: I just checked and found a note that SOM_MAP is sending the unaligned MSM data to Direct3D. Edited: I wouldn't be surprised if MapComp is doing unaligned reads too. If so converting the MSM files should speed it up some.)

104
Devs / Re: EXIT: Long time no update! (Sorry about that)
« on: December 27, 2021, 08:34:25 PM »
Yearly GameFAQs update

I don't know how many people still read GameFAQs but I've committed to posting a yearly update there since it's one of the few places that has a SOM section and it used to be a major source for game stuff when I was still into games, mainly back in the 20th century. So that link is below!

https://gamefaqs.gamespot.com/boards/958393-sword-of-moonlight-kings-field-making-tool/79828570

105
Beginner and other Nonsense / Re: STICKY: Random News
« on: December 23, 2021, 01:45:12 PM »
New feature idea

This is an uncategorized idea I had. I think I will implement this any day now...

In the PlayStation days, and probably KFIV too, when you pick up an item off the field, etc. From Software chose to do something unique, in that it doesn't generate even a name for the item to tell you what it's called. There's no menu, etc.

SOM takes a different tack here by showing a normal menu with the name clearly displayed. I wonder why the classic games never went this route? For my KFII project I want to go back to the original style. I realized yesterday there's a good way to do this...

In the Options screen there's a fourth option that seems ill-fated, out of place. What it does is hide item visuals in the Use Item and Equip menus. I guess for faster browsing through them, it will just show text. This seems like something that no one (today) would want to ever turn on so it's just kind of this vestigial thing (clearly SOM's developer(s) felt it made sense in 2000.)

Instead my plan is to convert it into an option to choose to hide the menu/text when picking up items. I think it might be a nice compromise to flash the item's name in the "lower third" the same way "gold" flashes the amount picked up. That seems harmless, but I suppose I could add a hard core Ex.ini extension to even not show this.

Anyway, this option should also have a key binding, and I may build one into the menu so the text/menu can be toggled on and off with a spare button. Toggling it on will show the entire Yes/No menu and name of the item via its prompt. So this way players can be put in control of this for any game, so games won't have to decide on a style for themselves.

EDITED: Another reason I'm keen on this is just to get the out-of-place option out of the Options menu since it's kind of weird and so contributes to a sense of a game being incompetent or cobbled together. So far the menus are something I've not made much headway into. I want to replace the system stuff with Exselector,  but would like the game menu to stay and be fully customizable some day.

Pages: 1 2 3 4 5 6 [7] 8 9 10 11 12 13 14 15 16 17 ... 58