Release Ultima 4 (xu4)


Made a short test run, and it seems to work really well, two things I'd like to comment on:

  • Downloading the needed files worked without a hitch, but there is a small amount of time between the confirmation of the download option and when the "download in progress" screen is shown - when it appeared it was already at 70% - Maybe showing a small hint directly after the user hits the download button, would not leed to a possible confusion wether the pnd is still working or it has simply crashed.
  • Something you probably can't do anything about: in the main/start menu knowing what to do is a bit difficult - usually in games of that era the button to press for a choice (like pressing 'i' for Initiating a new game) was highlighted in some way (usually the character was in a different color). Is there no such mechanism in the original game or did it went missing in the 'process' ?


Edit: I just realized that the screen i thought was for showing the download progress is actually the loading screen of the game - so giving the user a hint that the pnd is currently downloading would be nice addition
 
Last edited by a moderator:
I will look into adding a progress bar to the download but I cannot test, so if youd be so kind to test that would help.


The original ultima iv did not highlight the first letter of the menu options but I agree that would help newbies.


It is really reccommended to also read the docs in ultima4.zip and a bit of a walkthrough if you are just starting the game since figuring out what needs doing is quite a riddle.


I am currently trying to deal with a xu4 bug where the music plays at 100% vol regardless of what vol is set in preferences.
 
I will look into adding a progress bar to the download but I cannot test, so if youd be so kind to test that would help
I would be glad if I could be of any help, just drop it here and I will test it as soon as I can
 
Didn't the repo upload work now?


If you want I can ask milkshake to transfer full ownership to you.
 
sadly repo upload timed out on my last two attempts


On the good news side, i fogured out how to modify combat.cpp to accept Pandora A and B buttons for Attack and Cast Spell actions - makes combat much more enjoyable imo.


I remastered the sound fx and towne music also for less annoyingness - music vol can be changed with , and . Keys but always resets to full volume during song loop or map load. Very confusing. Submitted a bug report for this.
 
Made some progress on music volume error: the SDL-mixer command Mix-Playmusic always plays at 100% when begun or looping a track.


If someone is friendly with the sdl-mixer authors maybe they could fix this, otherwise i am setting track looping off. Music will only play once when entering a new area.
 
I tried this engine a little while ago and i had an issue where the npc's would be duplicated multiple times. Meaning in a town there would be 3 to 4 copies of the same npc running around.


Ive since gone back to the dos version with patches, but maybe the report means something to someone.
 
I tried this engine a little while ago and i had an issue where the npc's would be duplicated multiple times. Meaning in a town there would be 3 to 4 copies of the same npc running around.


Ive since gone back to the dos version with patches, but maybe the report means something to someone.
NPCs duplicate upon town reentry - ID: 3274682 has been FIXED


In other news, I am re-resampling the sound effects since microsofts or Realteks loopback driver on Windows 7 introduces severe artefacts into the signal. After 31 years of suffering microsoft products, I am not exactly surprised at this, but somewhat surprised at how disgusted, revolted and pissed off this kind of user assrape still makes me feel. You suck, Microsoft. You have always sucked and you always will, from inception to eternity.


I wanted the original waveform as coded by good old Richard Garriott himself, and I can get very close loading up a Debian VM and exporting SDL_AUDIODRIVER=disk and then running linapple with the original Ultima IV disks, then quitting and processing the output with


sox -r 44.1k -e signed -b 16 -c 2 sdlaudio.raw sdlcooked.wav speed 0.6159 channels 1


to get a clean monophonic signal of the apple ][ speaker.


The speed conversion is needed to get correct pitch and tempo. Yes it is strange. No, I cannot explain, but this gives correct results.


I dont have a high enough in-game characterlevel to capture all the sound effects but I hope to get there in the next weeks.


Regarding the xu4 / SDL bug: which sets the music volume to 100% whenever played or looped, we might be able to set NLOOPS to 0 and instead test for the end of a song with the SDL-mixer callback function MIx_HookMusicFinished(*myfunction) to manually loop the song and set volume level to user-specified level.
 
Last edited by a moderator:
As described, SDL music playback of looped files resets volume to 100%. I modified a sample C program that uses s callback (yaay) to replay the tracker file when the end is reached and set volume to desired. See attachment SDL:music_looptest.zip. This is also a nice barebones program for playing music in SDL in case anyone needs sample code.


My problem now is how to get this working in C++: i dont understand C++. Igattach my modified xu4 source tree along with my changes. It doesnt build and I assume I have made some basic C++ error. Take a look if you understand objects and methods and such.


To see my changes, grep -i klapse music.h music_sdl.h music_sdl.cpp especially line 92 of music_sdl.cpp


//Mix_HookMusicFinished(Music::resumePlaying)


which you can uncomment to see the error during make.

SDL_music_looptest.zip

u4srcklapse.zip
 

Attachments

  • SDL_music_looptest.zip
    516.3 KB · Views: 200
  • u4srcklapse.zip
    398.9 KB · Views: 154
New version uploaded to repo!


- auto downloads ULTIMA4.ZIP with progress bar .. woot!


- pandora A button used for Attack, B button to Cast a spell n combat


- improved tracker mixes


To get highlighted text command keys, go to Configure, Enhanced Interface Options, and turn Text Colorization on.


EDIT: please tell me politely if I have munged anything up. also do you think that command key hilighting should be on by default? fullscreen on by default?


EDIT2: oh WOW, I got the callback function to work in C++. Apparently you can't pass a "pointer to a member function" to something that's expecting a "function pointer". Unfortunately, I cannot call the sdl playmusic function from within the callback function because "NEVER call SDL_Mixer functions, nor SDL_LockAudio, from a callback function." So I have to suffer more massive confusion til that is worked out.
 
Last edited by a moderator:
New version uploaded to repo!


- auto downloads ULTIMA4.ZIP with progress bar .. woot!


- pandora A button used for Attack, B button to Cast a spell n combat


- improved tracker mixes
Download seems broken for me:


The Window with the progress bar appears and the bar fills up quickly. But after pressing OK nothing happens. pndrun..out sayz:


...


Downloading...


./scripts/u4.sh: line 43: /mnt/utmp/xu4b: not found


./scripts/u4.sh: cd: line 47: can't cd to /mnt/utmp/xu4b


....

also do you think that command key hilighting should be on by default? fullscreen on by default?
Imho, highlighting should be on by default. Is the window state setting saved ? if yes I would leave it windowed.
 
New build uploaded to repo!


- Fixxed user volume settings for music!


- Stripped executeable and removed unneeded files- new PND size is 3.7 MB


- Set text ©ommand hilighting default on, mouse off, fullscreen on


use q to save game (only outdooes), alt-x to exit the game.


Now if I could program C++, I'd love to add a key command (A button during conversation) to allow user to add the last conversation hint to a journal. Then user could pull up the journal via Alt-J and scroll around it via DPad.


I think some of the sound effects are still wrong .. I dont always hear the PC attack sound. More work...


Thanks for testing and feedback thatgui! More please :)
 
