Sword of Moonlight Forum

Sword Of Moonlight Games => Complete Games => Trismegistus => Topic started by: Holy_Diver on January 12, 2011, 05:58:45 am

Title: This is the official Trismegistus with Ex 0.9 download thread
Post by: Holy_Diver on January 12, 2011, 05:58:45 am
I am uploading/submitting the final Ex 0.9 makeover for Trismegistus download for testing/approval purposes here (http://www.swordofmoonlight.net/holy/Trismegistus%20Ex_0_9.7z) eta a little less than an hour (now 30mins) if a re-upload is not in order.

Because my main machine is in the tank I've lost all my convenient access codes and such, including the ones for this website's FTP, so that's why the odd address. I chose also to go ahead and use the 7z compression format which I hope everyone is familiar with (the filesize was 20% or better smaller)

I'm assuming if this version is able to make its way to the Trismegistus homepage Todd will probably wanna rifle thru it to make it more acceptable website wise. A little readme might not hurt either. Let's see if we can collect any questions first.

As an added bonus... a final detectable bug I'd not made any inroads with seems to have mysteriously gone away last time I fired up the game. I don't recall changing a damn thing though, so it might come back. Basically under XP with the Windows Classic theme (maybe the XP theme as well) after the intro screens or upon loading the first map the window title in the caption bar would appear to be missing, even though it's still really there, just drawn over with the background colour for no reason. If you would do anything to make it refresh either fully or partially it would. The bug would only happen with Trismegistus. Anyway, if you see anything like that please let me know. Otherwise any obvious problems are new to me and I'd appreciate hearing about whatever you might find.

I've really been pushing myself to my limits to wrap this up. This release is for gaming rigs only more or less. That is I can only recommend playing it if you've Shader Model 2.0 support or better. Also can only endorse flawless behavior in D3D9 mode. I hope to release some patches over the next couple months targeting lower profile configurations. And also intend to setup a patch which should be identical to the current download only with basic amenities like window and mouse support and all possible bug fixes (all except for the lighting fix hopefully)

I also plan on improving the translation file and correcting some stuff to do with the translation hosting webpages. When that is ready you can just download the translation file and drop it into the lang folder where it belongs if you want.

I think if your computer plays Som games well enough this version should probably play well for you also. If not I'd like to hear about your experiences. It may be playing outside of exclusive fullscreen mode (ie. in window mode) might be intrinsically slower. You don't have that option with Som. I think fullscreen mode should work with Ex though I did not test it one last time before rolling this release. I will explain how to put it into true fullscreen mode (by editing the Ex.ini file) at a later time if necessary.

PS: Tomorrow I wanna add a screenshot of the fonts which you can use to let me know if the fonts are working correctly for you or not. I'd like to know anyway. Please try to try the download out asap, thanks :676:
Title: Re: This is the official Trismegistus with Ex 0.9 download thread
Post by: Holy_Diver on January 12, 2011, 11:31:46 pm
Here is a screenshot you can compare to your own game to see if the fonts are working correctly for you. The ampersand (&) is pretty distinctive (in Direct3D HAL & TNL) for the ascii font (Egyptian) ... I mainly wanna be sure the font is being found in the font folder. I dunno why it shouldn't be, but Windows tends to be pretty finicky in the font dept.

There is a fairly elaborate way to build hybrid fonts that looks like this (from Trismegistus Ex.ini) below...

system_fonts_to_use = 120% 0 Egyptian505 BT U+0000-007F

That says to use the Egyptian font for ascii Unicode ranges basically. SomEx always adds MS Mincho (or whatever it finds in the som_rt.exe image) to the end of the list. So it's like the default.

MS Mincho ascii does not look good next to its own pretty quotation marks etc, which don't seem to be up to the standards of the rest of MS Mincho (since they're not part of the 932 codepage presumably)

I've also noticed the cursor not behaving as it should. I don't know if that's because of XP or because the processor(s) on this machine can never seem to keep up with anything. I don't think I had any probs with Vista (though some last minute changes may've affected some things minorly) so I'm hesitant to make any changes until I can get my Vista (7) machine back up. One good idea I think I just had is to do as much as possible to run Ex's utility thread on a separate CPU core. I'd wondered if there was anyway to leverage multi-core CPUs in the past and couldn't come up with anything major. But putting the cursor and stuff thread on another core whenever possible is probably not a bad idea.
Title: Re: This is the official Trismegistus with Ex 0.9 download thread
Post by: Holy_Diver on January 15, 2011, 12:05:04 am
Both Todd (DMPDesign) and Ben (Verdite) ... please let me know guys how you'd like to be addressed ... have informed me that on their computers it appears Trismegistus.exe I think is connecting to the internet.

A) Nothing Ex does connects to the internet.

