spacer graphic
spacer graphic
Montage of games AGS Logo
spacer graphic

Welcome, Guest. Please login or register.
09 Feb 2010, 19:35

Voting is now open in the AGS Awards 2009!
Play the games that have been nominated, and then
vote for your favourites in each category!

Home | Help | Search | Games | Wiki | Login | Register


AGS Forums  |  Using AGS  |  Technical Forum (Moderators: Gilbet V7000a, Scorpiorus, strazer)  |  Topic: Export Room to XML? « previous next »
Pages: [1] 2 3 Print
Author Topic: Export Room to XML?  (Read 1843 times)
clarvalon
Member


# Makka Pakka, Akka Wakka, Mikka Makka Moo.


« on: 15 Apr 2009, 14:49 »

I've searched the forums and not been able to find anything to suggest this is possible, but thought it worth asking anyway - is there any way of using the AGS Editor to export a room (*.crm) to XML?  I notice that the main game content in the .agf file is XML, but the rooms are not.

The reason being is that I'm writing a tool to convert AGS projects to XAGE, to help reduce the amount of effort required in porting a completed AGS game to the Xbox360 (a quick video of Demo Quest 3-1 running in XAGE can be found: here).  Without the room information the automated conversion can only go so far.
Logged

XAGE - Xna Adventure Game Engine (Twitsqueak) - Convert AGS projects to the Xbox360 & Web (still very much in alpha)
GarageGothic
Member


Play-testing: Several years of testing experience at EAScripting: Custom GUI coding and visual effects.Story design: Dramatic structure, I'm your man.

« Reply #1 on: 15 Apr 2009, 15:04 »

Wow, that's some damn impressive work, clarvalon. I personally see much more potential in your converter than in the recent discussion about a Nintendo DS or Wii compatible AGS version. You say that structural differences prevent a perfect automatic conversion, what areas in particular does this relate to? Is it just the art that needs to be exported manually, or does it limit any AGS script functions?

Unfortunately I can't answer your question, but keep up the good work, and please keep us posted!  Larry Values!!11
Logged
clarvalon
Member


# Makka Pakka, Akka Wakka, Mikka Makka Moo.


« Reply #2 on: 15 Apr 2009, 16:18 »

Thanks.  I've not spent a huge amount of time with AGS, but the main differences are to do with scripting.  AGS seems extremely versatile - the fact that people have made wolfenstein 3d clones, platformers et al is very impressive.  XAGE on the other hand is a lot less mature and much more focused on creating SCUMM-type games (for now), with the scripting limited to a small set of actions.  Simplicity vs Versatility.  Features of AGS will therefore not necessarily map to XAGE, and will have to be implemented by other means.

Converting the art assets is all handled automatically and is reasonably pain-free, thanks to AGS Editor's handy sprite export functionality.  There's a small problem in that 8bit sprites seem to be exported as 32bit, so the palette information is lost (hence why Cris has no hair in the video).  This shouldn't be an issue if people point XAGE to their original 8bit bitmaps.

Walkable areas in AGS are harder to port over automatically as XAGE uses geometric walkboxes rather than a mask.  This may be moot though, as this information is presumably stored in the aforementioned room.crm files which I can't get my mits on.
Logged

XAGE - Xna Adventure Game Engine (Twitsqueak) - Convert AGS projects to the Xbox360 & Web (still very much in alpha)
Dualnames
Member


This is ... my.. BOOMSTICK!


« Reply #3 on: 15 Apr 2009, 17:14 »

To ask of this slowly..can I complete a game and make it available for Xbox360?
Logged

Pumaman
Mittician
Administrator

Member


I sense danger.


« Reply #4 on: 15 Apr 2009, 18:26 »

Room data is stored in a proprietary binary file format, mainly because it includes a lot of graphics data which wouldn't be efficiently stored as XML.

It's something that I may change at some point, but there's no strong reason to do it at the moment.

And yes, that's some impressive initial work with your converter Smiley
Logged
clarvalon
Member


# Makka Pakka, Akka Wakka, Mikka Makka Moo.


« Reply #5 on: 15 Apr 2009, 18:48 »

