Prince Of Persia.net written in C#

Threads about other remakes and ports.
Post Reply
salvadorc17
Calif
Calif
Posts: 553
Joined: August 27th, 2011, 2:04 am

Re: Prince Of Persia.net written in C#

Post by salvadorc17 »

I want to ask polipo, how do you solved the prince restart level on dead, becuase it was so bugged....
polipo
Vizier
Vizier
Posts: 89
Joined: September 6th, 2012, 8:34 am

Re: Prince Of Persia.net written in C#

Post 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
Last edited by polipo on September 12th, 2014, 5:55 pm, edited 2 times in total.
polipo
Vizier
Vizier
Posts: 89
Joined: September 6th, 2012, 8:34 am

Re: Prince Of Persia.net written in C#

Post 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.
David
The Prince of Persia
The Prince of Persia
Posts: 2846
Joined: December 11th, 2008, 9:48 pm
Location: Hungary

Re: Prince Of Persia.net written in C#

Post 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.
salvadorc17
Calif
Calif
Posts: 553
Joined: August 27th, 2011, 2:04 am

Re: Prince Of Persia.net written in C#

Post by salvadorc17 »

Then where do you get those sprites??? the mac source has all it???
David
The Prince of Persia
The Prince of Persia
Posts: 2846
Joined: December 11th, 2008, 9:48 pm
Location: Hungary

Re: Prince Of Persia.net written in C#

Post 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.
salvadorc17
Calif
Calif
Posts: 553
Joined: August 27th, 2011, 2:04 am

Re: Prince Of Persia.net written in C#

Post 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???
David
The Prince of Persia
The Prince of Persia
Posts: 2846
Joined: December 11th, 2008, 9:48 pm
Location: Hungary

Re: Prince Of Persia.net written in C#

Post 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
polipo
Vizier
Vizier
Posts: 89
Joined: September 6th, 2012, 8:34 am

Re: Prince Of Persia.net written in C#

Post 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.
salvadorc17
Calif
Calif
Posts: 553
Joined: August 27th, 2011, 2:04 am

Re: Prince Of Persia.net written in C#

Post by salvadorc17 »

That changes means plus new sprites??? you have uploaded all recently made to the source code???
polipo
Vizier
Vizier
Posts: 89
Joined: September 6th, 2012, 8:34 am

Re: Prince Of Persia.net written in C#

Post 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
David
The Prince of Persia
The Prince of Persia
Posts: 2846
Joined: December 11th, 2008, 9:48 pm
Location: Hungary

Re: Prince Of Persia.net written in C#

Post 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?
salvadorc17
Calif
Calif
Posts: 553
Joined: August 27th, 2011, 2:04 am

Re: Prince Of Persia.net written in C#

Post 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;
}
polipo
Vizier
Vizier
Posts: 89
Joined: September 6th, 2012, 8:34 am

Re: Prince Of Persia.net written in C#

Post by polipo »

David wrote: Do you mean the David's open-source port of PoP (pre-release) topic?
Yes
polipo
Vizier
Vizier
Posts: 89
Joined: September 6th, 2012, 8:34 am

Re: Prince Of Persia.net written in C#

Post 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
Post Reply