B) If the game is running Trismegistus.exe is actually in a catatonic state until Trismegistus.bin close. Specifically it calls WaitForSingleObject() which does not return until Trismegistus.bin is no more.

Therefore your computers must be infected by a virus, which has loaded itself into Trismegistus.exe's address space, created it's own execution thread, and is using that thread to impersonate Trismegistus.exe while it connects to the internet. This is all very bad behavior, and if you find out what software is responsible for this were I you I'd get it off my system asap.

Despite the utter lack of ethics, probably the software on your system that is causing this to happen likes to call itself "anti-virus" software. Ironic since it behaves exactly like a virus (at least virus is in the name I guess)

Last night while doing some research I came across some software which includes a disclaimer on its download page here (http://www.cheatengine.org/downloads.php) which probably applies to Ex as well.

What's really horrible here is not that whatever software doing this thinks Ex might be a virus. But that it apparently does not put up a dialog box asking you if you think Ex is cool or not, and it does its dirty business from within Ex, making it look like Ex is doing it. Most likely its trying to look up Trismegistus.exe on its corporate website. Probably you have two different pieces of software at odds with one another. Like a software firewall and an anti-virus regime stepping on each others' toes. Either way it's unacceptable behavior.

Personally I don't trust anti-virus corporations. I suspect they are responsible for 99% of the viruses on the internet. All you need to protect yourself from viruses is education. If you have a sweet tooth for warez downloaded from shady places or by shady means quarantine that stuff on another computer and be thankful the viruses on it can't infect people. Anti-virus software can never truly protect computers you rely upon for work and security from your own stupidity and the shear amount of human evil that is out there :evil:

PS: For the record, Trismegistus.exe makes use of the following Microsoft APIs which are probably arrows in every virus' quiver. And are for sure arrows in the quiver of whatever software is actually connecting to the internet on your computers.

ReadProcessMemory
WriteProcessMemory
VirtualProtectEx
CreateRemoteThread

SomEx.dll uses all but CreateRemoteThread.

These are official Microsoft APIs which can of course be used for good or evil. They are the only way to do things with software where recompiling the software is not an option on the table. Hence not something Ex can do without.
Title: Re: This is the official Trismegistus with Ex 0.9 download thread
Post by: Holy_Diver on January 15, 2011, 02:37:45 am
Do you happen to have zone alarm on any of your test machines to see if it does with yours?

I'm not really concerned about it, I am guessing its just something stupid on my machine.

Can you please reply about this in the Trismegistus forum post. I just duplicated it there for stickiness sake until I can find time to clean it up (the other thread is locked so like only you and I can post in it)

I would definitely appreciate it if you guys could put your heads together and figure out what your machines have in common. I'm sure zone alarm (soft firewall I think) is detecting the outgoing activity, but there is some other software on your computer which is actually causing it. I happen to have a spare computer atm which can probably run the game enough to cause this to happen / with zonealarm. If something did happen it would mean Windows itself is connecting for some reason... if so, presumably to build a database of applications using certain APIs. You might see where the connection is going to... the server would probably give it away wherever it is. I very seriously doubt it's Microsoft's doing, so most likely setting up a test on my part would be a waste of my time.

I'd prefer if you guys could figure this out. I'm pretty disgruntled with the fact whatever is doing it does not distinguish itself from the application in question.
Title: Re: This is the official Trismegistus with Ex 0.9 download thread
Post by: Holy_Diver on January 15, 2011, 03:58:02 am
Anyone know if the 1 (player level) in the status panes does anything? At first I assumed it went up with each piece of the Trismegistus, but I'm not sure that would be a very simple scenario to setup. So now I'm inclined to think Tom just couldn't remove it without knocking out something else or something. I'm pretty sure it's there in the original game anyway.

I'm thinking probably this version should get rid of it, but I don't want to do anything destructive :sweatdrop:
Title: Re: This is the official Trismegistus with Ex 0.9 download thread
Post by: Verdite on January 15, 2011, 06:42:39 pm
I'm going to test you're new tris ex, i have never used a 7z file before though...
Title: Re: This is the official Trismegistus with Ex 0.9 download thread
Post by: Verdite on January 15, 2011, 07:43:23 pm
When will you be increasing the resolution for ex use?
Title: Re: This is the official Trismegistus with Ex 0.9 download thread
Post by: Holy_Diver on January 15, 2011, 10:09:47 pm
When will you be increasing the resolution for ex use?

I don't know what this means. The resolutions available to you are dictated by your display adapter. They are the same as the ones you pick from when choosing your desktop resolutions.
Title: Re: This is the official Trismegistus with Ex 0.9 download thread
Post by: Holy_Diver on January 15, 2011, 10:12:05 pm
I'm going to test you're new tris ex, i have never used a 7z file before though...

7z is 7zip. It's been replacing .zip as the compression standard from some time now (http://en.wikipedia.org/wiki/7z)

Which version tried to connect to the internet for you? The beta I shared a while back? Or did you just hear about that from Todd?
Title: Re: This is the official Trismegistus with Ex 0.9 download thread
Post by: Holy_Diver on January 16, 2011, 07:35:25 am
Som is just damn slow on this computer I'm using lately. Unplayable for anything but testing. Even in simple maps.

I'm pretty convinced whatever the prob is it's entirely isolated to the CPU. Do we know what the minimum CPU specs are?

The website says Pentium II(R)300MHz ... I'm running 1.6Ghz dual-core ... what gives?!

Kinda depressing. There's gotta be something pathological going on. Whenever I move an inch the framerate drops radically.

It's not Ex related. I might try to see if there is someway to profile it...
Title: Re: This is the official Trismegistus with Ex 0.9 download thread
Post by: Verdite on January 16, 2011, 12:08:43 pm
I got no slow down on my pc with ex and SoM, dunno whats going on there.

Only slowdown i get is when i get prompted to take an item, given the yes / no option it lags
Title: Re: This is the official Trismegistus with Ex 0.9 download thread
Post by: Holy_Diver on January 17, 2011, 12:37:42 am
UPDATE: Turns out my USB soundcard was slowing things down while moving. Not Som/my CPU. FYI: Disabling hardware "acceleration" via dxdiag fixes things.

I got no slow down on my pc with ex and SoM, dunno whats going on there.

Whatever it is is not Ex related. I just posted it in this thread for the hell of it. Everything seems to drop to its knees whenever Som rebuilds the scene... ie. when you move. It does reveal though that Som is doing a lot more work when you're moving, so Ex could definitely take advantage of that and turn on antialiasing techniques when not moving... which are not needed while moving because everything is moving too much to notice jaggies anyway.

I tested it in F4 mode today to make sure it wasn't related to collision simulations or anything just to be sure. It definitely doesn't make sense that whatever Som is doing it would make a 1.6Ghz processor drop to its knees. It may just be the processor (http://www.computer-aid.com.au/blog/2009/05/17/slow-intel-atom-stay-away/) .... it does hickup a lot but does pretty good with modern apps which is saying something. Strange though my machine is marketed as a game machine, but most games these days don't abuse the CPU so. That link says my CPU may be equivalent to 800Mhz which is getting closer to Som's minimum specs. I'm interested to see how KF1 performs, since it should be compatible with From's specs. Anyway, I think the next Ex release like this will be KF1.

Som relies on the CPU way too much in general. When I start digging into the .mpx files / fixing the vanishing tiles and stuff, I'll probably go one step further than optimizing away the map (if even) and just turn all the map tiles into like the equivalent of two triangles or so, so Som won't waste time with them.

Quote
Only slowdown i get is when i get prompted to take an item, given the yes / no option it lags

I'm aware of the Take this item? jankiness. I don't know what causes it. There is something strange about that menu. Som polls the inputs twice instead of once like all the other menus. It seems to be bugged, but the problem only shows up sometimes, and generally on slower machines. Even though the menu screen usually goes at 60fps. I've only seen it happen in games with the picture menu. So anyway, it's happening on Vista/7 for you? I've never had it happen with 7. I'm pretty sure there is a bug with Som there, but under ideal conditions it works itself out.

Does it get slow? Or are the key just not responsive? Like you hit cancel/confirm over and over but nothing takes until it eventually does :doh:


PS: The real problem with Som I think is the website says you need a minimum of "8MB of VRAM" and anyway Som works more or less within those constraints rather than scaling properly. So it shuttles it's 8MB of video memory every frame where now days we have at least 128MB to work with, which is more than you need to keep everything in video memory permanently and heaven forbid more room is required D3D will manage that for you automatically (with a little paging overhead)
Title: Re: This is the official Trismegistus with Ex 0.9 download thread
Post by: Holy_Diver on January 17, 2011, 01:44:49 am
I just fired the KF remake up for the first time outside of som_db.exe.... either that or the movies did not work before. Anyway I was surprised the movies went so hard in the photo realistic direction considering the limitations of Som... err it's inability to hold a candle to that :razz:

Anyway its performance was a lot like Dark Destiny's only a little better. For some reason Trismegistus never really makes it up to full speed. Maybe because it's so much outdoors.

The technique I used in Trismegistus to adjust the player's eye level does have a flaw. I think I prefer to do it the way it's being done versus screwing with the memory. But anyway it doesn't take into account the arm, so it's like you're moving the eye level but not the arm level. Which is ok for Trismegistus (no arms) but it's gonna take some work to figure out what to do about the arm. I plan on smoothing analog in the same way, so that's going to be a prerequisite for true analog behavior.

Edited/offtopic: The KF1 movie looks a lot better with Ex because it plays at full resolution and is filtered between texels. But you can still see plenty of compression artifacts. Especially because of the higher resolution. If From Software still has a raw file for the movies it might be possible to convince the company to release it somehow after restoring the game a bit. Funnily I can't get the movies to play except in the game itself, so I guess I can't cheat and see the ending :crying:

I also noticed the candle in a dish object that you see everywhere in the game looks really good, but whenever you see this object in other games its messed up... probably worth looking into.
Title: Re: This is the official Trismegistus with Ex 0.9 download thread
Post by: Verdite on January 17, 2011, 07:47:46 am
'Like you hit cancel/confirm over and over but nothing takes until it eventually does'

Yeh thats the problem i have. The thing is though my machine is pretty high end and works well with most modern games...




Title: Re: This is the official Trismegistus with Ex 0.9 download thread
Post by: Holy_Diver on January 17, 2011, 11:24:55 am
'Like you hit cancel/confirm over and over but nothing takes until it eventually does'

Yeh thats the problem i have. The thing is though my machine is pretty high end and works well with most modern games...

Go ahead and drop a GAME.EXE file in there and see if it does the same way. I'm kinda baffled myself why it does that way sometimes. It's hard to imagine Ex could be at fault. If it is it's probably just some random bug unrelated to input or anything that happens to show up that way. I think it's pretty clear Som does things different on that screen for no good reason. I'm thinking at some point we'll be able to make sense of it, but for now I don't feel like driving myself nuts about it. It is annoying when it happens though. I think you'll find that it doesn't always, even in the same game / with the same setup.

EDITED: It's definitely a bug that's internal to Som. Because what's weird is the arrow keys work basically but the confirm/cancel keys don't. And what really makes it clear is the confirm/cancel buttons on the joypad don't work either. So for whatever reason Som is choosing to ignore them.

EDITED: I think I will try to setup a fix that waits for the player to hit confirm or cancel and then just bombards Som with those keys until it leaves the screen. It's a pretty simple screen.
Title: Re: This is the official Trismegistus with Ex 0.9 download thread
Post by: dmpdesign on January 17, 2011, 11:29:31 am
Just curious Holy,  the KF1 vids you are watching, are they the originals or the english dubbed?
Title: Re: This is the official Trismegistus with Ex 0.9 download thread
Post by: dmpdesign on January 17, 2011, 01:12:02 pm
For the record Ex Tris looks great on my laptop but I can't really play as it chugs my computer down to a crawl.  I dont have a great graphics card or anything, its simply an integrated chipset, but the rest of the computer should be decent specced.  I dunno, I wonder, is there an .ini toggle to make the game run full screen rather than windowed?
Title: Re: This is the official Trismegistus with Ex 0.9 download thread
Post by: Holy_Diver on January 17, 2011, 02:20:39 pm
I'm pretty sure the reason the Take this item? menu is bugged is because on the frame you leave it, Som tries to go thru the next 3D frame without completing the menu frame (which it draws on top of... if so) and if the inputs get polled once for the menu and once for the 3D (which is more likely to happen when the 3D framerate is low) then you actually end up back in the menu all in one frame. You'd think committing to yes would put the item in your inventory / off the field immediately but apparently it doesn't. Either way it would still be bugged on cancel.

The problem for Ex is it needs an frame to tell what's going on, and Som can poll the inputs a number of times between frames... especially when things are slow... so you don't know what kind of input it's looking for for sure between frames. I can't figure out what the hell determines the polls per frame at fullspeed. It's different in every game, but it's gotta be a combination of moving and turning speed. Wicklow is only 1 at full speed. DD is 4. Tris is 5.

I'm not sure why it happens really only in Tris. That I see anyway. I'd say it's because of the picture menu, but I think it still happens if I strike the filename out of the .dat file, which seems to put it out of picture menu mode. In picture mode the field is not drawn. I'm thinking there is probably a more elegant fix than trying to take over the controls.

PS: I vote we call the "3D" context the "field" from now on. Not only does it sound good, it rhymes with King's Field :aroused:

PPS: @Todd I'm watching the originals. And if Som sans Ex runs ok on your computer, then changing some settings should have some impact. In my case the graphics stuff makes no diff whatsoever. The bottleneck is in the CPU. Fullscreen is a little buggy in this release. Basically you just change the Ex.ini settings related to fullscreen/window modes. There are two.
Title: Re: This is the official Trismegistus with Ex 0.9 download thread
Post by: Verdite on January 17, 2011, 04:48:46 pm
Btw i just read your reply to an earlier post. What i should have said was... When can i use ex in fullscreen mode rather than windowed?
Title: Re: This is the official Trismegistus with Ex 0.9 download thread
Post by: Holy_Diver on January 18, 2011, 06:43:02 am
Btw i just read your reply to an earlier post. What i should have said was... When can i use ex in fullscreen mode rather than windowed?

I still don't follow. There is not a maximize feature yet. But if you change to a resolution that is either as tall or wide as your display you will be in fullscreen mode. If there is no such resolution available then you can't without either putting in a custom resolution in the .ini file or changing the Ex.ini file.

To answer something Todd asked about fullscreen. There is nothing in the .ini file that isn't changed from within the game. It's not supposed to be hand edited. Stuff in the Ex.ini file on the other hand cannot be changed from within the game.

If you look at your Ex.ini file you should be able to figure out what to change. All the settings you'd require are already in the file. Just turn them off or on.

That said I'd tested the fullscreen modes with this build earlier to see if it affected performance. And there were some minor bugs to be corrected. Mainly you may see a bright stripe along one side of the black mattes.

I think the "do_not_compromise_fullscreen_mode" or whatever setting may do away with the mattes altogether. I'm not sure. I'm taking anymore questions about this.


EDITED: If you specify a custom resolution that is not normally enumerated by your display it will probably booger the Options menu. I've made a note to make sure the custom resolution gets enumerated so that won't happen in the future. Ex won't toss out a custom resolution if it's not in the right aspect ratio, but adding one is a different story / a little bit more work.
Title: Re: This is the official Trismegistus with Ex 0.9 download thread
Post by: Holy_Diver on January 18, 2011, 07:16:14 am
I just setup some tests, and it does indeed look like Som is drawing multiple frames (without ever committing the first one) when leaving the intro screens and whenever leaving a menu. In the case of the "Take this item?" menu the message box I setup actually crashes the game, which is something I've only scene before when Som didn't close its BeginScene() with an EndScene() call after changing the display device or resolution.

I kinda wonder if Som might be drawing multiple frames that never see the light of day whenever things get slow. That would definitely explain the slowness anyway. It polls the inputs several times between individual frames, which is not something you'd really expect given the general shoddiness of Som in general. It's probably not happening but it's probably worth investigating just to be sure.
Title: Re: This is the official Trismegistus with Ex 0.9 download thread
Post by: Holy_Diver on January 18, 2011, 07:50:26 am
Wow... this is really bizarre. Today Dark Destiny is playing pretty damn fast for me and not slowing down at all while moving!?

The polls per frame number is also extremely high, the keyboard is getting checked 31 times per frame at 60fps??? It's pretty much playing like it always does... it gets slow in the bad parts as usual, but that's to be expected.

I'm pretty positive I did not change a damn thing programming wise. The only things that have changed is I disabled DirectSound hardware acceleration and I just ran a program that fixes my mouse when its advanced features are not working. I doubt the mouse could explain it because I do that all the time, though I'm kinda new to this computer. The only other explanation is just a random Som bug running amok that doesn't always kick in.

So hopefully there was just something peculiar to my computer causing the pathological slowdown. 31 ppf sounds really weird. But it may be Som just polls the inputs as much as it can for some reason or something. It's methodology in that dept does not seem very sound. Like I'm pretty sure checking the mouse that many times won't return any new data because mouse data is relative and its resolution is not that high. I know anyway the system I've setup to cope with Som's oddball input polling can't likely help at that rate. I guess I'll have to up the maximum :confused:
Title: Re: This is the official Trismegistus with Ex 0.9 download thread
Post by: Holy_Diver on January 18, 2011, 07:57:22 am
Shit it was the hardware "acceleration" ... WTF!?

It's good thing that sound card would pop on sound effects... otherwise I would not have found out short of setting up a custom profiling framework (which might yet happen one day)

This is probably why Microsoft dumped hardware acceleration for DirectSound (see another recent post of mine) for Vista/7. I guess I will have to revisit that post.

My guess is the card was trying to deliver on the 3D sound somehow, and the player moving would cause it to recalibrate its sound effects etc. It pisses me off you can't disable acceleration programmatically or even force things into software mode (near as I can tell it just doesn't take)

I swear most people in technology industries have no fucking clue what they're even doing. It's just crap everywhere you look.

EDITED: The only way to disable acceleration is to modify the registry. I'm assuming a restart is not required. For XP players it might even be worth setting up a message box to explain that they have hardware acceleration on and probably shouldn't / might cause problems for them ... and let them disable it in one click. The only problem is if you actually have a nice sound card or don't have like a dual/quad-core (pretty common now days) setup or hyperthreading(tm)
Title: Re: This is the official Trismegistus with Ex 0.9 download thread
Post by: Holy_Diver on January 18, 2011, 08:08:38 am
PS: Trismegistus is not super fast still, or near fullspeed, but it's serviceable / generally smooth sailing, even though sometimes it hangs around 10fps. Still feels realtime / playable.

Btw... if you wanna know what the framerate is for this build, you can add <fps/> to the window title setting in the Ex.ini file. Or you can uncomment or whatever the stuff in the [Output] section.

PPS: @Todd, you really should replace those custom columns in DD with something more practical. They really are game killers. I suspect they have way too many polygons or something.

EDITED: Strangely enough the crazy polls per frames numbers (31 at 60fps 100s at lower framerates) only happen in the Colosseum map. You can see ppf in the Output stuff (F5) ... it's a number I've not been aware of for very long. Those numbers seem pretty absurd though. Other maps without skies seemed pretty regular ppf wise.
Title: Re: This is the official Trismegistus with Ex 0.9 download thread
Post by: Holy_Diver on January 18, 2011, 08:22:26 am
I got no slow down on my pc with ex and SoM, dunno whats going on there.

Whatever it is is not Ex related. I just posted it in this thread for the hell of it. Everything seems to drop to its knees whenever Som rebuilds the scene... ie. when you move. It does reveal though that Som is doing a lot more work when you're moving, so Ex could definitely take advantage of that and turn on antialiasing techniques when not moving... which are not needed while moving because everything is moving too much to notice jaggies anyway.

Just retracting this bit in lieu of discovering it was my soundcard causing the extreme slowdown on the move... not Som/my low profile CPU.
Title: Re: This is the official Trismegistus with Ex 0.9 download thread
Post by: Holy_Diver on January 18, 2011, 08:44:25 am
Actually, my new theory on polls per frame is probably there is just some kind of global event that checks the keyboard/joypad independently of everything else. I don't know how else to describe it. The base number changes with each map. It multiplies when the framerates drop down, suggesting if the theory holds that the events are probably synchronized with the timers regardless of whether or not the frame can be drawn in time.

Anyway... this will make doing analog right more complicated... the mouse doesn't do analog right on the Colosseum map because the 31+ polls break the smoothing algorithm (signal smoothing / not camera smoothing)

@Todd,,, do you have like about 30 of any one kinda thing on the Colosseum map :confused:
Title: Re: This is the official Trismegistus with Ex 0.9 download thread
Post by: Holy_Diver on January 18, 2011, 09:09:16 am
^It turns out that every "always on" event that does something as far as I can tell raises the number of polls per frame on that map. I can't think of any plausible justification for this, or use for it under any circumstances...  so I'm assuming it's a bug / will have to find time to isolate the real input poll versus the phantom ones.

If you can think of any reason an always on event should care about the state of the keyboard/joypad you win a cookie (of the internet variety) :coffee:

Hell, at least a lot of new bugs are being found out :smokin:


PS: We can only wonder if there are any other side effects thanks to this bug. Like what else does each new "always on" event cause to happen :geno:
Title: Re: This is the official Trismegistus with Ex 0.9 download thread
Post by: Verdite on January 18, 2011, 12:14:30 pm
I think i could guess why... Its probably because the always on is probably like a data attachment to the character... So basically everywhere they go, the system will be checking i the event triggers are available yet. So yeah, i think always on -> data attached to character (and is read by the game constantly?)

You know about the "take this item" discussion we've been having... Well you know you've thought about it too much when you have a dream about it, which i just had...  :dazed: noo.
Title: Re: This is the official Trismegistus with Ex 0.9 download thread
Post by: Holy_Diver on January 18, 2011, 01:47:45 pm
I think i could guess why... Its probably because the always on is probably like a data attachment to the character... So basically everywhere they go, the system will be checking i the event triggers are available yet. So yeah, i think always on -> data attached to character (and is read by the game constantly?)

You know about the "take this item" discussion we've been having... Well you know you've thought about it too much when you have a dream about it, which i just had...  :dazed: noo.

Well "always on" events by definition are not triggered. The trigger event was the first one I tried. It's the only one that would make any sense, but that would be a damn hackish way to do it. But anyway, the explanation is surely more like the input data gathering routine is just in sync with the timer routine (since it's independent of the refresh rate) ... who knows why it works this way. It's pretty obvious its not intentional. Som has so many bugs that all have about one thing in common... they don't jump right out at you until you've spent a minimum of time with it. Which obviously From' never did...

