Castle Paradox Forum Index Castle Paradox

 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 Gamelist   Review List   Song List   All Journals   Site Stats   Search Gamelist   IRC Chat Room

Import From External Map Editor?

 
Post new topic   Reply to topic    Castle Paradox Forum Index -> HELP!
View previous topic :: View next topic  
Author Message
NayusDante




Joined: 18 Jul 2010
Posts: 15

PostPosted: Sun Jul 18, 2010 2:53 pm    Post subject: Import From External Map Editor? Reply with quote

Is it possible or documented how to use an external editor? I prefer working in TileStudio, or even Mappy, and can export binary or user-defined XML from those.
Back to top
View user's profile Send private message Send e-mail AIM Address MSN Messenger
NeoSpade
Of course!




Joined: 23 Sep 2008
Posts: 249
Location: Wales GB

PostPosted: Sun Jul 18, 2010 4:20 pm    Post subject: Reply with quote

Provided that you save/can save the tiles as a 320x200 BMP image, and the tiles are 20x20 then you can import the tile set into custom by selecting import/export full map-tile sets from the edit graphics menu.

I also recommend that you only use colours from one of the default palettes (or whatever palette you're using in your game) so that the colours don't shift when you import the BMP.
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
NayusDante




Joined: 18 Jul 2010
Posts: 15

PostPosted: Sun Jul 18, 2010 7:28 pm    Post subject: Reply with quote

I'm not talking about tiles, I'm talking about map data.
Back to top
View user's profile Send private message Send e-mail AIM Address MSN Messenger
Aussie Evil




Joined: 28 Apr 2009
Posts: 27

PostPosted: Sun Jul 18, 2010 10:20 pm    Post subject: Reply with quote

Currently I do not think it is possible.
_________________

and you, sir, are no lady
Back to top
View user's profile Send private message
TMC
On the Verge of Insanity




Joined: 05 Apr 2003
Posts: 3240
Location: Matakana

PostPosted: Mon Jul 19, 2010 6:51 am    Post subject: Reply with quote

Neat! I'll try implementing map import from Tile Studio tomorrow. I haven't looked at how Mappy does export, maybe that would also be worth doing.

I think James has said that the map editor is the old surviving part of the OHR, about 14-15 years old. I've often thought wishfully about throwing it out and replacing it with a nice open source map editor, but that's not really possible currently.
_________________
"It is so great it is insanely great."
Back to top
View user's profile Send private message Send e-mail
NayusDante




Joined: 18 Jul 2010
Posts: 15

PostPosted: Mon Jul 19, 2010 9:33 am    Post subject: Reply with quote

I'm seeing that we can extract the files in a *.rpg, and as long as the maps are self-contained files, I'm sure it's possible.

If there's a reference for the map file format, it's just a matter of either exporting in binary or writing a Tile Studio Definition file for the output.
Back to top
View user's profile Send private message Send e-mail AIM Address MSN Messenger
NayusDante




Joined: 18 Jul 2010
Posts: 15

PostPosted: Wed Jul 21, 2010 4:33 am    Post subject: Reply with quote

I can put a binary map file in the *.T## file, but I can't get the dimensions to go right. It keeps thinking my map is 257x257, but it's definitely getting the right tile data. Any ideas?
Back to top
View user's profile Send private message Send e-mail AIM Address MSN Messenger
TMC
On the Verge of Insanity




Joined: 05 Apr 2003
Posts: 3240
Location: Matakana

PostPosted: Wed Jul 21, 2010 5:28 am    Post subject: Reply with quote

EDIT: Oh, you replied while I was posting. I'm adding an option to Custom to safely import a tilemap file, but if you can't be bothered waiting for it, you can do it by hand as you apparently already are. Just make sure to resize the map to the same dimensions and 3 layers before replacing the 'T' file with the file generated by the .TSD below. (Yes, there appears to be some kind of bug in reporting a bad map size if there's a problem.) Also, completely leave the map menu before replacing the file. END EDIT.


Well, I'll get the new map import/export map menu into the next nightly (might be the one after that, depending on timezones), but thought I should post this quote from the .tsd I wrote (EDIT: replaced with whole file), in case you think about starting on maps early:

Code:
; --------------------------------------------------------
; Tile Studio Definition file for OHRRPGCE maps
; Supports Tile Studio 3.0 only (2.55 does not support binary files)
; See http://tilestudio.sourceforge.net/
;
; Place this .tsd file either in your project directory, or in the
; Tile Studio directory.
;
; You can only create maps with a single tileset. A TS map is exported
; as a 3 layer OHR map (delete any layers you don't want after import).
; Tile rotations, 'Map Codes', and wallmaps/"bounds" are ignored, and tile
; animations are not supported.
; You can create as many maps as you want, with various tilesets,
; just make sure to name each map something different.
;
; Tile Studio has bugs and limitations, to avoid having to scrub your map
; of garbage files after importing it, follow these instructions carefully
; if you want to use more than one layer:
; - tile 0 of your tileset should be completely filled with colour zero
;   (which is normally black)
; - While importing your tileset into TS, click on a patch of colour zero
;   to make that the transparent colour
; - Create a new map, select the Block Fill tool, and set the back, mid,
;   and front tiles to tile 0, then fill the map with it (you won't see
;   any difference). Otherwise "empty" tiles will be filled with garbage
;   when exported.
;
; --------------------------------------------------------

#tileset
#map ""
#binfile <ProjectName>_<MapIdentifier>.tmap 8

<0><0><0><0><0><0><0>
<MapWidth:"16">
<MapHeight:"16">

#mapdata
<TSBackTile>
#end mapdata

#mapdata
<TSMidTile>
#end mapdata

#mapdata
<TSFrontTile>
#end mapdata

#end binfile
#end map
#end tileset

_________________
"It is so great it is insanely great."
Back to top
View user's profile Send private message Send e-mail
NayusDante




Joined: 18 Jul 2010
Posts: 15

PostPosted: Wed Jul 21, 2010 4:03 pm    Post subject: Reply with quote

Awesome! This is exactly what I needed. I've always wanted to do something in OHR but I've never been able to do large-scale design in that little window, so this helps tremendously.

One thing that I noticed while messing around was that OHR didn't seem to mind those huge glitched maps. Theoretically, could I do a 256x256 map this way, or would it create issues?
Back to top
View user's profile Send private message Send e-mail AIM Address MSN Messenger
TMC
On the Verge of Insanity




Joined: 05 Apr 2003
Posts: 3240
Location: Matakana

PostPosted: Fri Jul 23, 2010 4:09 am    Post subject: Reply with quote

NayusDante wrote:
Awesome! This is exactly what I needed. I've always wanted to do something in OHR but I've never been able to do large-scale design in that little window, so this helps tremendously.


Yes, it's a bit painful. I'm pretty close to experimentally allowing the map editor to run at a higher resolution. There are other things to be fixed, like added mouse support to it.

NayusDante wrote:
One thing that I noticed while messing around was that OHR didn't seem to mind those huge glitched maps. Theoretically, could I do a 256x256 map this way, or would it create issues?


Actually, the maximum size of a map is currently capped at 32,000 tiles, but that's just a relic from memory limitations in the old DOS version. I'll increase the cap to something higher (I think having some cap is still a good idea, to discourage wasting memory on needlessly large maps, which could be a problem if we want to port to handheld devices)
_________________
"It is so great it is insanely great."
Back to top
View user's profile Send private message Send e-mail
Moogle1
Scourge of the Seas
Halloween 2006 Creativity Winner
Halloween 2006 Creativity Winner



Joined: 15 Jul 2004
Posts: 3377
Location: Seattle, WA

PostPosted: Fri Jul 23, 2010 10:18 am    Post subject: Reply with quote

The Mad Cacti wrote:
Actually, the maximum size of a map is currently capped at 32,000 tiles, but that's just a relic from memory limitations in the old DOS version. I'll increase the cap to something higher (I think having some cap is still a good idea, to discourage wasting memory on needlessly large maps, which could be a problem if we want to port to handheld devices)


Not to mention performance issues on really large maps. This may also be a relic of times past, but I remember the town map on Scary Game 2 being a prime offender - a combination of very large map and full NPC load. I haven't played it recently, so I don't know if recent engine improvements have made this a non-issue, but presumably it would become an issue again anyway if the NPC and map caps were both raised to ridiculous levels.
_________________
Back to top
View user's profile Send private message Visit poster's website AIM Address
NayusDante




Joined: 18 Jul 2010
Posts: 15

PostPosted: Fri Jul 23, 2010 2:39 pm    Post subject: Reply with quote

You bring up portable devices... What are the chances of seeing a full-on Android port? iOS has that Square Enix exclusive, so I'm extremely interested in seeing some RPG love on Android.
_________________
Back to top
View user's profile Send private message Send e-mail AIM Address MSN Messenger
TMC
On the Verge of Insanity




Joined: 05 Apr 2003
Posts: 3240
Location: Matakana

PostPosted: Wed Jul 28, 2010 9:54 am    Post subject: Reply with quote

Moogle1 wrote:
Not to mention performance issues on really large maps. This may also be a relic of times past, but I remember the town map on Scary Game 2 being a prime offender - a combination of very large map and full NPC load. I haven't played it recently, so I don't know if recent engine improvements have made this a non-issue, but presumably it would become an issue again anyway if the NPC and map caps were both raised to ridiculous levels.


I assume you are talking about DOS versions of the OHR. For some reason they ran really slowly under virtual x86 mode, and when the OHR was ported to FB/Windows I noticed an immediate speedup of something like 10x in places including graphics drawing. Despite going from hand-optimised assembly to FB code written with zero regard for speed, compiled by a completely non-optimising compiler.

Theoretically, the map size should have no impact on speed at all other than larger wallmaps requiring more CPU cache.

I decided on 100,000 tiles. Maybe it should be higher, but it's trivial to raise.

NayusDante wrote:
You bring up portable devices... What are the chances of seeing a full-on Android port? iOS has that Square Enix exclusive, so I'm extremely interested in seeing some RPG love on Android.


Definitely. It's in the plans, but it depends on the compiler for the language we're using, FreeBASIC. They are working on rewriting part of it to make it portable.
_________________
"It is so great it is insanely great."
Back to top
View user's profile Send private message Send e-mail
chronoboy
Into the past with a splash




Joined: 04 Jun 2010
Posts: 162
Location: Canada

PostPosted: Wed Oct 13, 2010 10:35 am    Post subject: Reply with quote

A simple map exporter program could be written that simply writes out many write map block that could be placed in an HSI file to used on a map autorun script to display an import map from an unsupported map editor. It may also be-able to create NPCs as well, as plotscript has commands for just about everything these days.

Although, for a map completely created by a huge script, I could see some performance issues when loading a really large map. However, after seeing some interesting rouge clones made for OHR which generate random dungeons, this may not be such a problem.

Another idea would be to write a seperate plotscript engine for automating CUSTOM.EXE tasks, a plotscript engine build into CUSTOM.EXE as a batch file type system, IE, generating maps and randomizing trees and various textures to speed up runtime during gameplay.
_________________
Current project: Chronoboy Adventures

Website: http://www.chronoboy.com/
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Castle Paradox Forum Index -> HELP! All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group