How abouts we have ourselves an all new controller system?!

#21
Well it ought to be after the probably 20hrs focused work I've poured into this crap by now!!

Well some good news is I just had an aha moment... I found a way to make the key knockout algorithm a lot better than going from half to full speed. I just had a mental block that prevented me from seeing this possibility, because the condition to do it would mean coming to a full stop at full speed (probably a spherical harmonics thing) so basically I use three stages now, one if nearly full tilt on the axis for full speed, and different algorithm from half tilt up, and the old algorithm for half tilt down. So from half up, instead of knocking out more and more keys, I just knockout less and less keys on the upswing. So like at half speed it's stop/go/stop/go, then at 60% speed it's go/go/stop/go/go/stop (and at 40% stop/stop/go... 80% go/go/go/stop/go/go/go/stop)


Still there is this freaky weird behavior no matter what technique I use some where around mid tilt where all movement likes to just stop. I really don't understand what could be going on. I thought maybe the deadzone was being mapped into the wrong place because there is some weird ambiguity about where the deadzone actually is with controllers that use a single axis for both positive and negative. It might be a deadzone thing, but I never notice it until I turn on the analog dithering. I'll have to be able to print some numbers on screen to get a precise idea of what is going on.

But I gotta say the analog control is really worthwhile. It's the little things you don't notice that make it cool. Like unconsciously correcting your heading on the left/right axis while primarily focusing on walking forward. You really can't do that with the digital left/right step/turn buttons. Usually it's really smooth but there's something about the dithering that causes interference between axes sometimes that creates a dizzying effect. The effect is actually kind of exhilerating, if only it could be controlled to only happen when desirable (by interference it means like when the knockout keys on each axis are either in accordance with one another or not -- again I'll need to setup a screen printout to get a definite idea of what is going on/possibly correct for it)

This new two sided algorithm really ups the bar in the presentation dept. I think this could be something you'd want to have setup by default for your game yet.

EDITED: Anyway, I haven't really tried fine tuning anything, but now it's gone from 3 to 8 gates (speeds) so that's a big plus. You never really notice a transition.
Reply

#22
Jesus, I've made a mockery of myself trying to make this playable (analog simulation mode)

What I finally realized was going on when things got ugly is you basically have two dueling perspectives. This happens when you try to circle something while looking at it (fairly common with combat and generally oggling things) ...and when you're walking forward while turning your view to look down, or walking backwards while turning the view to look up.

So what I did is I recognized these cases and just average the value of the axies to make sure they're in sync with one another. This has some side effects, but in general it's what you want anyway. It actually fairly well forces you into a clean circle when circling, and maybe adjusts for your looking up and down as well. Anyway, if not for this correction things can get ugly.

The rest looks better with slower turn rates and I'm not sure what frame rate(s) SOM likes, but might also benefit from higher frame rates.

It's all a bit silly, but it's also kinda cool to have a SOM game pulling off analog controls (you gotta admit)


Hopefully somewhere down the road we'll find out it's easier/better to let the controller drive the walk/turn speeds to this sort of effect.


Until then however, I will build this analog mode into the control config menu once I work that out. It seems good enough with the perspective correction code. The control config will be much simpler in terms of possibilities than the ini file. It will auto recognize buttons, and assign them to actions instead of keys. You can't make such assumptions in the ini file because it lacks an initialized state (during initialization) ...you wouldn't want to anyway because it would restrict to much and introduce too many dependencies.
Reply

#23
I'm just going to hide the first release of this in here...

https://anon.swordofmoonlight.com/holy/S...anilla.zip

Poo poo for you if you missed out.

Not an opensource release just because I don't want to think about that right now. I might post some code later if anyone is interested.


Installation is not necessarily a snap. You basically just want to copy all the files into your tool folder (same one with SOM_MAIN.exe) if you want to test it via the map editor / project test (all I recommend for now)

Except SOM_EX.INI needs to be in your project folder, beside SOM_DB.INI.

Lastly you'll have to hexedit som_db.exe. You'll need to change one or more of the DLL strings (search for DDRAW to find the general neighborhood) to SomEx.dll. If you change DDRAW.DLL for example you can access extensions like playing in a window. And if you change DINPUT.DLL you can use the keymap/controller extensions. ole32.dll entry points are also available but I haven't seen anything come thru them (my guess is they're used for movies) ...and DSOUND will be a definite candidate in the future (the final version will load the exe into memory and change whichever of these strings it needs before running from memory as a child process... there will also be an output console)

When it starts you might be missing a dll or two. Hopefully it will tell you which one if so. In which case I'll try to get it to you / point you to a place to download it.

Finally you'll have to edit your SOM_EX.INI file to see any changes. The only really interesting thing with this release is the [Joypad] section, which I've changed to [.Joypad] so it won't be seen. You will need to remove the dot... but first you will have to look over all the Joypad section settings, because they're not likely to work with your environment out of the box (unless it's identical to mine)

I think I have an idea to make the SOM_EX.INI file more clear, and it's possible I introduced some bugs in the last build of SomEx.dll. So probably before tonight is over I'll re-upload the zip archive.
Reply

#24
Crap!! Don't run this yet! I repeat, do not run this yet!!

For some reason I have no clue why when I tested SomEx right after posting above it caused my whole computer to go bluescreen-o'-death.

Could have just been a coincidence (caused by something not even in SomEx.dll) because Vista has been acting like it wants a reboot all evening. But I'm posting this warning before I find out whether or not Doh

There is an ignorable assertion box I forgot to remove in the first upload (I use it to get time to attach the debugger)
Reply

#25
UPDATE: There was no problem. Everything else checked out, and I made the debug assertion go away and made the Action/Keymap sections of the SOM_EX.INI file more straight forward Cool

Enjoy/let me know how it goes~


EDITED: Oh yeah, forgot... there is a prob if the SOM_EX.ini file is not there (beside SOM_DB.INI) ...I can't imagine what the deal is, so I will have to sniff it out later. In the meantime, just make sure it's there and your game won't crash.
Reply

#26
hy, I dont know anything about hexediting yet but, can you use that little hexedit tool posted here? I will give it a try, plus i would like to learn a little more about hexediting. If I REALLY fail can i ask you questions? I probably will fail a few times. but when i'm done at least ill understand what im doing. Smokin
Reply

#27
Wow that FAILED!!! Attempt no 2 Crying
Reply

#28
(2009-11-03, 09:54 PM)AsusX2 link Wrote: Wow that FAILED!!! Attempt no 2 Crying

I'm not sure what you're trying exactly, but if you hexedited your game the way I suggested, and it failed, it's not necessarily because you did anything wrong.

We're still working out the library dependencies here. And since I'm not yet releasing this as a release build it's very possible (likely) you don't have some required libraries on your system.


PS: We are discussing this here (https://www.swordofmoonlight.com/bbs/ind...w.html#new) atm. Which is where I will probably post follow ups along this line in the near future.
Reply

#29
I put the words "Cledis" and "gerboomfah" in random places in the SOM_MAIN.exe, and it turned into a freakin' horse racing game with fire hydrants everywhere.

Good thing I saved a backup.

[Image: banner.gif]

Probable mucosal damage may contraindicate the use of gastric lavage.
Reply

#30
Ok, ill check it out
Reply





Users browsing this thread:
24 Guest(s)