I'm glad anyway Sony has a bare minimum of quality standards... otherwise the console games would probably all be this bad too :rolleyes:
Title: Re: This is the official Trismegistus with Ex 0.9 download thread
Post by: dmpdesign on January 18, 2011, 03:31:54 pm
The collosseum has a high number of npc/enemies that appear dependant on counter triggers...every other map has very few if any.  I dont know if that may have anything to do with it.

Other things the game may monitor that could affect your numbers randomly between maps that are not event based -
-dropped items staying on the map, including gold that is not picked up.
-whether or not single appearance enemies have appeared, im sure there must be some variables tracked for that
-the status of a chest that has/has not yet been opened.
-the status of a door that has/has not been unlocked.
-enemies that only appear a limited number of times is probably tracked in the memory you are looking at

Another thing, are the number of polls at all affected by the draw distance in a map?
Title: Re: This is the official Trismegistus with Ex 0.9 download thread
Post by: Holy_Diver on January 19, 2011, 03:26:47 am
The collosseum has a high number of npc/enemies that appear dependant on counter triggers...every other map has very few if any.  I dont know if that may have anything to do with it.

Other things the game may monitor that could affect your numbers randomly between maps that are not event based -
-dropped items staying on the map, including gold that is not picked up.
-whether or not single appearance enemies have appeared, im sure there must be some variables tracked for that
-the status of a chest that has/has not yet been opened.
-the status of a door that has/has not been unlocked.
-enemies that only appear a limited number of times is probably tracked in the memory you are looking at

