Greetings

New on the forum? Introduce yourself here and be welcomed!
Post Reply
MrBin
Scholar Scribe
Scholar Scribe
Posts: 1
Joined: January 21st, 2023, 11:37 pm

Greetings

Post by MrBin »

Hello. This full nick is MrBinary, but my friends call it MrBin.

Currently, I'm working on a different fangame in my spare time, which should be ready in some months. In the meantime, I'll be studying everything I'll need for my next project- an open-source C port of PoP2 for the Sega Genesis/MegaDrive, hopefully better than the unfinished port. I made a game engine and it's ready to go. But I'm not gonna lie, all this is the master plan to, eventually, pull a TobyFox and have an easier track for selling games of our own, with friends.

When I was a child I had access to a PC with many MS-DOS games, it had PoP1 among them, and I... found it far better and fun than Aladdin lol. I know this game like the back of my hand now. PoP2, not so much since I had no chance to play it until I remembered a few days ago. I can't even beat it yet! it's easy to get lost. Somehow this project is my way to force myself to fully learn the game. But technically it seems pretty similar to PoP1, I think the main visible differences (ignoring the new "objects") are the capability of switching tilesets, and having "invisible" rooms with a two-layer background on it.

I'm pretty much a noob to PoP. I learnt that level editors exist like 2 days ago, and I have yet to read Mechner's documents or some source code, be it official or unofficial. I don't know the 6502 instruction set yet, but I can learn it if necessary. As of this moment, my main concern is finding documentation on the physics; I have lots of questions such as "does collision radius work according to every individual sprite's width/height?" "what are the player's speeds for running or jumping?" and so on.

Anyways, thanks for reading, and thanks for letting me in. See you next time!
User avatar
Alberto
Sheikh
Sheikh
Posts: 48
Joined: February 13th, 2019, 6:55 am
Contact:

Re: Greetings

Post by Alberto »

Hey MrBin!
A year late, but I'm still the first one to say welcome!
MrBin wrote: January 23rd, 2023, 7:42 pm "does collision radius work according to every individual sprite's width/height?"
As far as I know (and I don't know much) it's a mix of bounding boxes and pixel perfect collisions using overdraw.
MrBin wrote: January 23rd, 2023, 7:42 pm "what are the player's speeds for running or jumping?"
The player has no speed when running, every frame moves the sprite a certain amount of 'game pixels', this can be checked in the SEQTABLES file from the source code. The only time I know of when speed is involved is in the falling state, which is a value that is compared to know if the player should soft land, medium land or hard land (splat!).
MrBin wrote: January 23rd, 2023, 7:42 pm As of this moment, my main concern is finding documentation on the physics
I mean, there's the source code which is the best reference/documentation there is, but I get the gripe. Knowing 6502 assembly is a requirement otherwise the source code isn't that helpful. Maybe you could try reading David's SDLPoP source code, it's more readable. Again I recommend starting with the seqtbl file.
FluffyQuack
Vizier
Vizier
Posts: 80
Joined: June 6th, 2004, 7:05 pm

Re: Greetings

Post by FluffyQuack »

The SDL-POP and Apple 2 source codes that Alberto linked to are excellent references.

For collision detection, the game calculates the image width of the current frame of animation for the prince and uses that to check if he's colliding with walls or enemies. The game does a smart thing in regards to detecting what tile the player is standing on by having a "weight" offset for each frame of animation that corresponds to where the prince has his feet planted. There's some other nuance to the collision detection.

One important note in regards to POP2 (if you want to make a faithful recreation of the game) is that the horizontal coordinate system is different than POP1. POP1's coordinate system was based on Apple 2's resolution, and that carried over to the DOS version. So one unit in the horizontal coordinate system is something like 2.28 pixels, while in POP2 they changed it so one unit always matches one pixel in screen space. That new system is easier to work with, but it means every single distance value is different in POP2 compared to POP1.

I'm curious if you managed to get a lot progress since your post. That said, I wouldn't blame you if you diverted to another project. Remaking POP2 is daunting since we don't have source code to reference, so making a faithful remake requires a lot work.
Post Reply