Last edited by a moderator:
Thanks for testing and feedback thatgui! More please :)
Well you asked for it:


Good news first: automatic downloading and starting the game works without errors. But the game segfaults after a certain time - I believe. At first I tought it was at a certain point in the intro, but during the third try I skipped the rather long period while the games start screen is slowly building up, and got the segfault during character 'creation' (gipsy women asking questions)


pnd.out says:


/usr/pandora/scripts/pndrun.sh: line 519: 18611 Segmentation fault "./$EXENAME" $ARGUMENTS


The line number (519) is always the same, but the number afterwards varies: 18611, 18297, 15765


But if I hurry through the whole prcocess, I can play the game just fine (at least for 15min).


Hope this helps (and sorry for taking that long to reply)


Edit: forgot: the journal would be the cherry on the cake
 
Last edited by a moderator:
Thanks for the feedback thatgui. Unfortunately I cannot repeat the error - perhaps you could run xu4, switch to windowed mode (under configure->video options) then md5sum /mnt/utmp/xu4/u4


this should yield


cebd75a4e3728c379eab2b0af414bbc4 u4


If the value is different then we may be dealing with a corrupt download or upload.


Perhaps we have a different libSDL?


399004 Mar 16 2012 /usr/lib/libSDL-1.2.so.0.11.3


could you check if these differ? thanks. I'd appreciate hearing other people's results as well of course.


EDIT: a simpler trst would be to run md5sum on your downloaded pnd - for example if you put it in GAMES/pandora/menu, then the command would be


md5sum /media/GAMES/pandora/menu/xu4-u4-1893.pnd


which should return


37590ac8be2f1cc5dbdeb7eab6e2e882 /media/GAMES/pandora/menu/xu4-u4-1893.pnd
 
Last edited by a moderator:
Perhaps we have a different libSDL?


399004 Mar 16 2012 /usr/lib/libSDL-1.2.so.0.11.3
emberassing to say I'm having hard time getting the information you want. I tried "ls -l" and "info" but none gave the output you showed, ls gives me the 8th of August as a date though.

37590ac8be2f1cc5dbdeb7eab6e2e882 /media/GAMES/pandora/menu/xu4-u4-1893.pnd
md5sum seems ok


two things I noticed (but still could be just coincidences):


During the intro/character creation sequence a tune is played repeating itself after a while. During my last 4 tries to repeat the error I got to the impression that maybe 20-30s before the game segfault a short "klunk" sound can be heard. the sound itself is hard to describe, it seams somewhat alien to the tune itself, but seams to be played with an "instrument" that fits the orchestra (sorry for my poor english vocabulary keeping me from describing it more comprehensible - maybe using our native tounge could help here if needed)


Two out of four times I had the impression that starting "all over again" (meaning deleting the content of the ".xu4" and "debug" folders) would "provoke" the error to appear again.
 
to see the complete info for the libsdl


ls -l /usr/lib/libSDL-1.2.so.0.11.3


or


ls -l /usr/lib/libSDL* for less typing


The error may be related to my changes to the music playback code :( . Try going to ©onfigure (S)ound options and turn music volume down until "Disabled" appears. Then accept the changes and restart. Does it still segfault without music?
 
Did as told,during the session where I had disabled the music, the game hang during the intro sequence (but no segfault). I had to bring up the kill menu to close the game (odd thing: xu4 appeared twice - with different pids - in the killmenu list). Tried it three times after that without any hanging/segfaulting
 
Thanks for testing thatgui! I guess youll have to play without music for the time being.


If anyone else could please download xu4 from repository and let me know if you have the same error or not, that would be a big help.


p.s. thatgui are you playing on a 256MB pandora? Perhaps it is running out of memory.
 
Thanks for testing thatgui! I guess youll have to play without music for the time being.


If anyone else could please download xu4 from repository and let me know if you have the same error or not, that would be a big help.


p.s. thatgui are you playing on a 256MB pandora? Perhaps it is running out of memory.
Sorry, I think I didn't not make myself clear: I can play the game itself without a crash with music (well, at least for ~40min), it is just the intro/character creation part that crashes.


I have the 512MB Version (thanks again Ed!).
 
Back
Top