Another thing, are the number of polls at all affected by the draw distance in a map?

Sorry... a few posts up I figured out what was causing the extra polling... apparently its a bug caused by "always on" events.

I reckon the players movement must be synced with the clock (which is already pretty evident) or otherwise the extra polling would've made the player move twice as fast and 3x as fast and so on per each always on event. In which case at least the bug would've been noticed :rolleyes:

PS: Are you suggesting each of those bullet points are known to cause problems?

PPS: Just to be clear... when I say "polls" I mean specifically when Som checks the state of the keyboard and or joypad. There seems to maybe be some confusion.

So basically Ex has to filter out the extra polls somehow, and also deal with the bug that's especially wreaking havoc with the Take this item? screen.

I'm hoping it won't be necessary to go the the extreme of counting the always on events per map :rolleyes:

BTW/Offtopic: Ex is just getting into snooping around the memory. The only really useful memory I know of atm is the counters and the basic player stats. Mainly the gauges and the stuff you see on the first menu screen, excluding ailments. The ailments might well be in the same memory but I haven't setup any scenarios to make them stand out. I probably have a lead on the clock, but it won't be practical to fix that bug until we can find out where the clock data is in the save file. It would be funny to sync an in game clock with the game clock / maybe make a puzzle of it. You could do other weird stuff as well of course.
Title: Re: This is the official Trismegistus with Ex 0.9 download thread
Post by: Holy_Diver on January 20, 2011, 04:54:30 pm
Well....