DN:  No, not yet.  XAGE is still incomplete - the two main missing parts are Dialogue Trees and GUI customisation, both of which I've been putting off until I've fully thought through the design.  But what currently works in Windows also deploys and runs fine on the 360.  Linux/Mac support is MUCH flakier at the moment, but this is a lower priority (and dependant on third party technologies - Silverlight & Silversprite).

The AGS conversion is, at this stage, mostly superficial.  The basic game structure is ported (rooms, characters and associated textures) over but not a whole lot else. 

CJ:  Cheers - having the .crm data in XML would undoubtedly be extremely useful, but there's still plenty for me to get my teeth into.  Maybe when XAGE and the conversion is more mature I'll be able to put forward a stronger case for its inclusion. 
Logged

XAGE - Xna Adventure Game Engine (Twitsqueak) - Convert AGS projects to the Xbox360 & Web (still very much in alpha)
Dualnames
Member


This is ... my.. BOOMSTICK!


« Reply #6 on: 15 Apr 2009, 20:49 »

Oh, so it's mostly the effort of doing it as far as it is. Man I really hope you finish it..
Logged

Monsieur OUXX
Member


Spice is some sort of eatable money


« Reply #7 on: 21 Apr 2009, 11:57 »

Maybe I'm missing something, but wouldn't it be possible to create an AGS module that would act as a converter? (add the module to the game, run the game, the loads all its ressources , and the module saves everything into files)
What about the scripts? Are they still saved in the "rooms" files?
Logged

Gilbet V7000a
Moderator
Member


* KILL* * KILL * * KILL *


« Reply #8 on: 21 Apr 2009, 13:25 »

No, it's not possible, and even if it's possible, it's not practical.

What you can do in a module is just what you can do in AGS text scripting.
Logged


I'm not a Christian!!! Don't ask me about GOD!
Monsieur OUXX
Member


Spice is some sort of eatable money


« Reply #9 on: 21 Apr 2009, 14:49 »

No, it's not possible, and even if it's possible, it's not practical.

What you can do in a module is just what you can do in AGS text scripting.

Yes, but what data exists in the room that is not accessible in the text scripting?
I said "module", but I might as well have said "plugin". My whole point is : if the structure of the files is not known, what prevents the developer to load the data using the available official tools and then save it in his own file format?
Logged

subspark
Member


I have the wisdom of a much younger man.

Play-testing: This reflects my experience as a professional. Need a hand? Sure!Voice acting: This reflects my experience as a professional. Need a hand? Sure!Music: This reflects my experience as a professional. Need a hand? Sure!Backgrounds: This reflects my experience as a professional. Need a hand? Sure!Character art: This reflects my experience as a professional. Need a hand? Sure!Animation: This reflects my experience as a professional. Need a hand? Sure!
Proof reading: This reflects my experience as a professional. Need a hand? Sure!Story design: This reflects my experience as a professional. Need a hand? Sure!Translating: This reflects my experience as a professional. Need a hand? Sure!

« Reply #10 on: 22 Apr 2009, 08:27 »

Wow great timing clarvalon! It's about time AGS covered other platforms.

I ask the same question as OUXX. Wouldn't it be easy to write a plugin for AGS that bridges the gap in the conversion process?

Cheers,
Sparky.
Logged


Tarnish your shoes if there is to be a peace between us!
monkey_05_06
Member


With 90-somethin' percent accuracy!

AGS tutoring (no further info specified)Play-testing (no further info specified)Voice acting (no further info specified)Proof reading (no further info specified)Scripting (no further info specified)Story design (no further info specified)
Web design (no further info specified)

« Reply #11 on: 22 Apr 2009, 09:13 »

Room data is stored in a proprietary binary file format

To answer OUXX and subspark, in short this means no.

The data is saved in a proprietary format. That means the only way to access the data would be to either load the AGS Editor or run the game itself and load the data via the AGS engine.

It would then be a timely and (system resource) costly operation to perform any type of conversion (having to save all room data from backgrounds, walkable areas, walkbehinds, objects, regions, hotspots, etc. to external files) and in the event that even the slightest change is made to the room, the entire process would have to be repeated.

The way it stands clarvalon is reading the primary game data directly from the available plaintext files (such as Game.agf which is written in XML). This means that it can interpret the data directly, any changes would be automatically handled.

Since the rooms are saved to a proprietary format it's simply not reasonable to have to go through every room and export the data (especially in games with high numbers of rooms!).

