MININIM Source Code Study

A free software implementation of Prince of Persia 1.
David
The Prince of Persia
The Prince of Persia
Posts: 2846
Joined: December 11th, 2008, 9:48 pm
Location: Hungary

Re: MININIM Source Code Study

Post by David »

Nick2017 wrote:Does Mininim use the same fonts as the DOS version of POP?
No, it uses the font built into Allegro: https://github.com/oitofelix/mininim/bl ... deo.c#L130
User avatar
oitofelix
Wise Scribe
Wise Scribe
Posts: 227
Joined: February 17th, 2016, 1:59 pm
Location: Brazil
Contact:

Re: MININIM Source Code Study

Post by oitofelix »

Nick2017 wrote:Does Mininim use the same fonts as the DOS version of POP?
MININIM uses Allegro's built-in 8x8 font.

Edit: As David, just said :P
Bruno Félix Rezende Ribeiro (oitofelix)
MININIM author
Nick2017
Sheikh
Sheikh
Posts: 30
Joined: January 7th, 2017, 10:45 pm

Re: MININIM Source Code Study

Post by Nick2017 »

Are the X and Y increments for each sprite of the characters the same in MININIM as the original DOS game? or did you had to do them all with trial and error? also, where are these values located? I can't seem to find them :?
User avatar
oitofelix
Wise Scribe
Wise Scribe
Posts: 227
Joined: February 17th, 2016, 1:59 pm
Location: Brazil
Contact:

Re: MININIM Source Code Study

Post by oitofelix »

Nick2017 wrote:Are the X and Y increments for each sprite of the characters the same in MININIM as the original DOS game? or did you had to do them all with trial and error?
No, they aren't. I purposely used trial and error to obtain smoother animations, given that in my view the original game's offsets aren't optimal.
Nick2017 wrote:also, where are these values located? I can't seem to find them :?
MININIM uses a base array of offsets for each movement (struct frameset), which can be found in their respective modules. See, for instance, the simple jump one. Sometimes, under ad-hoc conditions, those offsets are used only as a basis for computing the actual ones, though.
Bruno Félix Rezende Ribeiro (oitofelix)
MININIM author
Nick2017
Sheikh
Sheikh
Posts: 30
Joined: January 7th, 2017, 10:45 pm

Re: MININIM Source Code Study

Post by Nick2017 »

oito, I was thinking that maybe if you moved some modules into folders like this, it would be easier to follow, something like:

movable_objects/kid
movable_objects/jaffar
movable_objects/princess
movable_objects/mouse
movable_objects/guard

transitional_objects/torch
transitional_objects/clock
transitional_objects/mirror
transitional_objects/chopper
transitional_objects/spikes
transitional_objects/potion

level/room
level/wall
level/bricks
level/carpet

I know there are much more modules, and the rest could go in a folder like "etc" or "misc". What do u think?
User avatar
oitofelix
Wise Scribe
Wise Scribe
Posts: 227
Joined: February 17th, 2016, 1:59 pm
Location: Brazil
Contact:

Re: MININIM Source Code Study

Post by oitofelix »

Nick2017 wrote:oito, I was thinking that maybe if you moved some modules into folders like this, it would be easier to follow
MININIM has no concept of "movable" vs "transitional" objects. Its closest analogues are "actor" and "dynamic construction", I'd say. Furthermore, I don't think moving source modules into subdirectories would significantly ease comprehension. Source files are already named in a quite suggestive manner, and there is not that many files after all. It could difficult maintenance, still. Every tree-like hierarchical structure is biased towards a particular (of many possible) takes on a concept. Choosing one over another, or even choosing one at all, must follow a very compelling rationale.
Bruno Félix Rezende Ribeiro (oitofelix)
MININIM author
Post Reply