nagyd / sdlpop Goto Github PK
View Code? Open in Web Editor NEWAn open-source port of Prince of Persia, based on the disassembly of the DOS version.
License: GNU General Public License v3.0
An open-source port of Prince of Persia, based on the disassembly of the DOS version.
License: GNU General Public License v3.0
I apologise for an offtopic, but I just love this port, and I'd love to see a similar port of Mac version of PoP2, which uses hi-res SVGA graphics not available on DOS or Windows. Not sure if it is possible, but this would be totally awesome.
Since the last couple commits related to sound I've lost sound completely when compiling on my Raspberry Pi and several of the sound effects are now replaced with only static when compiling in Ubuntu on x86.
Is it possible to get Mt32 support with availability to select it for music only or for sound only or the 2? Then we can combinate mt32 music with adlib sound (nice pop1.3 sound set for example) like in dosbox? And optionnally get the famous LCD message 'princess is awaiting'?
As mentioned here, when playing back a recording, Alt+Tabbing back to SDLPoP stops the replay if Alt is released before Tab. (Tested with Linux Mint; Xfce.)
Would be nice if you could add an application icon and a .desktop file. For example
[Desktop Entry]
Encoding=UTF-8
Name=SDLPoP
Comment=An open-source port of Prince of Persia
StartupNotify=false
Exec=prince
Icon=prince.png
Terminal=false
Type=Application
Categories=Application;Game;ArcadeGame;
Currently the source code, compiled EXE, DLLs, all other files necessary for runtime, everything is in one folder. Maybe it would be nice to separate the source from binary files.
For example, two folders in root: source, bin. And LICENSE and README in the root as well.
Steps to reproduce: Press Alt+Enter.
Expected result: Toggles once from/to full screen.
Actual result: Toggles many times at maximum speed, so it is very difficult to set the mode properly ๐
Hi
I've recently worked on the SDLPoP snap package and I was wondering if you're interested in having the ownership transferred to you.
Snap packages are "universal" Linux installers that are supported on many Linux distributions such as Ubuntu, Fedora, Debian, Pop!_OS etc. It's a single package for all the distributions and all their versions. Compatibility is very high because snaps are sandboxed and contain all their dependencies in the sandbox.
Afaik, all the features of SDLPoP are currently supported in the snap, including joystick support, saves, custom SDLPoP.ini
files, etc. There aren't any outstanding bugs known with the package and over the past year, SDLPoP was often featured in the "Editor's Picks" in the Ubuntu Software store, so it's quite popular.
This is a graph showing the distributions of active installs geographically and based on Linux distro.
Currently, this snap package is maintained by the "snapcrafters" community. We're happy to keep doing this, but one of the goals of snaps is to give developers control over the distribution of their apps on Linux, so it's common to ask the upstream developers if they're interested in taking ownership of the package.
Currently, the snap package is built from this repo, which gets the code from the latest release of SDLPoP from your repo. It's currently integrated with Travis to do automatic test-builds of pull requests and it's integrated with https://build.snapcraft.io so that every push to master triggers a new build in the edge
channel. After testing, this package is manually promoted from the edge
channel to the stable
channel, at which point it's available for everyone on Linux and existing installations get updated automatically.
So, are you interested or do you have any questions? Let me know!
If you're interested, I can make a PR to add the snap
bits to this repository, instead of it being in a separate repository. Then you'd get automatic builds of every push to the master
branch of this repository, so people on Linux can easily test the bleeding edge version of SDLPoP.
By default, SDLPoP outputs audio in 22050Hz / 8-bit / Mono which results in a dull and noisy background music. I was able to double the sampling rate and the number of channels, but increasing the bit-depth garbles the sound effects, resulting in an unpleasant high-pitched sound (this is likely because they're stored in a 8-bit format). I've tried to use different output formats (including AUDIO_S16SYS
as suggested here), but I'm unable to fix this.
Note: I'm gonna mark non-SDLPoP (i.e. PoP remaster) related issues as "HD". LMK if you feel that this isn't appropriate and I'll figure out some alternative.
Until my graphic tablet arrives (so I can begin redrawing the character sprites), I would like to continue my work by mimicking the look of the stars found in the Macintosh version. The correct approach would be to disassemble the Mac executable to see how're they drawn to the screen, but because of my lack of skills, I've opted for recording the animation frame-by-frame so I can see it in slow-motion (see the attached archive). For the purpose, I've created a reference picture (similar to what's found in Mac sprites) to have some idea how this should look like:
Tina LaDeau staring at those pesky stars.
P.S.: I've noticed that you're using/targeting Windows XP so I removed all the symlinks from the provided archive as (AFAIK) Windows XP doesn't support them. This means that the application is now standalone.
๐ macpop1_stars.mkv.zip (press E in VLC for frame-stepping)
I would make packaging easier if there was an option to install SDLPoP into a PREFIX via -DCMAKE_INSTALL_PREFIX=/usr/local
.
My Flatpak manifest contains the necessary commands, which would need to be added to the CMakeLists.txt or Makefile: #172 (comment)
From #88 (comment)
Should replay files be stored separately for each mod, similar to how PRINCE.HOF, PRINCE.SAV and QUICKSAVE.SAV can be saved and loaded directly within their own directories?
And what about downloaded replay files?
We could change the format of the replay file a bit, so that replays will automatically run with the correct data files, even if they are double-clicked from anywhere. I already did something similar on this branch: https://github.com/Falcury/SDLPoP/tree/script
Then we would also need to add a warning if that specific mod's data files cannot be found.
Or we could even consider including all modified data into the replay file itself; this would mean that anyone could play back the replay, even though they haven't downloaded the mod itself. But this would mean that the file size of replays becomes larger, obviously.
I wonder if replays should perhaps automatically get saved to a replays/
folder. Then they will all be in one place, and it will be easy to drop downloaded replays into that folder as well.
They could maybe have a naming scheme like so:
Original Levels - L5 - YYYY-mm-dd HHMMSS.p1r
Prince4D - L10 - YYYY-mm-dd HHMMSS.p1r
Recognizable/unique filenames should also make it easier to share replays with other people. (no need to rename the files)
Possible disadvantage: cycling through replay files while in-game would become more difficult then...
Maybe it will be possible to reload different data files on the fly for each replay.
Or the game could skip all the replays that were recorded with another levelset.
Perhaps it would not be hard to implement support for anti-aliasing filter. It's obviously a very good idea. Necessary in fact.
Hi there,
It seems SDLPoP left the SDL_Joystick interface in favor of the SDL_GameController interface, and I didn't notice until today.
My PSX gamepad with USB adaptor does not work anymore due to this, SDL_GameController is OK for things like the M$ gamepad, but not for USB joysticks I guess.
Now, my PSX gamepad works with any other SDL2 game, except SDLPoP :(
In fact, SDL_IsGameController() returns "false" for all the USB joysticks I have around...
So, any chances to see SDL_Joystick interface as a fallback if SDL_GameController is not detected?
It's an easy fix on set_joy_mode(), a matter of adding a new SDL_Joystick * in data.h and, well, bringing back the movement detection code again.
Thanks!
stb_vorbis.c:579:32: warning: unknown warning group '-Wmaybe-uninitialized', ignored
[-Wunknown-warning-option]
#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
^
1 warning generated.
If there are broken links in the level then some of the rooms may not be on the map because SDLPoP doesn't know where to put them.
Norbert proposed a solution here: http://forum.princed.org/viewtopic.php?p=23301#p23301
Well, while drawing the rooms, you should notice you cannot draw certain rooms because they would be attached at locations where you already drew a room. (Where a room already exists.) You could keep a list of all such rooms. Then, at the very end, check which of these rooms you never drew. Put these in a row somewhere below the map, all separate from each other, with room link arrows inside them.
This issue is just a reminder for myself.
I'm trying to compile this program on FreeBSD/powerpc64, but I'm getting:
types.h:54:2: error: #error This program is not (yet) prepared for big endian CPUs, please contact the author.
This is a feature request.
It would be nice if SDLPoP, similar to its unique fake tiles, introduced text potions.
Their legacy combos could be variants 0x10 through 0x1F in group 0x0A.
This would introduce 16 lines of (hint/help) text for each level, easily storable in a single plain text file per level.
Perhaps a distinct/suitable potion size and bubble color would be small+yellow, although I do not immediately know whether this would conflict with the visual presentation of the potions "shadow", "time", "full", "open" and "strong".
Developers could add/test the potions via apoplexy's the custom tiles screen.
If an implementation would ship, I could add them on apoplexy's native tiles screen.
Thoughts?
I would love to see someone make a combat training program. Honestly, I am using a gamepad to play because some keyboard button don't work. It is taking time to adjust. I don't feel confident sword fighting. I wish I could practice against differing level of difficulty.
When, for example, the prince finds the sword, and the background flashes yellow, I can see screen tearing. It doesn't happen in the original DOS game when played on a PC. I checked that today as I still have a 286 PC AT. If it is possible to add vsync / framebuffering to SDL, I'd ask you to consider this as a future feature. Thank you!
Both ZIP files include video recordings of my original playing, and SDLPoP's replay files:
http://www.popot.org/Falcury.zip
http://www.popot.org/Falcury2.zip
Also, here's a comparison video of the latter:
http://www.popot.org/Falcury.webm
Download the comparison video, load it with VLC, pause the video, and then manually use the slider.
The problem occurs when changing screens.
Hi.
Is there any way to modify the keyboard controls?
Thank you
I am running SDLPoP version 1.17 within RetroPie. When using an XBOX 360 wireless controller it seems to work fine until you touch the right thumb stick. Once you move the right thumb stick and go back to the left stick you can only take "careful" (shift) steps and your character no longer runs. The only way I found to correct the issue is exit the game and start over. I posted over in the forum but no replies yet so I thought I would try here to see if anyone else is having the same issue.
Also is it possible to assign joystick buttons for the versatility but also to save, load, exit from a joystick only vs. needing the keyboard? I always load SDLPoP in RetroPie and it's one of the few games I need to have the keyboard & joystick handy to play.
Thank you.
Hi,
Currently, Mix_LoadWAV_RW() is called every time a sound is played in play_digi_sound().
This function takes too long to return, so there are pauses during the game (it's easy to see the kid is frozen in the air when he's thrown into the dungeon at level 1 start due to this), which dissapear if this is commented out.
I think Mix_LoadWAV_RW() should be moved to load_sound(), so the conversion is done when the sound is loaded (during level loading) instead of being done when the sound is played: that would be the correct approach and gameplay would be more fluid on slow platforms.
I have done a similar experiment on the stvb branch, and it works very well (avoiding the SDL_BuildAudioCVT() call when a sound is being played, just calling it a single time in digi_init() instead).
Just to clarify, the problem on both the master and stvb branches is the SDL_BuildAudioCVT() function, which is called directly on the stvb branch (and hence can be moved to init_digi()) and is called indirectly by Mix_LoadWAV_RW() on the master branch. Since using Mix_LoadWAV_RW() is atomic, there's no way to move the "internal" SDL_BuildAudioCVT() call that Mix_LoadWAV_RW() does to init_digi() on the master branch, so Mix_LoadWAV_RW() should be called on load_sound() instead.
When I play, I get some horrible loud white noise sound at some times:
Haven't went further but the other sound effects are strangely fine.
Hi,
Many engines reimplementations of 320x games nowadays implement scanlines, and games look awesome like that.
Coud you please implement the tv2x scanline method used by scummvm? It works nice along with SDL_SetHint(SDL_HINT_RENDER_SCALE_QUALITY, "linear");
while other implementations don't, thus giving a VERY nive look to those games.
Hello :-)
I've next to know experience with C on OSX so please bear with me. But once I learned about this project I couldn't resist to build it. Luckily I could figure out how but on the way some inconsistencies popped up:
The Readme.txt mentiones Ports but I can confirm that Homebrew worked as well for me:
brew install sdl2 sdl2_image sdl2_mixer
However it seems *.ogg
are not supported by this version of mixed, as I'm getting: Unrecognized sound file type
Btw, what do you think about moving /docs/Readme.txt
to /readme.md
, format it a bit to markdown on the way? I think it would be nicer for first time visitors to have this information here readily presented.
The CMakeLists.txt actually contains a comment that the OSX configuration is missing; I was able to get i working with this change:
diff --git a/CMakeLists.txt b/CMakeLists.txt
index c5f4791..1e36bcf 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -49,7 +49,7 @@ add_executable(prince ${SOURCE_FILES})
# @Todo: add a configuration for Mac OS X
-target_link_libraries(prince mingw32 SDL2main SDL2 SDL2.dll SDL2_image SDL2_mixer)
+target_link_libraries(prince SDL2main SDL2 SDL2_image SDL2_mixer)
The Readme.txt mentions to use make -f Makefile.osx
. However this file does not exist and Makefile
seems to handle both cases already, as it worked out of the box without any changes but just running make
.
Not sure I'm trying to make any point here, maybe it's useful for people not having a plan what they're doing :-)
thanks
PS: awesome project, btw!
A feature request.
It would be nice if there were an option to ignore .pal files, to allow the use of full-color .png files.
I'd probably make sense to turn this on by default, to give modders the most freedom out-of-the-box.
If necessary, I'd be willing to help convert all indexed .png files to full-color .png files.
Can I have translations? You could use the Translation Project if the package uses gettext.
For any controller config where B is one of the main face buttons, Quit is too easy to press, resulting in accidental lost progress. Since the button mappings are hardcoded, consider remapping it to another button further from most players' thumb resting position, like Start.
It looks like the code refers to buttons by index, so I'm not sure if there's a consistent index that gets you such a button.
This is a feature request.
It would be nice if SDLPoP, similar to its unique fake tiles, introduced colored torch flames.
Their legacy combos could be variants 0x00 (0x01, really) through 0x40 in groups 0x13 and 0x1E.
This would allow for 64 colors (6-bit RGB) to be used by modders.
There is a related post on the Princed forum that, among other things, suggests simply keeping the cores of custom flames white.
Developers could add/test the flames via apoplexy's custom tiles screen.
If an implementation would ship, I could add them on apoplexy's native tiles screen.
Thoughts?
would be nice for Linux packages without Windows DLLs floating around, but https://github.com/NagyD/SDLPoP/releases is empty for the moment.
I'd like to ask for a possibility to switch level coloring on and off, as prince version 1.0 had all non-palace walls grey, and 1.3 had more variety in color. Just to make it complete. Thanks!
Hi! :-)
Seems like SDLPoP (v.1.17, compiled locally) has problems playing mods on Linux (I'm on Debian Jessie x64 KDE).
Sometimes it can't load the mod's graphics and - or music and uses the original ones and sometimes are loading them but can't load the mod levels and uses the originals (depending on the mod).
At Windows (I'm on 10 x64, SDLPoP same version, binary downloaded from popot.org)) it plays mods flawlessly.
I'm using the method of extracting the mod at mod directory and editing the INI.
Hi,
Please add a license to your repository, in the current state it's not "open source" as claimed by the description, since there is no licensing information to specify under which terms the code can be reused.
Hello everyone,
I am currently working on using Unicode/UTF-8 for file paths on Windows.
This is needed so that the replay files can be opened from the command line (or with filetype association), even if the path (of either the replay or SDLPoP) contains non-ASCII characters.
This is what I have now: https://github.com/NagyD/SDLPoP/tree/UTF-8
I would like it to work in all compilers. So if you can compile for Windows, please test whether it works for you.
Thank you.
Whenever a guard attacks with his sword and whiffs while Kid's switching screens the sound effect of the attack keeps looping indefinitely until Kid re-enters the screen where the guard is located at.
How to reproduce:
Hi!
I'd like to request a feature/option for rendering the game in such a way that would provide consistent pixel sizes on the screen. This may not be obvious or visible to a lot of people, but that's how the game is supposed to look like.
If you look at some dithered checkerboard-like areas, you can see how the pixels are actually different sizes:
But they should all be the same size:
There's a modified version of Dosbox that supports this feature. I assume it can be used for a reference in case if this feature would be considered!
Link here: https://github.com/bladeSk/DOSBox-pixel-perfect
Please, setup SDLPoP for building for S60v3 (Symbian 9.2) using GnuPoc SDK:
https://cloud.mail.ru/public/JxE5/CDr4AStEZ
https://github.com/instead-hub/instead/blob/master/instead.pkg
http://wiki.scummvm.org/index.php/SymbianOS
Neither the arrows keys nor the WASD keys do anything. Or did you set different default controls?
My other problem is mostly unrelated to the SDLPoP development. I'm trying to improve the graphics by replacing the low resolution sprites with the ones from the 1992 Macintosh version. I was able to do this with the titles, however, I have stumbled upon a deal-breaking issue. The coordinates defining the placement of the objects on the screen are bound by the 8-bit integrer limit (precisely 255 pixels; higher values result in a integrer overflow) meaning that I cannot place them where they belong.
The floating duoโฆ I can't get them back to floor. Jaffar is visible too.
Unfortunatelly, I'm not a programmer so I cannot figure out how to fix this.
Do you think it is good to add MIDI support alongside the .ogg files?
Is possible convert to C?
If I set my Windows 10 Display Scaling to 100%, the nearest neighbour scaling works perfectly.
But if I set it to any other value (I normally use 150%), the image starts to blur.
Here is a comparison: https://i.imgur.com/F3diLIj.png
On the left is SDLPoP with 100% scaling. On the right is SDLPoP with 125% scaling.
If you zoom in, you can see that the left is crisp, while the right is blurry.
Flatpak is a software utility for software deployment, package management, and application virtualization for Linux desktop computers.
It provides a sandbox environment in which users can run applications in isolation from the rest of the system.
The following code from seg007.c produces a warning in cppcheck:
// seg007:132C
void __pascal far draw_cur_mob() {
if (curmob.room == drawn_room) {
redraw_height = 0x20;
set_redraw_full(curr_tilepos, 1);
set_wipe(curr_tilepos, 1);
if ((curr_tilepos + 1) % 10 < 10) {
set_redraw_full(curr_tilepos + 1, 1);
set_wipe(curr_tilepos + 1, 1);
}
}
}
Specifically the check
if ((curr_tilepos + 1) % 10 < 10)
will always be true.
Did you mean to check for something else?
Hi! :-)
I installed SDLPoP v1.17 at my system (Debian Jessie x64 KDE) and everything works great except from the sound.
Every sound played (eg. a closing door, or a falling floor), followed by a terrible noise (like scratching something).
SDL v.2.02.
I don't think pixel perfect integer scaling works on my Retina screen. It requires 1600x1200 minimum, my full screen resolution is 2880x1800. Perhaps SDL is not utilising the full Retina resolution.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.