Unfortunately at this point the best solution here would simply be for clarvalon to work around it, and if/when the time comes, he can negotiate rights with CJ to try and write some type of interpreter for the CRM files.

Great job so far by the way clarvalon, it's looking very impressive and I definitely wish you the best of luck. AGS games on the Xbox 360 would be one of the best possible things to ever happen in the history of mankind. Larry Values!!11
Logged

I'm not trolling, I'm unemployed. There's a difference.
Stee
Member


Play-testing: Experience in Playtesting Sim Games such as Rock N Roll (http://gecko-games.cjb.net and Game Biz http://veloci.dk/forumid=14 (as 99cs0802)Music: I have a collection of old midis from a number of years.Proof reading: Can fix sketchy translation to English and spelling. Top grade English StudentStory design: Not a whole story but ideas. Very creativeWeb design: Just mail me, i can do  a basic site.Translating: Basic GCSE Spanish, Latin and Excellent English

« Reply #12 on: 22 Apr 2009, 10:44 »

 Shocked

This is brilliant! I've tinkered with XNA a little bit as part of a course I was doing. Its good to see people starting to develop useful tools with it. Its a shame M$ are so arsey about publish XBLA stuff. I guess the solution would be that everyone would have to invest in a CC subscription to run on 360, which isn't a terrible thing.

Good Luck!
Logged

AGSN is now IndieGamingSource        

visit http://indiegamesource.net


Help wanted
clarvalon
Member


# Makka Pakka, Akka Wakka, Mikka Makka Moo.


« Reply #13 on: 22 Apr 2009, 13:16 »

Many thanks the positive comments.  As a result of the interest, I'm continuing to work on the AGS -> XAGE project conversion.  I've started work on a simple parser to pull out the basic information from the scripts associated with the dialogue options, so hopefully I'll have something new to show in the next week or two.

Due to my general lack of knowledge of AGS, I'm not sure whether exporting the room information in-game is viable.  Likewise, interpreting the .crm file seems like the long way around.  Having the room information in XML format would be ideal - if AGS stores rooms as individual objects then it should be trivial to serialize it, minus the textures, via the editor into XML.   Whether CJ ever implements this however is completely his prerogative - I certainly won't gripe if it never happens.
Logged

XAGE - Xna Adventure Game Engine (Twitsqueak) - Convert AGS projects to the Xbox360 & Web (still very much in alpha)
Trent R
Member


"I am the weapon" -Richard Cypher

AGS tutoring: Very good with scripting, I can tutor you through beginner and semi-advance questions.Scripting: I have used multiple languages, and have picked up AGS scripting very easily and very fast.

« Reply #14 on: 23 Apr 2009, 18:33 »

I don't see how making an XAGE room editor would be so hard? Granted, if you had tons of rooms it'd be a pain to go through and recreate each of them, but I'm gonna guess that games like that will have scripted features that XAGE (at this point at least) would be unable to replicate.

I don't mean to put XAGE down at all with this post, rather the contrary, I would love to port AGS games to the Zune Smiley (not an Xbox fan)


~Trent
Logged

To give back to the AGS community, I can get you free, full versions of commercial software. Recently, Paint Shop Pro X, and eXPert PDF Pro 6. Please PM me for details.

Current Project: The Wanderer
On Hold: Hero of the Rune
clarvalon
Member


# Makka Pakka, Akka Wakka, Mikka Makka Moo.


« Reply #15 on: 23 Apr 2009, 19:38 »

Essentially XAGE already is one big room editor, as that is how it is structured internally.  You can already do all the important things - create room objects, walkable areas, create scripts etc. 

The reason for requesting the room XML is to minimise duplication of effort.  Anything that can be automated should be automated.  The rest is down to the game's developer to work around, re-engineer or drop as they see fit.
Logged

XAGE - Xna Adventure Game Engine (Twitsqueak) - Convert AGS projects to the Xbox360 & Web (still very much in alpha)
clarvalon
Member


# Makka Pakka, Akka Wakka, Mikka Makka Moo.


« Reply #16 on: 08 Oct 2009, 23:51 »

I've been making some further progress on the AGS to XAGE converter.  Ben304 very generously sent me a copy of the source to his latest game, Awakener.  It has helped me iron out a lot of issues and also has proven to be a prime candidate for conversion for three reasons: 
  1)  The code is simple, clean and doesn't rely on modules.
  2)  It is light on GUIs.
  3)  It is predominately character driven, as opposed to room object-driven (as previously mentioned in the thread, XAGE is currently incapable of of accessing most room and object data due to the custom *.crm file format).

