MININIM Source Code Study

A free software implementation of Prince of Persia 1.

Moderator: English Moderator Team

David
The Prince of Persia
The Prince of Persia
Posts: 1435
Joined: December 11th, 2008, 9:48 pm
Location: Hungary

Re: MININIM Source Code Study

Post by David » February 19th, 2017, 2:57 pm

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
Sultan
Sultan
Posts: 199
Joined: February 17th, 2016, 1:59 pm
Contact:

Re: MININIM Source Code Study

Post by oitofelix » February 19th, 2017, 3:19 pm

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

Code: Select all

 88888  FFFFF Bruno Félix Rezende Ribeiro (oitofelix) [0x28D618AF]
 8   8  F     http://oitofelix.freeshell.org/mininim/
 88888  FFFF  mailto:oitofelix@gnu.org
 8   8  F     irc://chat.freenode.org/oitofelix
 88888  F     Please, support my work: http://oitofelix.freeshell.org/funding.html

Nick2017
Sheikh
Sheikh
Posts: 30
Joined: January 7th, 2017, 10:45 pm

Re: MININIM Source Code Study

Post by Nick2017 » March 1st, 2017, 1:12 pm

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
Sultan
Sultan
Posts: 199
Joined: February 17th, 2016, 1:59 pm
Contact:

Re: MININIM Source Code Study

Post by oitofelix » March 1st, 2017, 1:32 pm

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.

Code: Select all

 88888  FFFFF Bruno Félix Rezende Ribeiro (oitofelix) [0x28D618AF]
 8   8  F     http://oitofelix.freeshell.org/mininim/
 88888  FFFF  mailto:oitofelix@gnu.org
 8   8  F     irc://chat.freenode.org/oitofelix
 88888  F     Please, support my work: http://oitofelix.freeshell.org/funding.html

Nick2017
Sheikh
Sheikh
Posts: 30
Joined: January 7th, 2017, 10:45 pm

Re: MININIM Source Code Study

Post by Nick2017 » March 1st, 2017, 3:32 pm

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
Sultan
Sultan
Posts: 199
Joined: February 17th, 2016, 1:59 pm
Contact:

Re: MININIM Source Code Study

Post by oitofelix » March 1st, 2017, 7:41 pm

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.

Code: Select all

 88888  FFFFF Bruno Félix Rezende Ribeiro (oitofelix) [0x28D618AF]
 8   8  F     http://oitofelix.freeshell.org/mininim/
 88888  FFFF  mailto:oitofelix@gnu.org
 8   8  F     irc://chat.freenode.org/oitofelix
 88888  F     Please, support my work: http://oitofelix.freeshell.org/funding.html

Post Reply