Prison Map Generation and Sharing System

(previously 'DEVELOPER') Private forum for registered community members. To register, please visit www.prison-architect.com/register.

Moderator: NBJeff

lukegb
level1
level1
Posts: 30
Joined: Tue Nov 22, 2011 11:26 pm

Prison Map Generation and Sharing System

Postby lukegb » Tue Oct 02, 2012 11:15 am

Hi!

I'm working on a website where users can share .prison files. As a key part of that, I'm implementing prison rendering, so you can see thumbnails of your prison.

Here's where I'm at so far:
Image
PA Screencap Take 1 by lukegb, on Flickr
User avatar
XmAkiNA
level2
level2
Posts: 80
Joined: Tue Aug 06, 2002 8:56 pm
Location: Oxford
Contact:

Postby XmAkiNA » Tue Oct 02, 2012 11:53 am

That's all kinds of awesome
zangdar86
level1
level1
Posts: 69
Joined: Thu Aug 30, 2012 8:08 am
Location: France

Postby zangdar86 » Tue Oct 02, 2012 11:58 am

Like your project ! Great idea !
amdavies
level1
level1
Posts: 10
Joined: Wed Sep 26, 2012 4:02 pm
Location: United Kingdom

Postby amdavies » Tue Oct 02, 2012 12:33 pm

that looks so much better than mine, which just assigns colours to a cell instead of applying the texture :)

although I have got my room labels sorted out. I've followed you on twitter (I'm @disjunto) if you want to collaborate at all
User avatar
frasercarter
level1
level1
Posts: 68
Joined: Mon Oct 01, 2012 1:04 pm
Location: Sydney, OZTRALIA MOITE

Postby frasercarter » Tue Oct 02, 2012 12:38 pm

nice man!, this will be great once finnished.. are you going to host it online? like a map database?
lukegb
level1
level1
Posts: 30
Joined: Tue Nov 22, 2011 11:26 pm

Postby lukegb » Tue Oct 02, 2012 12:39 pm

I've got objects to draw on top of the map, but I'm having issues with trying to figure out how Prison Architect stores rotational data in the savegame. Any ideas? :P

More screenshots soon, I hope.
User avatar
frasercarter
level1
level1
Posts: 68
Joined: Mon Oct 01, 2012 1:04 pm
Location: Sydney, OZTRALIA MOITE

Postby frasercarter » Tue Oct 02, 2012 12:43 pm

i wouldnt be fussed about objects, just room types and layout, most people like to redecorate their homes.


you know what i would really love.... an optional blueprint overlay or something so you can see your dimensions of your prison... actually i dont know.. maybe thats just a bit pointless :S
lukegb
level1
level1
Posts: 30
Joined: Tue Nov 22, 2011 11:26 pm

Postby lukegb » Tue Oct 02, 2012 12:54 pm

Since PA's definition of "objects" includes doors, it'd probably be quite helpful to render those too. Also trees, utilities and so on.

I plan to allow toggling layers, so you can choose what you see.
amdavies
level1
level1
Posts: 10
Joined: Wed Sep 26, 2012 4:02 pm
Location: United Kingdom

Postby amdavies » Tue Oct 02, 2012 1:17 pm

lukegb wrote:I've got objects to draw on top of the map, but I'm having issues with trying to figure out how Prison Architect stores rotational data in the savegame. Any ideas? :P

More screenshots soon, I hope.


I've not looked into the object orientation all that much yet (having a few issues with my parser and objects atm) but it seems that most objects have an Or.x and and Or.y value, which would appear to be an orientation. Although some items (doors & lights jump out right now) seem to have either a Walls.x or a Walls.y value, which appear to be either 1 or -1; which I believe is which wall it is attached to
User avatar
frasercarter
level1
level1
Posts: 68
Joined: Mon Oct 01, 2012 1:04 pm
Location: Sydney, OZTRALIA MOITE

Postby frasercarter » Tue Oct 02, 2012 1:30 pm

Just found this, somebody has already made one..


http://amdavies.com/dev/pa/index.php
amdavies
level1
level1
Posts: 10
Joined: Wed Sep 26, 2012 4:02 pm
Location: United Kingdom

Postby amdavies » Tue Oct 02, 2012 1:42 pm

frasercarter wrote:Just found this, somebody has already made one..


http://amdavies.com/dev/pa/index.php


that's my one ;) doesn't do anything interesting yet
lukegb
level1
level1
Posts: 30
Joined: Tue Nov 22, 2011 11:26 pm

Postby lukegb » Tue Oct 02, 2012 7:12 pm

More progress!

Image
Further Prison Architect Progress by lukegb, on Flickr

Prisoners are harder to render, so I think I'm not going to open that can of worms for the moment.

My Python code is in https://github.com/lukegb/PrisonArchitectFun

My parser is really, really slow. For my test prison file (which I found somewhere here in a bug report... eep!) it takes about 10 seconds to produce output. PIL then takes 10 seconds atop that to produce an image (because it's rendered at full size - if you scale it it takes less time)
lukegb
level1
level1
Posts: 30
Joined: Tue Nov 22, 2011 11:26 pm

Postby lukegb » Wed Oct 03, 2012 8:18 pm

Sorry for the double-post, but I think it's been long enough to justify it (and I sort-of want to ping anyone who has subscribed to this topic)

I've now started working on the website to host .prison save files (current working name is PrisonNET, looking for suggestions!), as I believe the image generator is now of enough use to be useful. If anyone has experience with Django/Python and wants to help, please contact me either here or, preferably, on Twitter, and I'll give you access to the GitHub repo.

My Twitter handle is @lukegb - just send me a follow request and I'll gladly accept.

Rock on!

NB: I plan to add room labelling support to the image generator at a later date. In addition, there is no lighting support. Lighting seems hard, and it's not really needed for my purposes.

Again, the GitHub repo for the image generator is: https://github.com/lukegb/PrisonArchitectFun
Wussie
level0
Posts: 2
Joined: Sat Sep 29, 2012 1:25 am
Location: Netherlands

Postby Wussie » Wed Oct 03, 2012 8:28 pm

excellent; I've started building something similar in C# that may evolve into a map editor at some point; but as some guy above here, just using colored squares for now.

Once I get some time to load up the PA data files for visualization I may look into integrating lighting; I'll post if I manage to get something useful out of it :)
lukegb
level1
level1
Posts: 30
Joined: Tue Nov 22, 2011 11:26 pm

Postby lukegb » Sat Oct 06, 2012 4:05 am

Here goes nothing (yes, it has a terrible name):

http://prisonnet.lukegb.com

First test version. Anyone have any comments?

EDIT: There's currently no link to the full size rendered image, only scaled down thumbnails. I will probably change this at some point.

Second thoughts, I'll make this a separate thread and keep this one for development discussions.

Return to “Community Members”

Who is online

Users browsing this forum: No registered users and 3 guests