Youtube video:  Awakener running on the Xbox360.

There are various things yet to do and work on the converter is ongoing, but it is possible to recreate the above from scratch in around about thirty minutes:
  1)  Some minor pre-preparation (exporting sprites to specific folders, manually converting audio etc.) - approx 20 minutes.
  2)  Automatic AGS to XAGE conversion - approx 3 minutes.
  3)  Five manual changes to the XAGE version of the game - approx 5 minutes.

The five manual changes required to get Awakener running: (& reason why)
  1)  Change Fadi's starting room (unable to use intro screen as it uses objects - *.crm)
  2)  Add action to invoke room_Load (unable to get room events from *.crm)
  3)  Add action to invoke room_AfterFadeIn (unable to get room events from *.crm)
  4)  Add action to focus camera on cFadi (XAGE scripts not yet stacking)
  5)  Add action to play music (unable to get PlayMusicOnRoomLoad event from *.crm)

Not being able to access to room and room object data remains a major obstacle.  Hopefully the above demonstrates the potential in preparing AGS games for new audiences.  It would be incredibly useful to have either:
  • A button in AGS editor that allows for exporting room data in XML format (preferable).
  • A spec/file format/codesnippet detailing how to read *.crm files.

Massive thanks to Ben Chandler, and for putting up with my inane questions!
Logged

XAGE - Xna Adventure Game Engine (Twitsqueak) - Convert AGS projects to the Xbox360 & Web (still very much in alpha)
Denzil Quixode
Member



« Reply #17 on: 09 Oct 2009, 02:02 »

Hi clarvalon, I've created an editor plugin that dumps room information for you. I'm afraid I have no idea how good the performance is on a large game, because I don't have the source files for one to try it out on. I made it quite quickly and wouldn't be surprised if it has problems, but I hope it is of some help to you.

Download it from:

If all goes well the plugin in that folder should add an "Export" menu to the AGS editor with a "Room Data" option. I developed this plugin against version 3.1.2SP1, I don't know whether it works on other versions.

The backgrounds are dumped as Base64-encoded PNG image data blocks in the XML.

I've included the C# project source code as well as the DLL in the zip in case you or anyone else want to take a look at it.
« Last Edit: 09 Oct 2009, 02:39 by Denzil Quixode » Logged
Ryan Timothy
Member


"No more than normal, no less than usual."

Play-testing: I've beta tested a few games, let me know.Backgrounds: If you need help, or have an interesting game, let me know.Scripting: Intermediate programming (not advanced).

« Reply #18 on: 09 Oct 2009, 02:36 »

Wow, that's excellent to see Awakener on the 360.
I'm hoping this playing around works out, and we can get any AGS games to work on the 360. Tongue
Logged

subspark
Member


I have the wisdom of a much younger man.

Play-testing: This reflects my experience as a professional. Need a hand? Sure!Voice acting: This reflects my experience as a professional. Need a hand? Sure!Music: This reflects my experience as a professional. Need a hand? Sure!Backgrounds: This reflects my experience as a professional. Need a hand? Sure!Character art: This reflects my experience as a professional. Need a hand? Sure!Animation: This reflects my experience as a professional. Need a hand? Sure!
Proof reading: This reflects my experience as a professional. Need a hand? Sure!Story design: This reflects my experience as a professional. Need a hand? Sure!Translating: This reflects my experience as a professional. Need a hand? Sure!

« Reply #19 on: 09 Oct 2009, 03:25 »

Its a marvellous movement towards crossplatforming ags. Spectacular plugin, denzil! Youll make clarvalon really happy with that!

Cheers,
Sparky
Logged


Tarnish your shoes if there is to be a peace between us!
Pages: [1] 2 3 Print 
AGS Forums  |  Using AGS  |  Technical Forum (Moderators: Gilbet V7000a, Scorpiorus, strazer)  |  Topic: Export Room to XML? « previous next »
Jump to:  


Login with username, password and session length

Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC
Page created in 0.224 seconds with 15 queries.