Prince 2 xna editor in Chsarp

Discussions about all other tools (CusPop, SAV/HOF editors) and hex editing.
David
The Prince of Persia
The Prince of Persia
Posts: 2860
Joined: December 11th, 2008, 9:48 pm
Location: Hungary

Re: Prince 2 xna editor in Chsarp

Post by David »

salvadorc17 wrote: i used the tiles scaled to 64*74, second i decrease for each tile pos x-26, y-18
I figured out that this means you're using x-spacing = 64-26 = 38 and y-spacing = 74-18 = 56.
salvadorc17 wrote: What do you mean gap??
At the top and bottom of each row, where the floors meet:
gap.png
gap.png (2.99 KiB) Viewed 5435 times
Is your floor image based on Caverns-3525.png? (from here)
It seems to me that you removed some parts of it.
For example, the bottom right part; and maybe the bottom left part.
(left: original, right: your version)
floors.PNG
floors.PNG (3.73 KiB) Viewed 5435 times
salvadorc17 wrote: im exceding tiles number to 12, that can be easily fixed
You're drawing 11 tiles.
And you're drawing from right to left, but you need to draw from left to right.
salvadorc17
Calif
Calif
Posts: 553
Joined: August 27th, 2011, 2:04 am

Re: Prince 2 xna editor in Chsarp

Post by salvadorc17 »


I figured out that this means you're using x-spacing = 64-26 = 38 and y-spacing = 74-18 = 56.
Yes, that is correct, but i found that scaling tile cause missing texture definition and those "gaps" seems missing, now i will need to use real image size 128x148 to draw, and change the sdl surface to higher resolution:
And you're drawing from right to left, but you need to draw from left to right.
Left to right means this?

Code: Select all