I really tightened up the input today. That did not much help the "Take this item?" screen however in and of itself. But it created a much more sound environment for banging out a kludge that basically takes over input for the player.

I have no clue what circumstances cause this bug. It doesn't seem to affect Dark Destiny, but it may be very map/timing dependent. The input polling is not synchronized with framerate at all, but all of Som is single threaded. It makes for a pretty chaotic environment. Ultimately it would be nice to basically just hand off Som's "jobs" to different worker threads for sound/input/drawing. Which is an odd way to program since everything comes from a single thread, but would not be too hard, because Som is pretty much oblivious to just about everything it does. It doesn't seem to ever check the failure or success of an API even. Call it blissful ignorance. Anyway, I think that will happen at some point. Probably before upgrading to anything better than D3D9.

Anyway, the kludge I worked out is very voodoo, but it seems to have a nearly 100% success rate, and doesn't seem capable of doing anything destructive... though very rarely it kicks the player back into the Take menu when cancelling with the NO option (how often will that ever happen right?)

It doesn't seem to affect working games in any way.

There is definitely a huge bug going on, but I don't have the diagnostic tools to make sense of it at this point. The way SomEx is setup to take over the controls so to speak if necessary tends to run for about 200!! frames on average. But it happens in nearly an instant. That means Som is basically going totally out of control. The take over basically hits the button every 3rd poll, which should be one or less frames. I guess I should get some data on how many actual polls go by during that 200ish frames (because the two are basically unrelated)

