Custom prince editor (Monogame version)

Discuss other PoP1 related things here.
Post Reply
salvadorc17
Calif
Calif
Posts: 553
Joined: August 27th, 2011, 2:04 am

Custom prince editor (Monogame version)

Post by salvadorc17 »

Hey, i just working on an editor for the Monogame version of Prince, i have achieved some basic stuff like loading rooms (tiles are not sketched up) but the desing is pretty for the idea of editing the rooms..

Image

Suggestions for improvement??

Download link for test it: http://www.mediafire.com/download/hpio6 ... Editor.rar
David
The Prince of Persia
The Prince of Persia
Posts: 2846
Joined: December 11th, 2008, 9:48 pm
Location: Hungary

Re: Custom prince editor (Monogame version)

Post by David »

salvadorc17 wrote:Suggestions for improvement??
Crash/exception:
  • When I put a guard at the same place multiple times, his sword becomes more and more white. As if there were multiple guards drawn on top of each other.
    • After I put the guard 61 times, I get an unhandled exception:

      Code: Select all

      System.IndexOutOfRangeException: Index was outside the bounds of the array.
    • The same happens if I reload a room with a guard. For example load "guards.xml" and click "Start Room" many times.
  • Open a level, but don't select a room. Click File -> Save:

    Code: Select all

    System.ArgumentException: Requested value 'none' was not found.
Something does not work:
  • When I change room, the editor forgets all edits. Unless I saved before.
  • If I want to put a closed gate or exit left/right, then the editor puts space instead.
    • Except if I want to put an exit where there is already an exit.
  • If I put a potion/sword, the floor disappears under it.
  • If I put a kid/guard, the tile under him becomes a floor.
  • If I put a guard, the kid can disappear. Only if the kid is already there after opening the level.
  • File -> New: Only the room is cleared. If I press a Room button, the previous level appears again.
Smaller problems:
  • The tiles should overlap each other, as in the game.
  • When I open a level, the starting room should appear automatically.
  • File -> Load: Numbers (0-25) are added to the "Room Index" list even if they are already there.
    • This fixes itself when I open a level from the Level Editor page.
    • You should fill the list only once, when the editor starts.
  • The arrangement of the Left/Right/Up/Down Room buttons is a bit confusing.
  • When I change room, the editor switches to Space.
  • The selected tile (on the right) should be highlighted.
  • The textboxes should be read-only, unless writing into them does something.
salvadorc17
Calif
Calif
Posts: 553
Joined: August 27th, 2011, 2:04 am

Re: Custom prince editor (Monogame version)

Post by salvadorc17 »

David wrote: Crash/exception:
  • When I put a guard at the same place multiple times, his sword becomes more and more white. As if there were multiple guards drawn on top of each other.
    • After I put the guard 61 times, I get an unhandled exception:

      Code: Select all

      System.IndexOutOfRangeException: Index was outside the bounds of the array.
    • The same happens if I reload a room with a guard. For example load "guards.xml" and click "Start Room" many times.
  • Open a level, but don't select a room. Click File -> Save:

    Code: Select all

    System.ArgumentException: Requested value 'none' was not found.
Thanks for your time testing this David, btw why you want to add guard multiple times to same tile, and why to up 61 guards?? Ill fix this crash becuase they are priority, for the bugs, ill take time to do further testing...
David
The Prince of Persia
The Prince of Persia
Posts: 2846
Joined: December 11th, 2008, 9:48 pm
Location: Hungary

Re: Custom prince editor (Monogame version)

Post by David »

salvadorc17 wrote: btw why you want to add guard multiple times to same tile,
Just for testing. Anyway, it crashes even if I choose a different tile every time.
salvadorc17 wrote: and why to up 61 guards??
I tested it again and now it's 31. Maybe I was clicking too fast the first time.
You probably used an array of size 30 somewhere and it's overflowing.
salvadorc17
Calif
Calif
Posts: 553
Joined: August 27th, 2011, 2:04 am

Re: Custom prince editor (Monogame version)

Post by salvadorc17 »

David wrote: Just for testing. Anyway, it crashes even if I choose a different tile every time.

I tested it again and now it's 31. Maybe I was clicking too fast the first time.
You probably used an array of size 30 somewhere and it's overflowing.
Yes, i have checked the code and made some fixes, also im trying to overlap tiles to get better graphic level layout, the real problem is that for the editor, the real tiles coordinate does not fit with the mouse coordinates.
David
The Prince of Persia
The Prince of Persia
Posts: 2846
Joined: December 11th, 2008, 9:48 pm
Location: Hungary

Re: Custom prince editor (Monogame version)

Post by David »

I see you uploaded the source here: https://github.com/salvadorc17/Prince-Monogame (PrinceEditor folder)
salvadorc17
Calif
Calif
Posts: 553
Joined: August 27th, 2011, 2:04 am

Re: Custom prince editor (Monogame version)

Post by salvadorc17 »

Yes, youre right, do you know Csharp?? maybe you can help me with this...
salvadorc17
Calif
Calif
Posts: 553
Joined: August 27th, 2011, 2:04 am

Re: Custom prince editor (Monogame version)

Post by salvadorc17 »

David wrote:I see you uploaded the source here: https://github.com/salvadorc17/Prince-Monogame (PrinceEditor folder)
Image
I have uploaded a updated version to source code and precompiled, also updated image with new features:

-Fixed most all bugs, tiles still do not overlay.
-Added flip for sprites.
-Added level and room menu options.

-TODO list:

-Room copy and paste.
-Level save (for rooms order)

Download: http://www.mediafire.com/download/hpio6 ... Editor.rar
salvadorc17
Calif
Calif
Posts: 553
Joined: August 27th, 2011, 2:04 am

Re: Custom prince editor (Monogame version)

Post by salvadorc17 »

Continue with development of this editor, if anyone interested accept suggestions.

-Done copy and paste room.

-TODO List:

-Level save and room export.

https://github.com/salvadorc17/Prince-M ... inceEditor
salvadorc17
Calif
Calif
Posts: 553
Joined: August 27th, 2011, 2:04 am

Re: Custom prince editor (Monogame version)

Post by salvadorc17 »

David wrote:I see you uploaded the source here: https://github.com/salvadorc17/Prince-Monogame (PrinceEditor folder)
David, are you still interested in testing this? also want some help, about know how should change room connections into the xml format..
Post Reply