for (short y=0; y>=2; y++) {


			for (short x=0; x>=10; x++) {

realXCV
Beylerbey
Beylerbey
Posts: 74
Joined: November 4th, 2011, 12:04 am
Location: Right here
Contact:

Re: Prince 2 xna editor in Chsarp

Post by realXCV »

salvadorc17 wrote: Left to right means this?

Code: Select all

for (short y=0; y>=2; y++) {


			for (short x=0; x>=10; x++) {

it means this:

Code: Select all

for (short y=2;y>=0;y--) {


			for (short x=0; x<10; x++) {

salvadorc17
Calif
Calif
Posts: 553
Joined: August 27th, 2011, 2:04 am

Re: Prince 2 xna editor in Chsarp

Post by salvadorc17 »

How to draw the sprites layer after the tiles?? also is possible to draw all level in same window with scaled tiles???
polipo
Vizier
Vizier
Posts: 89
Joined: September 6th, 2012, 8:34 am

Re: Prince 2 xna editor in Chsarp

Post by polipo »

What kind of technololgy you are using ?
Monogame ? if yes it depends only the draw order, first draw background after the sprites.
Monogame also have the depht in the draw method, but in my sample i have failed.
IIf you are using wpf you can create a WritableBitmap or Bitmap and apply to the canvas...
salvadorc17
Calif
Calif
Posts: 553
Joined: August 27th, 2011, 2:04 am

Re: Prince 2 xna editor in Chsarp

Post by salvadorc17 »

I want to use sdl for this editor to be able to run it into windows and linux, but right now im testing the methods on chsarp winforms....
polipo
Vizier
Vizier
Posts: 89
Joined: September 6th, 2012, 8:34 am

Re: Prince 2 xna editor in Chsarp

Post by polipo »

Dear dont use winform, choose wpf is more power full and interesting
salvadorc17
Calif
Calif
Posts: 553
Joined: August 27th, 2011, 2:04 am

Re: Prince 2 xna editor in Chsarp

Post by salvadorc17 »

Sorry but wpf uses c instad of csharp, i dont know how to program on it, by now ill use winforms and later chsarp tao.sdl. See a video preview of what i got so far, there are lots of things to fix/ implement.

polipo
Vizier
Vizier
Posts: 89
Joined: September 6th, 2012, 8:34 am

Re: Prince 2 xna editor in Chsarp

Post by polipo »

Yeah good job!!
very pretty editor and interesting PoP.net modifications.
I have done on PoP.net new kid action: failclimb, stepforward x step.
I would change the XML PoP level structure, for have a major readeable xml.
Could be a problem?

I will post an alert on this forum's thread : viewtopic.php?f=69&t=3180
when i refresh the sources

WPF is also for c#, but isnt a problem you can use winform for speedup implementations.
salvadorc17
Calif
Calif
Posts: 553
Joined: August 27th, 2011, 2:04 am

Re: Prince 2 xna editor in Chsarp

Post by salvadorc17 »

I have done on PoP.net new kid action: failclimb, stepforward x step.
I would change the XML PoP level structure, for have a major readeable xml.
Could be a problem?
Good, you want to finish the pop net implementation, i will also add those if necessary, and do you mean change the old level structure??? i think is not bad for the room, unless, for the best, trying to merge all rooms in the same level file and adding tileset definition...
polipo
Vizier
Vizier
Posts: 89
Joined: September 6th, 2012, 8:34 am

Re: Prince 2 xna editor in Chsarp

Post by polipo »

NeXT week i staring the implementation of new level schema
salvadorc17
Calif
Calif
Posts: 553
Joined: August 27th, 2011, 2:04 am

Re: Prince 2 xna editor in Chsarp

Post by salvadorc17 »

Ok, but will be better to implement some other stuff for the prince net like as you said, the other new kid action: failclimb, stepforward x step.... For the levels i neded to customize your version to my prefeer to load and save it easily...
polipo
Vizier
Vizier
Posts: 89
Joined: September 6th, 2012, 8:34 am

Re: Prince 2 xna editor in Chsarp

Post by polipo »

Salvadorc can you modify your editor for give me the possibility for build the first level.
This is the Final xml structure of the new PoP, this is the room 1 of the 1' level where the kid' stating.

===========================================
<?xml version="1.0" encoding="UTF-8"?>
<level name="dungeon_prison" description="bla" index ="1">

<room index="1">
<!-- first row-->
<block>
<sprite type="kid" direction="FlipHorizontally" skill="3" energy="3" color="000000"/>
<tile state="normal" type="space"/>
</block>
<block>
<tile state="normal" type="space"/>
</block>
<block>
<tile state="normal" type="space"/>
</block>
<block>
<tile state="brick" type="floor"/>
</block>
<block>
<tile state="normal" type="floor"/>
</block>
<block>
<tile state="brick" type="floor"/>
</block>
<block>
<tile state="normal" type="floor"/>
</block>
<block>
<tile state="brick" type="floor"/>
</block>
<block>
<tile state="normal" type="block"/>
</block>
<block>
<tile state="normal" type="block"/>
</block>
<!-- second row-->
<block>
<tile state="normal" type="torch"/>
</block>
<block>
<tile state="normal" type="torch"/>
</block>
<block>
<tile state="brick" type="floor"/>
</block>
<block>
<tile state="normal" type="posts"/>
</block>
<block>
<tile state="normal" type="space"/>
</block>
<block>
<tile state="normal" type="block"/>
</block>
<block>
<tile state="normal" type="block"/>
</block>
<block>
<tile state="normal" type="block"/>
</block>
<block>
<tile state="normal" type="block"/>
</block>
<block>
<tile state="normal" type="block"/>
</block>
<!-- third row -->
<block>
<tile state="normal" type="block"/>
</block>
<block>
<tile state="normal" type="block"/>
</block>
<block>
<tile state="normal" type="block"/>
</block>
<block>
<tile state="normal" type="block"/>
</block>
<block>
<tile state="rubble" type="floor"/>
</block>
<block>
<tile state="normal" type="posts"/>
</block>
<block>
<tile state="normal" type="loose"/>
</block>
<block>
<tile state="brick" type="floor"/>
</block>
<block>
<tile state="normal" type="floor"/>
</block>
<block>
<tile state="normal" type="block"/>
</block>



<links down="2" up="0" right="0" left="5"/>
</room>

</level>

======================================================================
salvadorc17
Calif
Calif
Posts: 553
Joined: August 27th, 2011, 2:04 am

Re: Prince 2 xna editor in Chsarp

Post by salvadorc17 »

Not possible right now, im little bussy with other stuff and also dont understand the new xml structure for the parameters into xml elements..
Post Reply