Jump to content

Parsing a .pdn


Recommended Posts

Hi Everyone,

 

I am an indie game developer working on a 2D game for my thesis, which will require a custom engine. I really enjoy Paint.NET, so I wanted to know if there was a way I could use it as a kind of world layout tool. I want to use layers to create a level of the game world in Paint.NET, then access the .pdn to parse the file into something my game can later load at run-time.

 

In short, is there a way for me to parse a .pdn file to find out image and layer information? If so, what information would I find available?

 

I am using Python (but can use C) if that matters.

 

Thanks!

~Lucas

Link to comment
Share on other sites

I hate to disappoint, but I don't see that happening. I could be wrong. You may want to wait to hear it from the horse's mouth.

 

As far as I know....When Rick created the .pdn, he didn't reinvent the wheel. He simple let the .Net Framework handle certain things. I think it's very unlikely that you'll be able to reverse-engineer it, without also reverse-engineering parts of .Net  (or using Mono as a dependency). Even third-party .pdn viewers, like IrfanView, are only able to read the embedded png preview and not the different layers.

 

It's been years since I listened to this, but from what I remember, Rick goes into some of the minor details of the .pdn format.... http://www.dotnetrocks.com/default.aspx?showNum=229

 

Hope that helps.

 

TL;DR... Make your life easier and use a different format for your game.

(September 25th, 2023)  Sorry about any broken images in my posts. I am aware of the issue.

bp-sig.png
My Gallery  |  My Plugin Pack

Layman's Guide to CodeLab

Link to comment
Share on other sites

Even third-party .pdn viewers, like IrfanView, are only able to read the embedded png preview and not the different layers.

 

You are wrong. The Irfanview plugin can read and show all individual layers and create the composite image in full resolution with alpha channel.

 

You are right. The Irfanview plugin uses an embedded deserializer (written in C) to extract layer and metadata informations.

midoras signature.gif

Link to comment
Share on other sites

You are wrong. The Irfanview plugin can read and show all individual layers and create the composite image in full resolution with alpha channel.

 

Well what do you know. I stand corrected. I didn't remember it being able to show individual layers. I haven't used it in a number of years ;)

(September 25th, 2023)  Sorry about any broken images in my posts. I am aware of the issue.

bp-sig.png
My Gallery  |  My Plugin Pack

Layman's Guide to CodeLab

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...