Page 5 of 9

Re: Prince Of Persia.net written in C#

Posted: September 12th, 2014, 12:38 am
by salvadorc17
I want to ask polipo, how do you solved the prince restart level on dead, becuase it was so bugged....

Re: Prince Of Persia.net written in C#

Posted: September 12th, 2014, 8:49 am
by polipo
says Salvadorc17 : I want to ask polipo, how do you solved the prince restart level on dead, becuase it was so bugged.
Fixed now, i will release now!
>>only for windows and clickonce, linux i will release in next days

Re: Prince Of Persia.net written in C#

Posted: September 12th, 2014, 9:01 am
by polipo
Dear,
Norbert wrote:
Yes, I can run that under Linux.
Unfortunately, in-game, it only has one frame every 9 (or so) seconds, so it's too slow to play the game.
Its a problem on graphics driver for monogame, for replicate i can investigate on a real linux machine, now i dont have it.
Norbert wrote: of errors is useful:....
This errors are present in all version, there are some missing kid sprite graphics, i dont found it on original mac source code, this
is only a warnings is not bind to your linux performance problem.

Re: Prince Of Persia.net written in C#

Posted: September 12th, 2014, 9:26 am
by David
(from viewtopic.php?p=15395#p15395 )
Norbert wrote:Still this slow for me.

Maybe this overview of errors is useful:
I get similar errors but the game is not slow for me: viewtopic.php?p=15329#p15329

It seems to me that these errors are about missing sprites.
Namely, Kid_166 and Kid_86 are missing from Sprites/player/Kid_dos/ .
And Kid_166 is shown twice because it occurs twice in Sequences/dos/kid_sequence.xml .

EDIT: polipo answered while I was writing my post.

Re: Prince Of Persia.net written in C#

Posted: September 13th, 2014, 2:29 am
by salvadorc17
Then where do you get those sprites??? the mac source has all it???

Re: Prince Of Persia.net written in C#

Posted: September 13th, 2014, 10:44 am
by David
First of all, what you call "mac source" is the Apple II source.
The Apple II version is not the Macintosh version.

I see you copied the sequences (more or less) from SEQTABLE.S.

"Frame" and "image" mean different things in the PoP source.
An "image" is just an image that has width, height, and pixels.
A "frame" is an image plus some other data, like sword image, x/y offsets.
Frames are defined in FRAMEDEF.S.
polipo wrote:there are some missing kid sprite graphics, i dont found it on original mac source code
According to FRAMEDEF.S:
Frame 166 (of the kid) uses image $0f (15), just like frame 15.
Frame 86 uses image $1d (29), just like frame 29.

Re: Prince Of Persia.net written in C#

Posted: September 14th, 2014, 12:36 am
by salvadorc17

David:

According to FRAMEDEF.S:
Frame 166 (of the kid) uses image $0f (15), just like frame 15.
Frame 86 uses image $1d (29), just like frame 29.

Can you show me what sprites are you talking about, becuase i cant find the sprites images into the source...

Polipo:
Fixed now, i will release now!
>>only for windows and clickonce, linux i will release in next days
How do you solved it, i trough you need to create a new player instance every times level reset, or im wrong???

Re: Prince Of Persia.net written in C#

Posted: September 14th, 2014, 10:28 am
by David
salvadorc17 wrote: Can you show me what sprites are you talking about, becuase i cant find the sprites images into the source...
(Does the "source" in your post mean the Apple II source?)
The sprites (images) in PoP.net are from the DOS version, not from the Apple II source.

Although there are some images in the Apple II source, they are in a special format.
They are here: https://github.com/jmechner/Prince-of-P ... rce/Images

Re: Prince Of Persia.net written in C#

Posted: September 15th, 2014, 10:08 am
by polipo
Dear to all,
yes i talk about Apple II version, i have used it for catch the correct animation sequences in SEQTABLE.S file.
I know they are different from the pc dos version (offset and other missing anim sprite),
but i looked into it for undestand how the sprite anim works.
Today i have discovered the david's prince reassembled pc version. Great work David!
salvadorc-> you need to create a new player instance ?
yes, i use the "StartNewLife()" function also i have fixed some bugs on player dead.
david->According to FRAMEDEF.S:..
yes thanks, i have changed the kid_sequence to appropriate spriteset.

Re: Prince Of Persia.net written in C#

Posted: September 16th, 2014, 12:35 am
by salvadorc17
That changes means plus new sprites??? you have uploaded all recently made to the source code???

Re: Prince Of Persia.net written in C#

Posted: September 16th, 2014, 9:14 am
by polipo
That changes means plus new sprites???
No, now the kid sprite set is complete
you have uploaded all recently made to the source code???
No yet, as soon i will upload the new sourcecode

Re: Prince Of Persia.net written in C#

Posted: September 16th, 2014, 11:52 am
by David
polipo wrote: Today i have discovered the david's prince reassembled pc version. Great work David!
Do you mean the David's open-source port of PoP (pre-release) topic?

Re: Prince Of Persia.net written in C#

Posted: September 16th, 2014, 11:45 pm
by salvadorc17
Hey, im trying to add debug code to the project, this functions are well made???

Code: Select all

public RoomNew NextRoom(RoomNew room)
{
	int c = room.roomIndex;


	if (c != 0) {
		c = System.Threading.Interlocked.Increment(ref c);
	}


	foreach (RoomNew r in rooms) {

		if (r.roomIndex == c) {
			return r;

		}

	}


	return blockRoom;
}

public RoomNew PreviuosRoom(RoomNew room)
{
	int c = room.roomIndex;


	if (c != 0) {
		c = System.Threading.Interlocked.Decrement(ref c);

	} else if (c > 1) {
		c = System.Threading.Interlocked.Decrement(ref c);

	}


	foreach (RoomNew r in rooms) {

		if (r.roomIndex == c) {
			return r;

		}

	}


	return blockRoom;
}

Re: Prince Of Persia.net written in C#

Posted: September 17th, 2014, 8:24 am
by polipo
David wrote: Do you mean the David's open-source port of PoP (pre-release) topic?
Yes

Re: Prince Of Persia.net written in C#

Posted: September 17th, 2014, 8:44 am
by polipo
salvadorc17 wrote:Hey, im trying to add debug code to the project, this functions are well made???

Code: Select all

public RoomNew NextRoom(RoomNew room)
{
	int c = room.roomIndex;


	if (c != 0) {
		c = System.Threading.Interlocked.Increment(ref c);
	}


	foreach (RoomNew r in rooms) {

		if (r.roomIndex == c) {
			return r;

		}

	}


	return blockRoom;
}

public RoomNew PreviuosRoom(RoomNew room)
{
	int c = room.roomIndex;


	if (c != 0) {
		c = System.Threading.Interlocked.Decrement(ref c);

	} else if (c > 1) {
		c = System.Threading.Interlocked.Decrement(ref c);

	}


	foreach (RoomNew r in rooms) {

		if (r.roomIndex == c) {
			return r;

		}

	}


	return blockRoom;
}
Dear,
i don't uderstand you have used the interlocked, the monogame framework don't need the sync of thread or i'm wrong?
..debug code..
it means? for debug usually are function for write a log or event for trace errors, in your code i dont see it.

Question: Why you and other prince fan don't join into the PoP.net project ?
The scope of the project is made a generic engine for platform 2d game like PoP

bye