Basically it seems like half of Som doesn't realize it's in the Take this menu? and the half that does just steps in and out at random.

I tried to deal with the frames getting smashed on top of one another but generally that just led to a bunch of frames you probably don't want the player to see. Basically Som doing shit its not supposed to be doing, but no one ever noticed because the frames are never actually displayed...

But ultimately working around that led to a number of input innovations which are really very nice.

Anyway, probably I will upload a new SomEx.dll build tomorrow-ish with these fixes.
Title: Re: This is the official Trismegistus with Ex 0.9 download thread
Post by: Holy_Diver on January 21, 2011, 03:04:32 pm
Here is a build that should fix the Take this item? menu and some other odd stuff. Also you can use a custom resolution as low as 320x240 and not have the option menu go wonky... well in D3D9 mode anyway. D3D7 mode is generally not up to speed on a lot of stuff. Assuming your monitor is wider than it's tall... I recommend taking the height of the resolution you want, and multiplying it by 1.333333 to find the width that should work for you.

I'm thinking about adding a maximize button sometime soonish. Or playing around with the idea anyway. Just on the odd chance it turns out to be pretty straight forward/breezy.

EDITED: The D3D9 mode also fixes a bug where there are more than one resolution option of the same size. Anyway, it sees to it there is only one option per resolution so that the selection seems responsive. Though in general in the menus things never seem 100% responsive. There's probably not a non memory fix for that.
Title: Re: This is the official Trismegistus with Ex 0.9 download thread
Post by: Holy_Diver on January 21, 2011, 07:34:20 pm
Hmmm, the save game menu in KF1 seems to act more or less similarly to Take this item? in Trismegistus. I suspect it has more to do with any menu that basically exits out of the menu system. Well that's the way the Take menu was, and I haven't seen it act any differently for the most part. Exiting the menu via backing out always seems fine. It may be only double menus affected. Anyway, let me know if you have any more trouble (after applying the attachment in the last post)

