SDLPoP; David's open-source port of PoP
Re: SDLPoP; David's open-source port of PoP (pre-release)
Hello. David.
1. Blinking is working, indeed. Sorry.
2. What's the problem with the music? Or simply you do not have enough free time?
Thanks...VM
1. Blinking is working, indeed. Sorry.
2. What's the problem with the music? Or simply you do not have enough free time?
Thanks...VM
Re: SDLPoP; David's open-source port of PoP (pre-release)
With or without the change?Eugene wrote:1. Blinking is working, indeed. Sorry.
I did not do the music yet.Eugene wrote:2. What's the problem with the music? Or simply you do not have enough free time?
Re: SDLPoP; David's open-source port of PoP (pre-release)
Yes, without any change code.With or without the change?
Re: SDLPoP; David's open-source port of PoP (pre-release)
I tested it a while back (on Linux) and I had to change the code as you suggested to see the blinking.
Re: SDLPoP; David's open-source port of PoP (pre-release)
Hello, David.
https://dl.dropboxusercontent.com/u/53327776/pp1wav.zip
Maybe convert midi music to wav or to mp3?I did not do the music yet.
https://dl.dropboxusercontent.com/u/53327776/pp1wav.zip
Re: SDLPoP; David's open-source port of PoP (pre-release)
viewtopic.php?p=15497#p15497Eugene wrote:Hello, David.
Maybe convert midi music to wav or to mp3?I did not do the music yet.
https://dl.dropboxusercontent.com/u/53327776/pp1wav.zip
http://www.popot.org/get_the_games/vari ... _music.zip
Re: SDLPoP; David's open-source port of PoP (pre-release)
Here is the new version.
Changes:
Added support for music. (finally!)
Fixed some memory leaks.
Music is not included, you have to download it separately. See doc/Readme.txt .
Changes:
Added support for music. (finally!)
Fixed some memory leaks.
Music is not included, you have to download it separately. See doc/Readme.txt .
- Attachments
-
- SDLPoP_v1.13.zip
- (1.29 MiB) Downloaded 454 times
Re: SDLPoP; David's open-source port of PoP (pre-release)
Nice. Little bit of static during playback. I was messing around playtesting it and ran into what I first thought was an SDLPoP bug but turns out to be something that also happens in the original game. This happens for example in level 2, near the 3rd guard (yellow/orange). When in fighting stance, scoot backwards until you fall to the lower floor and get spiked. Press "r" to resurrect. Then climb up.
Re: SDLPoP; David's open-source port of PoP (pre-release)
The guard will push the kid off the ledge into the spikes (which are now disabled: stuck-outside).Norbert wrote: This happens for example in level 2, near the 3rd guard (yellow/orange). When in fighting stance, scoot backwards until you fall to the lower floor and get spiked. Press "r" to resurrect. Then climb up.
The kid will have 0 HP, but he will crouch forever instead of dying.
It seems that the disabled spike is the key.
The bug it also possible with the disabled (stuck-inside) spikes found in Apoplexy.
If I use another object that is walkable, but the guard won't fall into it (a solid-loose floor or a stuck-open chomper), then the bug won't happen.
This happens in land() (seg005.c)
if (get_tile_at_char() != tiles_2_spike) is false [spike] -> goto loc_5EE6;
if (is_spike_harmful()) is also false. [disabled]
if (Char.fall_y < 22) is true. [fell only one row]
if (Char.charid >= charid_2_guard || Char.sword == 2) is false. [it's the kid, and he is not holding the sword] -> seq_id = 17; (crouch)
[in the Apple II source: CTRL.S, hitflr routine, "beq :hitspikes" jumps over "lda CharLife"]
That goto jumps into the block of "if (Char.alive < 0)" [is alive] whose condition is false (because Char.alive is 0 [kid is dead]).
Therefore, the game will do as if the kid was alive.
A fix would be to replace "goto loc_5EE6;" with the if block after "loc_5EE6:".
In the original game, this can happen only if someone falls into the spikes (*), and then the kid is pushed (by a guard) into the spikes (**).
If that "someone" is the kid, then this requires cheats (R).
If that "someone" is a guard, then you need to lure a guard to the spikes from another room.
(*) There are no already-disabled spikes on the original levels.
(**) Or is there another way of first dying, and then falling?
Re: SDLPoP; David's open-source port of PoP (pre-release)
This change seems to have got reverted because 1.13 still shows the empty console window.David wrote: CHANGE: Changed project type to GUI. This means that the (empty) console window won't appear under Windows.
Would it be possible to allow the game to switch between fullscreen and windowed while it is running using Alt+Enter? Having this ability will certainly be much better than having to run the EXE with the "full" param.
Don't know if it's been discussed earlier, but what's the problem with using the original game music resources instead of comparatively huge OGGs? Is the use of OGGs just a temporary stop-gap measure?
Speaking of sound/music, since SDLPoP uses PoP1 1.0, is the Ctrl+S bug fixed?
Anyway, fantastic as always, and great to see the progress since I last checked SDLPoP out.
Re: SDLPoP; David's open-source port of PoP (pre-release)
Oops, it seems I did that change only for the debug project.Andrew wrote:This change seems to have got reverted because 1.13 still shows the empty console window.David wrote:CHANGE: Changed project type to GUI. This means that the (empty) console window won't appear under Windows.
Now I fixed this.
I added it now.Andrew wrote: Would it be possible to allow the game to switch between fullscreen and windowed while it is running using Alt+Enter? Having this ability will certainly be much better than having to run the EXE with the "full" param.
The game seems to crash very-very rarely when using it, I can't reproduce it anymore.
EDIT: It happens if I switch *into* fullscreen while the game is paused.
EDIT: I think I fixed that.
It was discussed here: viewtopic.php?p=15488#p15488Andrew wrote: Don't know if it's been discussed earlier, but what's the problem with using the original game music resources instead of comparatively huge OGGs? Is the use of OGGs just a temporary stop-gap measure?
The key points are:
* The MIDI player in SDL_Mixer needs instruments in wavetable format.
But the original game stores only a description of them. (ADSR, waveform, etc.)
(Though the Mac version has the instruments as waves.)
* Using a wave format (like OGG) gives mode freedom to the modders.
I just tested it and Ctrl-S does not turn off "chunk" sounds: digi sounds that were converted for use with SDL_mixer.Andrew wrote: Speaking of sound/music, since SDLPoP uses PoP1 1.0, is the Ctrl+S bug fixed?
Plus if I turn sound off with Ctrl-S, then all currently playing sounds should stop (or mute).
Now I fixed both.
Plus I made sure that sound on/off does not break sound-based timing. (Used for slow-fall, for example.)
And of course, having no sound card should not break it either.
Thank you!Andrew wrote: Anyway, fantastic as always, and great to see the progress since I last checked SDLPoP out.
Re: SDLPoP; David's open-source port of PoP (pre-release)
Here is the new version.
Changes:
FIXED: Changed project type to GUI in the "release" project, too.
FIXED: Ctrl-S did not turn off mixer sounds.
FIXED: Ctrl-S did not stop currently playing sounds.
DONE: Toggle fullscreen with alt-enter.
FIXED: If the game is in full screen, and I switch away (alt-tab) and back, most of the screen will be black, until it is redrawn.
Changes:
FIXED: Changed project type to GUI in the "release" project, too.
FIXED: Ctrl-S did not turn off mixer sounds.
FIXED: Ctrl-S did not stop currently playing sounds.
DONE: Toggle fullscreen with alt-enter.
FIXED: If the game is in full screen, and I switch away (alt-tab) and back, most of the screen will be black, until it is redrawn.
- Attachments
-
- SDLPoP_v1.14.zip
- (1.29 MiB) Downloaded 440 times
Re: SDLPoP; David's open-source port of PoP (pre-release)
Thanks very much, David.
Nice work!
But....
1. Now is time to think about scaling game window.
On modern monitors window size 320x240 looks "no ice".
It really do?
2. Do you plan to implement the joystick work?
Nice work!
But....
1. Now is time to think about scaling game window.
On modern monitors window size 320x240 looks "no ice".
It really do?
2. Do you plan to implement the joystick work?
Re: SDLPoP; David's open-source port of PoP (pre-release)
Great, seems to work very well and hasn't crashed so far for me at any point during the game, paused or otherwise.David wrote:I added it now.
The game seems to crash very-very rarely when using it, I can't reproduce it anymore.
EDIT: It happens if I switch *into* fullscreen while the game is paused.
EDIT: I think I fixed that.
Apologies if this sounds dumb, but how about using something like FluidSynth, FMOD Ex, DUMB, BASS/BASSMIDI etc.? Then we can have (with something like BASSMIDI for example) support for MP3, MP2, MP1, OGG, WAV, AIFF, MOD music (XM, IT, S3M, MOD, MTM, UMX), MO3 music (MP3/OGG compressed MODs), MIDI (including SF2 and SFZ SoundFonts)... Of course I have no idea of the amount of effort involved, so it's easy for me to say, but I think MIDI and tracker module support especially would be nice so we can have good music at relatively small sizes.David wrote:It was discussed here: viewtopic.php?p=15488#p15488
The key points are:
* The MIDI player in SDL_Mixer needs instruments in wavetable format.
But the original game stores only a description of them. (ADSR, waveform, etc.)
(Though the Mac version has the instruments as waves.)
* Using a wave format (like OGG) gives mode freedom to the modders.
Re: SDLPoP; David's open-source port of PoP (pre-release)
I'm still hoping for an SDL2 version of the port, because the current fullscreen doesn't work under Linux, so I get 320x200 on a 1920x1080 screen.David wrote:DONE: Toggle fullscreen with alt-enter.
This would be very easy with SDL2. See, for example, the apoplexy source code. It includes the code to haptic rumble (maybe when the prince gets hit? ). For initialization, see the code starting at line 7989. For input processing, see the case SDL_CONTROLLERBUTTONUP and case SDL_CONTROLLERAXISMOTION in, for example, the ChangePos function.Eugene wrote:2. Do you plan to implement the joystick work?