Prince Of Persia.net written in C#

Threads about other remakes and ports.

Moderator: English Moderator Team

Post Reply
salvadorc17
Calif
Calif
Posts: 521
Joined: August 27th, 2011, 2:04 am

Re: Prince Of Persia.net written in C#

Post by salvadorc17 » September 12th, 2014, 12:38 am

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 » September 12th, 2014, 8:49 am

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 » September 12th, 2014, 9:01 am

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: 1463
Joined: December 11th, 2008, 9:48 pm
Location: Hungary

Re: Prince Of Persia.net written in C#

Post by David » September 12th, 2014, 9:26 am

(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: 521
Joined: August 27th, 2011, 2:04 am

Re: Prince Of Persia.net written in C#

Post by salvadorc17 » September 13th, 2014, 2:29 am

Then where do you get those sprites??? the mac source has all it???

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

Re: Prince Of Persia.net written in C#

Post by David » September 13th, 2014, 10:44 am

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: 521
Joined: August 27th, 2011, 2:04 am

Re: Prince Of Persia.net written in C#

Post by salvadorc17 » September 14th, 2014, 12:36 am


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: 1463
Joined: December 11th, 2008, 9:48 pm
Location: Hungary

Re: Prince Of Persia.net written in C#

Post by David » September 14th, 2014, 10:28 am

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 » September 15th, 2014, 10:08 am

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: 521
Joined: August 27th, 2011, 2:04 am

Re: Prince Of Persia.net written in C#

Post by salvadorc17 » September 16th, 2014, 12:35 am

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 » September 16th, 2014, 9:14 am

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: 1463
Joined: December 11th, 2008, 9:48 pm
Location: Hungary

Re: Prince Of Persia.net written in C#

Post by David » September 16th, 2014, 11:52 am

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: 521
Joined: August 27th, 2011, 2:04 am

Re: Prince Of Persia.net written in C#

Post by salvadorc17 » September 16th, 2014, 11:45 pm

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 » September 17th, 2014, 8:24 am

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 » September 17th, 2014, 8:44 am

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