Also please let me know if the text in the window caption (says Trismegistus) ever disappears on you or anything else weird.
Title: Re: This is the official Trismegistus with Ex 0.9 download thread
Post by: Holy_Diver on January 22, 2011, 09:05:17 am
PS: It occurred to me probably only the popup save game menu is affected. Ie. saving via an event. If you think about it that works pretty similarly as a one screen menu. I think probably these menus not being officially part of the menu framework suffer from some serious oversight bug. I have not had any problem with shop menus as of yet. Those anyway are the only standalone menus I can think of than a talk screen with a decision branch.
Title: Re: This is the official Trismegistus with Ex 0.9 download thread
Post by: Holy_Diver on January 22, 2011, 10:28:38 am
I'm thinking about making a custom menu border for Trismegistus... basically by using the borders from the picture background. I have a feeling it will look better in matching the background :ninja:

EDITED: Also I seem to have fixed the saving bug in KF1. I'm not going to upload a new build just yet, because I don't think it's needed for Trismegistus since it's anytime save afaik.

PS: I'm a little more worried about taking over controls in the save screen as in theory anyway it's possible your top game could accidentally get saved over if things went south. But it seems to work reliably on my present machine anyway.
Title: Re: This is the official Trismegistus with Ex 0.9 download thread
Post by: Holy_Diver on January 23, 2011, 11:38:04 am
I will have to upload a new SomEx.dll later for the Take this item? fix. Turns out I'd left something out for the keyboard which makes it a little less reliable.

It may be just as good for escaping / choosing YES, but I'm not 100% sure. Joypad/mouse should be fine still either way.