CPCWiki forum

General Category => Programming => Topic started by: lachlank on 03:12, 05 May 12

Title: Retro Game Asset Studio BETA
Post by: lachlank on 03:12, 05 May 12
Hello all, with some renewed interest in all things retro programming, I decided to revisit my cross-platform sprite editor Amsprite (http://www.cpcwiki.eu/index.php/AMSprite), and add some features and do some refactoring.


My long term goal is to create a general purpose tool, that can target any combination of retro platform (CPC, Spectrum, C64 etc) and language (assembler, basic, C etc) for creation of sprites, tile bitmaps, loading screens, sfx, music and tilemaps. Ideally the tool will be 100% .Net managed code so that it is portable across all platforms (via MONO). I have got this somewhat up and running enough to demo a beta here. At present it doesn't do much more than Amsprite used to, although I have tested it with C64 sprites and output. I have rebranded as Retro Game Asset Studio to reflect the fact that is it target-platform agnostic, and not just a sprite editor.

Here is what I have added over and above the last version of Amsprite:
There is obviously a lot more work to do to make it complete, sound emulation and tracking is currently rudimentary and for the CPC only. I have only just made a start outputting c64 sprites, these are quite different to CPC.

Anybody out there care to test it out and offer any early feedback? Or any proficient .Net devs interested in helping?


You'll need .Net 3.5 installed to run it. [attachurl=1]

Lachlan
Title: Re: Retro Game Asset Studio BETA
Post by: ervin on 11:23, 05 May 12
Intriguing!

I'll be taking a look at this shortly!
:)
Title: Re: Retro Game Asset Studio BETA
Post by: Executioner on 01:47, 06 May 12
Is .NOT still alive?
Title: Re: Retro Game Asset Studio BETA
Post by: lachlank on 23:48, 07 May 12
Quote from: Executioner on 01:47, 06 May 12
Is .NOT still alive?


.NOT? Am I missing something here?
Title: Re: Retro Game Asset Studio BETA
Post by: arnoldemu on 09:29, 08 May 12
Quote from: lachlank on 23:48, 07 May 12

.NOT? Am I missing something here?
.NET.... .not?
Title: Re: Retro Game Asset Studio BETA
Post by: Devilmarkus on 10:11, 08 May 12
This is .NOT .NETT!
Title: Re: Retro Game Asset Studio BETA
Post by: Executioner on 10:19, 08 May 12
I just didn't realise anyone was still using .NET seriously. I installed Visual Studio Express 2010 and it took me until last month to get my Windows 7 laptop stable again. It still hangs for minutes at a time occassionally. Sworn off Microsoft a looooong time ago, hence .NOT.
Title: Re: Retro Game Asset Studio BETA
Post by: lachlank on 11:47, 08 May 12
The .Net languages are awesome (C# and VB.Net), once you get used to them with LINQ (Language Integrated Query), generics, anonymous classes/functions etc it would be very hard to go back to any other language. Also, the base class library is massive and covers virtually anything you could want to do (this is of course a blessing and a curse). Yes, they come with a lot of baggage from MS, and yes Visual Studio (in its many guises) can be unstable and bloated.


However in terms of sheer power and what you can do in a small(ish) amount of code, I think they can't be touched. I may be biased in that I have been using them for a while now at my day job, but I have programmed in a LOT of programming languages over the last 25 years, and these are by far the best IMHO.


As far as usage, you only have to look at IT job ads to see the demand for .Net developers.


I am by no means an MS fanboi, but the languages themselves are very well designed. You don't even need MS, with the MONO implementation.


Sales pitch over. Haters gonna hate.



Title: Re: Retro Game Asset Studio BETA
Post by: Bryce on 12:49, 08 May 12
I prefer QT :)

Bryce.
Title: Re: Retro Game Asset Studio BETA
Post by: arnoldemu on 13:16, 08 May 12
Quote from: Executioner on 10:19, 08 May 12
I just didn't realise anyone was still using .NET seriously. I installed Visual Studio Express 2010 and it took me until last month to get my Windows 7 laptop stable again. It still hangs for minutes at a time occassionally. Sworn off Microsoft a looooong time ago, hence .NOT.
there are various things you can do to make it better, often involving turning things off and installing all it's service packs.

Title: Re: Retro Game Asset Studio BETA
Post by: Gryzor on 15:06, 08 May 12
[grammar]
*its*
[/heil]
Title: Re: Retro Game Asset Studio BETA
Post by: Executioner on 23:28, 08 May 12
Quote from: lachlank on 11:47, 08 May 12
The .Net languages are awesome (C# and VB.Net)

Not so sure about VB. I've used the old versions a lot and was quite unimpressed with the language itself, but C# is a different story. It was developed by the same guy who did Delphi, and is basically a copy of Java with a few slight changes, and I have to agree it is a very good language and introduced a bit of new functionality, most of which is now available in newer versions of Java.

Quote
As far as usage, you only have to look at IT job ads to see the demand for .Net developers.

I think you get quite a different picture depending on where you look. 90% of the financial industry has completely dropped .NET and Microsoft now. Stupid little things like not having an accurate clock don't do much to help the MS case. In Australia and NZ there is still a lot of Love for Microsoft. I've even heard people consider buying a Windows phone.

Heck, most of the problems I run into developing WinAPE are down to the Windows API, and I've spent countless hours trying to get around bugs in it. MS support amounts to basically nothing unless you're a big company with a huge support contract.

Quote
Sales pitch over. Haters gonna hate.

As I said earlier, I actually do like C#. VB is totally another matter and can be blamed for most of the crap so-called developers in the world. Thing is I can't justify paying Microsoft big money for their support or for their development platforms only to be stuck half the time trying to work around shortcomings in their proprietary code for which I don't have the source code. Z80 assembler appeals to me more, I wish I could do all my development using it.
Title: Re: Retro Game Asset Studio BETA
Post by: lachlank on 00:12, 09 May 12
Quote from: Executioner on 23:28, 08 May 12
Not so sure about VB. I've used the old versions a lot and was quite unimpressed with the language itself, but C# is a different story. It was developed by the same guy who did Delphi, and is basically a copy of Java with a few slight changes, and I have to agree it is a very good language and introduced a bit of new functionality, most of which is now available in newer versions of Java.


There is a lot of misinformation out there about VB; it is perceived as worse than c#, which is not the case. The two languages as they now exist are functionally identical, in fact many tools exist which perform a trivial line-for-line transformation from one to the other. I use VB at work, and often use c# at home just to stay current in both, there really is no difference. The VB.Net of today (version 10) really bears very little resemblance to old VB (say, VB6). I have (unsuccessfully) lobbied MS to consolidate the two languages by making keywords etc interchangeable, or else dropping one or the other (VB presumably would be dropped as less common). Maintaining two near-identical languages seems stupid to me. But that is an example of the strange decisions MS makes.
Quote from: Executioner on 23:28, 08 May 12

Heck, most of the problems I run into developing WinAPE are down to the Windows API, and I've spent countless hours trying to get around bugs in it. MS support amounts to basically nothing unless you're a big company with a huge support contract.


You won't get any argument from me re. the Windows API, so much legacy junk in there. .Net abstracts a lot of it away, but as so much of it is a layer over win32 APIs there are a ton of queer little quirks.

Quote from: Executioner on 23:28, 08 May 12
As I said earlier, I actually do like C#. VB is totally another matter and can be blamed for most of the crap so-called developers in the world. Thing is I can't justify paying Microsoft big money for their support or for their development platforms only to be stuck half the time trying to work around shortcomings in their proprietary code for which I don't have the source code. Z80 assembler appeals to me more, I wish I could do all my development using it.


Things have changed... As I said, VB.net is no longer the red-headed step child (although that perception still remains, sadly). You can now step through the MS (reference) source for the .Net libraries in the Visual Studio debugger, which is a godsend. The Express versions of Visual Studio are free, and contain most features the average developer would need. The pro version has no registration or activation required if you are of the unscrupulous persuasion.


Also, I don't think you can blame a language for creating bad programmers... Ignorant programmers, perhaps. Most programmers I have worked with have no idea about what is going on in the background of their programs in terms of memory, pointers, etc, having grown up in an era when the compiler/runtime takes care of all this. I constantly see errors because programmers don't realise they are dealing with pointer variables, all modern languages "hide" this from you - c#, Java, etc.


I enjoy dabbling in z80 for the challenge, and ,as you say, if there is a bug I know it is mine (or WinAPEs? ;)). But to get work done fast you can't beat the modern languages/IDEs.


PS I will gladly disown MS if you just add Undo to the WinAPE assembler!


Lachlan

Title: Re: Retro Game Asset Studio BETA
Post by: endangermice on 00:13, 07 July 12
I'm actively using C# at work and have been doing for the past eight years. It is a very good language but since I do multimedia I do spend a lot of time dropping into C++ which does give me a lot of control over the system that C# can't touch all that well and for Film and TV performance is critical!

I have to agree with Executioner there are a lot of problems with the Windows API and various bugs which simply aren't going to be fixed - you should see the code we've had to kludge together in order to allow our video player to refresh the screen properly - its a right mess in there and I really hate messy code but there's nothing we can do because of some fundamental problems with certain elements of the Windows API.

Having experienced WPF recently I can honestly say I wish Microsoft hadn't bothered. I think it's an extremely complicated, klugdy platform with virtually no error checking causing you to frequently spend hours trying to figure out why something simply isn't working, you can't even debug the terrible XAML code which leads to enormous frustration. We've completely abandoned it as a presentation platform and have gone back to Windows Forms which doesn't quite have the same performance but is a far more elegant solution. QT is a platform I'd love to use but that would constitute a complete UI rewrite of what is an Incredibly complex video encoding and delivery automation system and in a fast paced environment, regrettably - we simply don't have the time.

.Net is a really good platform and when it's teamed up with C++ - together they extremely flexible. Visual Basic is indeed functionally identical to C# but I feel it's a very messy language and lacks the elegance C# which encourages much better program structure. It also has limited interopability with C++ and the languages are fundamentally different in suntax making it far harder to switch between the two. To be honest if I were Microsoft I'd dump VB altogether and get people of learn C# it's really not that hard and it will make them better programmers.

Having said that I'm loving getting back into Z80 asm it's a much simpler world where I don't constantly have to think about making every bit of code completely dynamic and reusable. In assembly land it's all about optimisation and I find the challenge difficult but genuinely rewarding! It also causes you to think about how low level data manipulation might be able to help you in higher languages. C++ and C# are both perfectly capable of activities such as bit shifting which can be extremely useful at times!
Title: Re: Retro Game Asset Studio BETA
Post by: endangermice on 18:40, 10 July 12
Hey I've just been checking out AMSprite and I have to say it's absolutely superb. I was writing some of my own tools to save out sprite data etc. but this seems to do the trick beautifully! It does have a few bugs, mostly to do with the level data which for me seems to be corrupting itself! I'm going to test out Asset Studio BETA and see how it's doing.

If you need any help with the coding etc. I'd be happy to lend a hand. Unlike my rudimentary Z80 skills, I have 8 years experience in .Net, and have been using it since version 1.1 so  if you ever need any help to develop this I'm sure I could offer some assistance here and there!


Update.... Just tested Retro Game Asset Studio and it looks like all the bugs I found in AmSprite have been fixed - great work!
Title: Re: Retro Game Asset Studio BETA
Post by: Sykobee (Briggsy) on 19:19, 10 July 12
This looks like a good tool, will be checking it out soon. Good luck with your plans :-)
Title: Re: Retro Game Asset Studio BETA
Post by: endangermice on 19:33, 10 July 12
Hey I'm afraid I've found a bug when saving out a previously loaded project. The exact exception is: Value cannot be null, and here's the stack (shortened):

System.ArgumentNullException: Value cannot be null.
   at System.Threading.Monitor.Enter(Object obj)
   at RGAS.SpriteSet.get_formatter()
   at RGAS.SpriteSet.get__formatterTypeString()
   at WriteSpriteSetToXml(XmlWriterDelegator , Object , XmlObjectSerializerWriteContext , ClassDataContract )
   at System.Runtime.Serialization.ClassDataContract.WriteXmlValue(XmlWriterDelegator xmlWriter, Object obj, XmlObjectSerializerWriteContext context)
   at System.Runtime.Serialization.XmlObjectSerializerWriteContext.WriteDataContractValue(DataContract dataContract, XmlWriterDelegator xmlWriter, Object obj, RuntimeTypeHandle declaredTypeHandle)
   at System.Runtime.Serialization.XmlObjectSerializerWriteContext.SerializeWithoutXsiType(DataContract dataContract, XmlWriterDelegator xmlWriter, Object obj, RuntimeTypeHandle declaredTypeHandle)
   at System.Runtime.Serialization.DataContractSerializer.InternalWriteObjectContent(XmlWriterDelegator writer, Object graph)
   at System.Runtime.Serialization.DataContractSerializer.InternalWriteObject(XmlWriterDelegator writer, Object graph)
   at System.Runtime.Serialization.XmlObjectSerializer.WriteObjectHandleExceptions(XmlWriterDelegator writer, Object graph)
   at System.Runtime.Serialization.DataContractSerializer.WriteObject(XmlWriter writer, Object graph)
   at RGAS.SpriteSet.toXML()

It looks like a problem with your serialisation code possibly within the WriteSpriteSetToXML method. I notice you've threaded the routine, so it could be a syncronisation issue though without seeing the code I can't really say. 

I've attached the project I was working on, hope this helps - it's a shame I've been finding this utility extremely useful already :)

Cheers,

Damien.
Title: Re: Retro Game Asset Studio BETA
Post by: lachlank on 22:48, 10 July 12
Quote from: endangermice on 19:33, 10 July 12
Hey I'm afraid I've found a bug when saving out a previously loaded project. The exact exception is: Value cannot be null, and here's the stack (shortened):

I've attached the project I was working on, hope this helps - it's a shame I've been finding this utility extremely useful already :)

Cheers,

Damien.


Hi, thanks for the positive feedback. That's a bummer that you had this error, unfortunately I can't easily see what caused it as the project has changed quite a bit since I uploaded the original RGAS beta that you used to create this file. I would have to drag this old version from source control to debug it.


I've attached the latest version for you to try, this is near to complete as far as functionality is concerned, just needs more testing. It should load and save OK (has for me, anyway). The loading/saving is a bit of a pig as I have been lazy and just used the in-built XML serialization of classes; it can be quite fussy. The downside is that if I change class names or hierarchy, it will break the "file format". Hence you won't be able to load your file into this version. Also I dabbled with changing the name to "8-bit Asset Studio" so the file extension is currently .8bas. I'll probably change that back again to .rgas.


There is now basic support for editing Spectrum and C64 sprites, which works OK (not that I know much about these platforms, I just implemented based on what info I could find on the web). Spectrum is pretty simple, C64 on the other hand has a bunch of mind-bending "modes". It should be easy to add other platforms now as I have refactored everything to the point where you just need to override a few key methods.


There is also now support for sprite rotation (which I am not happy with yet, as far as interpolation) and image importing is now much better (with various dithering options).


If you want a copy of the source to play with (or for if you get more errors), send me an email lachlankeown at gmail and I'll add you to source control (is hosted at xp-dev.com (http://xp-dev.com/) SVN repository). Is all in VB.Net but as you rightly pointed out in an earlier post if you can write c# then you can write vb (I agree that MS should drop one or the other). If you have 8 years experience with .Net you will have no trouble reading the code. I also cut my teeth with .Net 1.1, what a horrible experience that was in hindsight (no generics, LINQ, anon functions etc).


I have yet more plans for RGAS, when time allows. For instance, I would like a scrolling level editor, and would also like to develop the tracker/sfx module. I built a crude tracker into Amsprite (which was actually a hell of a lot of work to make in purely managed code), but it needs finishing. Not sure how much work it would be to include a C64 version. If you are interested in helping with these or any other features I am more than happy.


Basically I want a one-stop-shop for anyone who wakes up one day thinking "I want to create a home brew game for an 8 bit computer". At the moment it is a nightmare starting out, with all the individual tools floating around. I would also like to add something like a sample code repository to RGAS. Also useful would be a "compile" button that generates an example program with your sprites, compiles it, and launches with an appropriate emulator. That would be cool.


Anyway try this latest version and see how it goes. Just remember, the file format may not be set in stone (but 99% sure it should be).


Cheers


Lachlan


[attachurl=2]
Title: Re: Retro Game Asset Studio BETA
Post by: endangermice on 23:21, 10 July 12
Hey no worries - I suspect you've fixed the bug in a later version, no need to go back and debug the old one - if it still persists in the latest version then it will be easy enough to track down.


.Net has definitely moved on in a big way since 1.1. I love the generics, for one it allowed us to dispose of that terrible ArrayList and have C++ style templating (well almost!)! I'm not as keen on Linq - it does make all sorts of queries very easy but.... I have found that in some instances it can create horrendous memory leaks and can be quite a bit slower that say for example a standard for loop. Having said that, the software we write is basically a server farm for video encoding and delivery which literally produces thousands of objects every minute so does tend to push these new technologies very hard!


VB.Net is something I have come across from time to time so I'm sure I'll be able to adjust to it easily enough - the .Net languages do have a lot in common - well a unified library for one so converting between languages isn't usually that hard and I could always write some dlls in C# for you - you're code wouldn't know the difference - the beauty of .net!


I did write a game in VB6 with a mate just for kicks a few years ago - so I suspect the structure will be familiar. We had to write some very interesting interop routines for DirectX8 which was quite a challenge as I remember - but we got it all working - I think I still have the source somewhere....


I'd love to take a look at the source - will PM you and provide you with details. I can't promise how much time I can spend unfortunately since I have a pretty hectic schedule (including having to finish the remake below very soon!) but if i can help - I will. I'm very good on level editors having written several in the past, one most recently for my upcoming XNA remake of Starquake (which is based on the CPC original) - if anyone's interested I may post a demo, once my blog is up. For now some videos of the current WIP courtesy of YouTube (I know shameless plug ;) )  - the video is a bit jerky (I blame the recording software!), the real thing is smooth as silk - I guarantee. Being a video guy everything have to be in smooth sync! I do have to say I absolutely love the idea of your project, a tool like this would have been amazing back in the day, but even now I think it's something I will find invaluable!


Starquake Remake Clip 1 (01/08/2011) (http://www.youtube.com/watch?v=N39JLOBUPSQ#)
Starquake Remake Clip 2 (02/08/2011) (http://www.youtube.com/watch?v=sJqK_EUacvY#ws)
Starquake Remake Clip 3 (02/08/2011) (http://www.youtube.com/watch?v=lz89g4I3Qt0#ws)
Starquake Remake Clip 4 (03/08/2011) (http://www.youtube.com/watch?v=2ByP8xdtGRc#ws)
Starquake Remake Clip 5 (04/08/2011) (http://www.youtube.com/watch?v=gF4UHXYS7ac#)
Title: Re: Retro Game Asset Studio BETA
Post by: lachlank on 21:43, 11 July 12
Quote from: endangermice on 23:21, 10 July 12
I'd love to take a look at the source - will PM you and provide you with details. I can't promise how much time I can spend unfortunately since I have a pretty hectic schedule (including having to finish the remake below very soon!) but if i can help - I will. I'm very good on level editors having written several in the past, one most recently for my upcoming XNA remake of Starquake (which is based on the CPC original) - if anyone's interested I may post a demo, once my blog is up. For now some videos of the current WIP courtesy of YouTube (I know shameless plug ;) )  - the video is a bit jerky (I blame the recording software!), the real thing is smooth as silk - I guarantee. Being a video guy everything have to be in smooth sync! I do have to say I absolutely love the idea of your project, a tool like this would have been amazing back in the day, but even now I think it's something I will find invaluable!


Starquake remake looks very nice - whoever did the graphics did a great job. Used to like this game back in the day, although I never had the patience to get far into it.


Unfortunately I don't have much time to devote to this project either, having 2 young boys and various other projects on the go also. Plus, being a labour of love, I don't expect to ever see any financial reward. It would be great to have the time to muck around with z80 programming and building tools like this all day.


Quote from: endangermice on 00:13, 07 July 12
Having experienced WPF recently I can honestly say I wish Microsoft hadn't bothered. I think it's an extremely complicated, klugdy platform with virtually no error checking causing you to frequently spend hours trying to figure out why something simply isn't working, you can't even debug the terrible XAML code which leads to enormous frustration. We've completely abandoned it as a presentation platform and have gone back to Windows Forms which doesn't quite have the same performance but is a far more elegant solution.


Couldn't agree more. I've tried to get into WPF, but just can't. Was starting to think I was a bit thick, but now just think it is really poorly designed. As you say, debugging XAML is nigh on impossible. Examples for doing anything outside the most basic are non-existent. At work, we looked into rewriting a Windows Forms control in WPF, but in the end it was just too hard, so we accept the performance hit of using GDI+. Luckily as CPUs improve they have made GDI+ look better and better! I actually enjoy using Windows Forms (now that I know its quirks) and wish MS had just updated it with better controls and a hardware accelerated backend. Now we have Metro for Windows 8 which is just more WPF/Silverlight/XAML type garbage. N00b developers seem to love this stuff for some reason that I can't understand.


I managed to write a WPF frontend for my MAME arcade cabinet which is about the biggest project I would attempt with WPF. For small apps like this it seems to work well, although is mainly just an exercise in trial and error as the documentation and intellisense is so crap.


Anyway that's enough ranting about MS. Send me your details and I will add you to source control so you can have a look.


Lachlan
Title: Re: Retro Game Asset Studio BETA
Post by: endangermice on 00:33, 12 July 12

Excellent - it sounds like we're both comming from similar angles - I don't have any children yet, but I suspect that will change in the not too distant future! Right now I'm kept busy with my multimedia development day job as well as running a growing photography company and a web design company too!

I'm off to Prague for a few days tomorrow (better half's birthday) so I'll be out of contact relaxing for a few days but when I'm back i'd love to take a look at the source. From the looks of it you're using DirectShow which is one of my specialist areas so if you have any problems with this I'm sure I can help!

Thanks for the Starquake compliments, I actually did the graphics myself, I did art a number of years ago and like to try and keep it up. This is one reason why the remake has been taking so long, drawing all of the graphics and doing all of the code takes up a lot of time and I've been really busy with other projects recently so haven't given it much time at all - I'm going to be returning to it soon though - I must get it finished! Like your project this is also a labour or love - I might be able to get it released in to the Live arcade with permission from the author but although it was a fairly popular game back in the day, I can't imagine millions of people buying it!

I think it would be really cool just to polish up what you have already written. I've found it incredibly useful - it makes developing games for 8 bit systems an absolute dream and means I don't have to sit around writing all of these tools myself, always a bonus!

I felt the same as you with WPF. If I spent extended time with it I could begin to use it more fluidly perhaps, but the nature of my job is that one day I'll be doing UI another it will be some low level DirectShow stuff or maybe some even lower level C++ work. We only have a small team so I can't dedicate myself to a single aspect of development task, we tend to be all over the product! Even if I was a sadist and decided to dedicate my life to GUI, I still wouldn't choose WPF it is as you say poorly designed and far too over complicated. Turbo charged GDI+ would have been a far better way to go. Have you noticed how all Windows OSs including Windows 7 (not sure about 8, we did install the preview but then needed the drive for something else) still use GDI to render the start menu etc. - what does that tell you? My experience with WPF sounds very similar to yours - doing some of the simplest things seemed almost impossible and I too spend far too much time trawling the net for answers which often weren't satisfactory!

QT is reported to be extremely good, some of the bells and whistles of WPH but with a more forms style programming model. I haven't looked at it yet but may well do one day if I have a compelling need for a whizzy GUI.


Anyway I'm off for a few days but will PM you when I get back - looking forward to seeing the source. If you need help with XML, I have a lot of experience in this too, our app is WCF services based with an XML API so I have had a lot of fun munging it into all sorts of fun formats! I hardly ever use the serialization in its native form since as you have no doubt found it can be a bit of a pig and often it's quicker just to do the process manually using the XML writer.

Title: Re: Retro Game Asset Studio BETA
Post by: lachlank on 00:39, 12 July 12
Quote from: endangermice on 00:33, 12 July 12
Thanks for the Starquake compliments, I actually did the graphics myself, I did art a number of years ago and like to try and keep it up.


Damn, you are one of those lucky b%*^&ds who can program and draw - a rare breed. I am very jealous.


Hear from you when you get back.


Lachlan
Title: Re: Retro Game Asset Studio BETA
Post by: Gryzor on 14:54, 16 July 12
Quote from: lachlank on 00:39, 12 July 12

Damn, you are one of those lucky b%*^&ds who can program and draw - a rare breed. I am very jealous.



^^This. I can do neither. Damn you people.
Title: Re: Retro Game Asset Studio BETA
Post by: lachlank on 03:22, 09 August 12
Have now created a wiki page for RGAS which has the full Windows installer for those who want to try it out.

Retro Game Asset Studio - CPCWiki - The Ultimate Amstrad CPC Community & (http://www.cpcwiki.eu/index.php/Retro_Game_Asset_Studio)

Lachlan
Title: Re: Retro Game Asset Studio BETA
Post by: Ynot.zer0 on 10:26, 09 August 12
absolutely awesome news!!!  I was wondering what I was going to be doing for the next 2 days, whilst stuck in a hotel in Saudi..... I'll shall give it a thorough test-drive and provide you with any feedback.  The wiki page list of features has made me want to try this out!  does it come with a "sample" app?... okay, I suppose I'll find out after it's finished installing  :laugh:
Title: Re: Retro Game Asset Studio BETA
Post by: lachlank on 10:57, 09 August 12
Ah woops no it doesn't - there is a test program in there but it's not outputting it at the moment. Will put that on the to-do list. You can download the old AMSprite, that has the test program that you can compile with WinAPE. It's pretty crude, just draws the sprite and let's you move it around with cursor keys. Look forward to hearing your thoughts, hope it doesn't crash too much.

Lachlan
Title: Re: Retro Game Asset Studio BETA
Post by: Ynot.zer0 on 13:06, 09 August 12
 :laugh:
only got one exception thrown so far....  That was trying to use the level designer, was clicking around on the empty blocks trying to figure out how to use it   I have a vague memory from AMSprite that I needed to create sprites first and then I can place them into the locations of the level designer?  anyway, it threw a negative exception error at that point (cos I didn't have any sprites created?) but allowed me to continue.  I then went to take a look at the help file linked on the install, it's still all AMSprite orientated (just an observation).


What it did do very nicely is convert a photo of my basset hound into a loading screen - and it did it very well indeed!  I just might use this as a way to get great 8-bit versions of photos!
I'll keep playing around and see where I get to in the next 1.5 days....


(http://i963.photobucket.com/albums/ae120/_tonypig777/RetroGameAssetStudiobasset_cruze.jpg)
Title: Re: Retro Game Asset Studio BETA
Post by: Ynot.zer0 on 14:38, 09 August 12
If I create a new sprite and select [ ] add to level designer, all is good.  When I switch to the level designer I see the sprite at the top of the screen and can select it and place it on the level designer area.


However, if I return back to the sprite editing screen, re-select the sprite and show properties, the [ ] add to level designer is not checked.  Whilst this in itself isn't an issue, as the Sprite is still available in the level designer.... if I created a new sprite and didn't check this checkbox, I can no longer go back and check it to be available in the level designer.  I even tried to copy the sprite and change the property on the copied one.  nope, will not let me check the checkbox to use it in the level designer.


apart from that, it seems to be pretty stable....
Title: Re: Retro Game Asset Studio BETA
Post by: lachlank on 04:48, 10 August 12
Just uploaded an update, can download from main wiki page or here http://www.cpcwiki.eu/imgs/6/6d/RGAS.zip (http://www.cpcwiki.eu/imgs/6/6d/RGAS.zip) (just re-run installer). Fixes a few bugs. I can't reproduce your level designer error when no sprites loaded. If you get any further errors can you please send stack trace (under details on error dialog)? Level designer needs extending so that it can scroll and allow entry of tile aspect ratio etc.

Cheers

Lachlan
Title: Re: Retro Game Asset Studio BETA
Post by: Ynot.zer0 on 10:37, 10 August 12

okay, installed latest version.  Still cannot select the checkbox to add a sprite to level designer after I've created it - and oddly now, if I create a new sprite I select add to level designer but it doesn't show up.
What I do get now is a level designer all in black instead of white.  So, If I add a new level (the label height says name - minor thing) and then I notice there are no sprites available, I press X to delete and then select 'yes'.  I get an exception error.  I think this is what I did before.
Here's the exception error:
Spoiler: ShowHide

See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.


************** Exception Text **************
System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
   at System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource)
   at System.ThrowHelper.ThrowArgumentOutOfRangeException()
   at System.Collections.Generic.List`1.get_Item(Int32 index)
   at RGAS.LevelDesigner.btnDeleteSprite_Click(Object sender, EventArgs e) in E:\Programming\Projects\DotNet\AmstradSpriteEditor\TRUNK\AmstradSpriteEditor\LevelDesigner.vb:line 305
   at System.Windows.Forms.Control.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ButtonBase.WndProc(Message& m)
   at System.Windows.Forms.Button.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)




************** Loaded Assemblies **************
mscorlib
    Assembly Version: 2.0.0.0 (http://2.0.0.0)
    Win32 Version: 2.0.50727.5456 (Win7SP1GDR.050727-5400)
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
RGAS
    Assembly Version: 0.9.0.0 (http://0.9.0.0)
    Win32 Version: 0.9.0.1 (http://0.9.0.1)
    CodeBase: file:///C:/Program%20Files%20(x86)/Retro%20Game%20Asset%20Studio/0.9/RGAS.exe
----------------------------------------
Microsoft.VisualBasic
    Assembly Version: 8.0.0.0 (http://8.0.0.0)
    Win32 Version: 8.0.50727.5420 (Win7SP1.050727-5400)
    CodeBase: file:///C:/windows/assembly/GAC_MSIL/Microsoft.VisualBasic/8.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualBasic.dll
----------------------------------------
System
    Assembly Version: 2.0.0.0 (http://2.0.0.0)
    Win32 Version: 2.0.50727.5456 (Win7SP1GDR.050727-5400)
    CodeBase: file:///C:/windows/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Windows.Forms
    Assembly Version: 2.0.0.0 (http://2.0.0.0)
    Win32 Version: 2.0.50727.5460 (Win7SP1GDR.050727-5400)
    CodeBase: file:///C:/windows/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System.Drawing
    Assembly Version: 2.0.0.0 (http://2.0.0.0)
    Win32 Version: 2.0.50727.5462 (Win7SP1GDR.050727-5400)
    CodeBase: file:///C:/windows/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Runtime.Remoting
    Assembly Version: 2.0.0.0 (http://2.0.0.0)
    Win32 Version: 2.0.50727.5420 (Win7SP1.050727-5400)
    CodeBase: file:///C:/windows/assembly/GAC_MSIL/System.Runtime.Remoting/2.0.0.0__b77a5c561934e089/System.Runtime.Remoting.dll
----------------------------------------
System.Core
    Assembly Version: 3.5.0.0 (http://3.5.0.0)
    Win32 Version: 3.5.30729.5420 built by: Win7SP1
    CodeBase: file:///C:/windows/assembly/GAC_MSIL/System.Core/3.5.0.0__b77a5c561934e089/System.Core.dll
----------------------------------------
System.Data
    Assembly Version: 2.0.0.0 (http://2.0.0.0)
    Win32 Version: 2.0.50727.5420 (Win7SP1.050727-5400)
    CodeBase: file:///C:/windows/assembly/GAC_32/System.Data/2.0.0.0__b77a5c561934e089/System.Data.dll
----------------------------------------
System.Xml
    Assembly Version: 2.0.0.0 (http://2.0.0.0)
    Win32 Version: 2.0.50727.5420 (Win7SP1.050727-5400)
    CodeBase: file:///C:/windows/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
System.Configuration
    Assembly Version: 2.0.0.0 (http://2.0.0.0)
    Win32 Version: 2.0.50727.5420 (Win7SP1.050727-5400)
    CodeBase: file:///C:/windows/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
2wusisys
    Assembly Version: 2.0.0.0 (http://2.0.0.0)
    Win32 Version: 2.0.50727.5456 (Win7SP1GDR.050727-5400)
    CodeBase: file:///C:/windows/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Runtime.Serialization
    Assembly Version: 3.0.0.0 (http://3.0.0.0)
    Win32 Version: 3.0.4506.5420 (Win7SP1.030729-5400)
    CodeBase: file:///C:/windows/assembly/GAC_MSIL/System.Runtime.Serialization/3.0.0.0__b77a5c561934e089/System.Runtime.Serialization.dll
----------------------------------------
Accessibility
    Assembly Version: 2.0.0.0 (http://2.0.0.0)
    Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
    CodeBase: file:///C:/windows/assembly/GAC_MSIL/Accessibility/2.0.0.0__b03f5f7f11d50a3a/Accessibility.dll
----------------------------------------
AForge.Imaging
    Assembly Version: 2.2.4.0 (http://2.2.4.0)
    Win32 Version: 2.2.4.0 (http://2.2.4.0)
    CodeBase: file:///C:/Program%20Files%20(x86)/Retro%20Game%20Asset%20Studio/0.9/AForge.Imaging.DLL
----------------------------------------
AForge
    Assembly Version: 2.2.4.0 (http://2.2.4.0)
    Win32 Version: 2.2.4.0 (http://2.2.4.0)
    CodeBase: file:///C:/Program%20Files%20(x86)/Retro%20Game%20Asset%20Studio/0.9/AForge.DLL
----------------------------------------
System.Threading
    Assembly Version: 1.0.2856.102
    Win32 Version: 1.0.2856.0
    CodeBase: file:///C:/Program%20Files%20(x86)/Retro%20Game%20Asset%20Studio/0.9/System.Threading.DLL
----------------------------------------


************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.


For example:


<configuration>
    <system.windows.forms jitDebugging="true" />
</configuration>


When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.
Title: Re: Retro Game Asset Studio BETA
Post by: lachlank on 22:27, 10 August 12
Thanks have fixed some more stuff and updated again. Haven't tested level designer much as I want to give it a makeover soon.

New version here http://www.cpcwiki.eu/imgs/6/6d/RGAS.zip (http://www.cpcwiki.eu/imgs/6/6d/RGAS.zip)

Cheers

Lachlan
Title: Re: Retro Game Asset Studio BETA
Post by: lachlank on 11:02, 15 August 12
Have updated to latest version, level editor is now improved. Each level can have a tile aspect ratio set, as well as a default background colour. The editor itself now supports zooming and scrolling.

http://www.cpcwiki.eu/imgs/6/6d/RGAS.zip (http://www.cpcwiki.eu/imgs/6/6d/RGAS.zip)
Title: Re: Retro Game Asset Studio BETA
Post by: lachlank on 06:46, 14 January 13
Have just tested this on my jailbroken (http://forum.xda-developers.com/showthread.php?t=2092158) Surface RT, works well, have uploaded raw .exe to wiki page (http://cpcwiki.eu/index.php/Retro_Game_Asset_Studio).


Now just need someone to either recompile an existing emulator for ARM (Windows RT), or port to "Modern UI/Metro" Windows 8 app. Preferably WinAPE so I can program on Surface!
Title: Re: Retro Game Asset Studio BETA
Post by: fgbrain on 15:58, 15 June 14
Sorry to bring this topic back.

Since in the wiki page you can still find the previous version, I have to share here the latest version
Lachlank kindly fixed for me, after I contacted him on 3/3/2014.

There was a bug that pallette files were not exported to assembly listing. Now fixed.


ATB
Title: Re: Retro Game Asset Studio BETA
Post by: EgoTrip on 19:13, 01 November 15
I don't know if this is still being developed but there is something that really bugs me. The way the list box always auto-scrolls so the selected tile is at the bottom is driving me crazy. Can you stop that happening in the next build please?
Title: Re: Retro Game Asset Studio BETA
Post by: lachlank on 08:47, 05 November 15
I've just released a new version of RGAS (1.1) with a few enhancements (most suggested by user @EgoTrip (http://www.cpcwiki.eu/forum/index.php?action=profile;u=337) thx!):



* Upgraded to .Net Framework 4.0 from 3.5.
* Copying pixels from sprite stores both text(JSON) and bitmap data on clipboard
* Sprite list now maintains position on refresh
* Sprite list allows multi-select drag re-order.
* Level designer allows editing of level parameters
* Level designer has gridlines option
* Level designer image quality improved
* Level designer allows duplicating of levels
* Amstrad font samples available when creating new project
* Change output format from drop-down menu on toolbar
* Add tooltip to tiles on level designer for sprite name
* Single portable .exe rather than a collection of .dlls


Attached to this post or available from the wiki page, or bundled with the next version of CPCTelera.


Title: Re: Retro Game Asset Studio BETA
Post by: Fessor on 09:28, 05 November 15
Am i the only one under (K)ubuntu with this Problem?

mono rgas.exe

Error loading UIA bridge (UiaDbusBridge, Version=1.0.0.0, Culture=neutral, PublicKeyToken=f4ceacb585d99812): System.IO.FileNotFoundException: Could not load file or assembly 'UiaDbusBridge, Version=1.0.0.0, Culture=neutral, PublicKeyToken=f4ceacb585d99812' or one of its dependencies. The system cannot find the file specified.
File name: 'UiaDbusBridge, Version=1.0.0.0, Culture=neutral, PublicKeyToken=f4ceacb585d99812'
  at System.AppDomain.Load (System.String assemblyString, System.Security.Policy.Evidence assemblySecurity, Boolean refonly) [0x00000] in <filename unknown>:0
  at System.AppDomain.Load (System.String assemblyString) [0x00000] in <filename unknown>:0
  at (wrapper remoting-invoke-with-check) System.AppDomain:Load (string)
  at System.Reflection.Assembly.Load (System.String assemblyString) [0x00000] in <filename unknown>:0
  at System.Windows.Automation.Provider.BridgeManager.GetAutomationBridge (System.String bridgeAssemblyName) [0x00000] in <filename unknown>:0



mono --version
Mono JIT compiler version 4.0.4 (Stable [url=http://4.0.4.1/5ab4c0d]4.0.4.1/5ab4c0d[/url] Tue Aug 25 23:11:51 UTC 2015)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. [url=http://www.mono-project.com]Home | Mono[/url]
        TLS:           __thread
        SIGSEGV:       altstack
        Notifications: epoll
        Architecture:  amd64
        Disabled:      none
        Misc:          softdebug
        LLVM:          supported, not enabled.
        GC:            sgen



Title: Re: Retro Game Asset Studio BETA
Post by: lachlank on 21:07, 07 November 15
Hi I've finally got around to testing RGAS properly on Linux/Mono rather than just Windows Mono. This has allowed me to fix a few performance issues and bugs.


The version of Linux I am testing with is a VMWare image downloaded from osboxes.org, Ubuntu 15.10 (http://www.osboxes.org/ubuntu/#ubuntu-15_10-vmware). I installed Mono as per the instructions here (http://www.mono-project.com/docs/getting-started/install/linux/), which turned out to be pretty simple for a Linux n00b like me. Otherwise the OS is vanilla as downloaded.


I found a major performace bug and another bug that prevented importing and converting bitmaps. These would've made the system virtually unusable under Linux.


The latest release which includes these fixes, v1.1.1, is attached.
Title: Re: Retro Game Asset Studio BETA
Post by: Fessor on 23:19, 07 November 15
Wonderful. Great Work.
Title: Re: Retro Game Asset Studio BETA
Post by: dragon on 22:00, 02 June 16
It not work for me 1.1 simply crash launching :( . I not have problems with 1.0 (winxp)
Title: Re: Retro Game Asset Studio BETA
Post by: lachlank on 22:17, 08 August 16
I've just released v1.2.1 of RGAS, with the following changes:


Download from the RGAS page here Retro Game Asset Studio - CPCWiki (http://www.cpcwiki.eu/index.php/Retro_Game_Asset_Studio) or attachment


Any bugs let me know by replying here.
Title: Re: Retro Game Asset Studio BETA
Post by: Morri on 23:36, 08 August 16
Thanks @lachlank (http://www.cpcwiki.eu/forum/index.php?action=profile;u=133) . I enjoy using this tool for my sprites and level layouts.

One question - the sprite data that is output to Basic DATA statements, what code would be required to read and display this in BASIC code?
Title: Re: Retro Game Asset Studio BETA
Post by: lachlank on 04:12, 09 August 16
Quote from: Morri on 23:36, 08 August 16
One question - the sprite data that is output to Basic DATA statements, what code would be required to read and display this in BASIC code?


Hi, I haven't written anything in CPC Basic in about 25 years but would imagine if you wanted a purely basic-based game engine you could read the data and POKE it to required screen address. Performance would probably be pretty awful. Better to use one of the various libraries that lets you use machine-code based sprite drawing routines from BASIC. One I just became aware of, and works with RGAS output, is 8BP (http://8bitsdepoder.blogspot.com/) which adds a bunch of RSX(|) sprite-drawing commands to basic. If you wanted to write a game in basic without learning C or assembler, I would look at that, it looks pretty professional (docs are in spanish but Google Translate does a good job). To be honest, your best bang for buck would be to learn C and use CPCTelera, it's no harder than basic and you can use a proper text editor on a modern PC. You don't need to learn assembler to create something that performs very well (although being able to read assembler greatly simplifies debugging).


Hope that helps.











Title: Re: Retro Game Asset Studio BETA
Post by: AMSDOS on 04:23, 09 August 16
I just wrote a small BASIC routine in the other thread (complete with screenshot), to obtain the byte DATA for a sprite, naturally it only works when a graphic is position top-corner of the screen.


So I'm unsure what @Morri (http://www.cpcwiki.eu/forum/index.php?action=profile;u=95) had in mind.
Title: Re: Retro Game Asset Studio BETA
Post by: Morri on 08:45, 09 August 16
Thanks, I didn't have anything in mind. I just saw RGAS had various output formats and wondered if there was a way I hadn't heard of yet. POKEing the bytes makes sense and would be slow.

Also thanks for the 8BP heads up. This looks like an interesting project with sprites, in game music, collision detection and more already developed all using RSX extensions. Using translate I see that there are plans for scrolling. If this works out, I would like to try and make a game with this tool.

Are any of the 8BP team members here? Any plans for versions in other languages?
Title: Re: Retro Game Asset Studio BETA
Post by: AMSDOS on 09:41, 09 August 16
Cheers, it's being interesting reading the little M$ earlier in this thread.  :laugh:
Title: Re: Retro Game Asset Studio BETA
Post by: fgbrain on 10:32, 09 August 16
Is it only me? When I run latest  RGAS.EXE I get this error:  (win XP)



Title: Re: Retro Game Asset Studio BETA
Post by: EgoTrip on 10:48, 09 August 16
Quote from: fgbrain on 10:32, 09 August 16
Is it only me? When I run latest  RGAS.EXE I get this error:  (win XP)

I'm not getting that error on Windows 8.1
Title: Re: Retro Game Asset Studio BETA
Post by: EgoTrip on 10:52, 09 August 16
It wont open older projects.
Title: Re: Retro Game Asset Studio BETA
Post by: lachlank on 21:26, 09 August 16
Quote from: fgbrain on 10:32, 09 August 16
Is it only me? When I run latest  RGAS.EXE I get this error:  (win XP)


Hi, I haven't got an XP machine to try it on, but it should work OK. Most likely .Net framework 4.0 is not installed, see here to install: Installing the .NET Framework 4 on Windows XP | .NET Blog (https://blogs.msdn.microsoft.com/dotnet/p/dotnet4xp/)
Title: Re: Retro Game Asset Studio BETA
Post by: lachlank on 21:27, 09 August 16
Quote from: EgoTrip on 10:52, 09 August 16
It wont open older projects.
Hi, I've tried to be careful to keep it backwards compatible, would you be able to send me your file so I can have a look? Email lachlankeown at gmail cheers
Title: Re: Retro Game Asset Studio BETA
Post by: fgbrain on 23:31, 09 August 16
QuoteHi, I haven't got an XP machine to try it on, but it should work OK. Most likely .Net framework 4.0 is not installed, see here to install: Installing the .NET Framework 4 on Windows XP | .NET Blog (https://blogs.msdn.microsoft.com/dotnet/p/dotnet4xp/)

Sorry.. I applied ALL updates of the page you linked, restarted PC etc but I get exactly the same message... :o
Title: Re: Retro Game Asset Studio BETA
Post by: lachlank on 02:13, 10 August 16
Quote from: fgbrain on 23:31, 09 August 16
Sorry.. I applied ALL updates of the page you linked, restarted PC etc but I get exactly the same message... :o
Weird... I'll try and find an XP VM to run it on. Perhaps try running as administrator if not already??
Title: Re: Retro Game Asset Studio BETA
Post by: lachlank on 23:36, 10 August 16
Quote from: fgbrain on 10:32, 09 August 16
Is it only me? When I run latest  RGAS.EXE I get this error:  (win XP)
Hello, I managed to run up a Windows XP vm to test with, and you are right it doesn't work for some weird reason. This is related to the post-build merge I run, which merges all the .dlls into the .exe to make it a nice clean single file.


If you download, unzip, and run the attached it should work OK under XP.
Title: Re: Retro Game Asset Studio BETA
Post by: EgoTrip on 17:35, 17 August 16
Here's another suggestion:

Could you add an option to export palette to code, being able to choose between both firmware and hardware values?
Title: Re: Retro Game Asset Studio BETA
Post by: jjaranda13 on 18:51, 26 September 16
hi morri


i am jose javier (8BP creator), i will start to translate the manual to english. Although english is more popular, i wanted to share the documentation first in spanish because a lot of times  spanish people do not have quality documentation in their language. I suffer it when i was younger (and worse in english).


However, now 8BP is very complete. it is time to translate the documentation to english (even other languages) . I will do


if someone wants to help, is welcome


regards
Title: Re: Retro Game Asset Studio BETA
Post by: Morri on 19:21, 26 September 16
Hi @jjaranda13 (http://www.cpcwiki.eu/forum/index.php?action=profile;u=1880)
I actually took the liberty of using a translating tool to translate the manual into english just this weekend. I've uploaded it to here (http://www.megafileupload.com/kcb0/8bp_v025.es.en.docx).

Perhaps you could have a read through and make sure it has been translated correctly.

Your project 8bp looks extremely interesting and I am looking forward to one day having a go at learning how to use it. If I get the chance and time, I would love to make a game with it.

I think you need to open a new thread here and maybe share what 8bp is capable of, and to take questions etc...

Cheers,
Title: Re: Retro Game Asset Studio BETA
Post by: jjaranda13 on 08:01, 27 September 16
great!!!


i am reading your translations and i am making corrections. As an starting point it is really good


after a first initial review, i will upload it at github, in order to provide a english "draft" translation, but i will refine it untill become perfect


i will open a thread as you have suggested


thanks a lot, Morris!
Title: Re: Retro Game Asset Studio BETA
Post by: jjaranda13 on 10:09, 27 September 16
hi


8BP first draft english version uploaded to github GitHub - jjaranda13/8BP: 8 bits de poder ( 8 bits of power) (https://github.com/jjaranda13/8BP)


thread created
8BP (http://www.cpcwiki.eu/forum/programming/8bp/)


regards

Title: Re: Retro Game Asset Studio BETA
Post by: a13x15 on 18:19, 06 September 17
Hi,
not sure if this is the right place to post this.

I have some problems running RGAS under linux (ubuntu 16.04 desktop, i3 wm) with mono. It runs just fine the first time, but if I close and open it again I get:


System.Xml.XmlException: Unexpected XML declaration. The XML declaration must be the first node in the document, and no white space characters are allowed to appear before it. Line 11, position 9.
  at System.Xml.XmlTextReaderImpl.Throw (System.Exception e) <0xb149a9c0 + 0x0007f> in <filename unknown>:0
  at System.Xml.XmlTextReaderImpl.Throw (System.String res, System.String arg) <0xb144cc70 + 0x0009b> in <filename unknown>:0
  at System.Xml.XmlTextReaderImpl.ParsePI (System.Text.StringBuilder piInDtdStringBuilder) <0xb144c6f8 + 0x0011b> in <filename unknown>:0
  at System.Xml.XmlTextReaderImpl.ParsePI () <0xb144c6c8 + 0x0001b> in <filename unknown>:0
  at System.Xml.XmlTextReaderImpl.ParseElementContent () <0xb412a498 + 0x000b3> in <filename unknown>:0
  at System.Xml.XmlTextReaderImpl.Read () <0xb70bc2e0 + 0x00043> in <filename unknown>:0
  at System.Xml.XmlTextReader.Read () <0xb70bc2c0 + 0x00016> in <filename unknown>:0
  at System.Xml.XmlWriter.WriteNode (System.Xml.XmlReader reader, Boolean defattr) <0xb4131288 + 0x002fb> in <filename unknown>:0
  at System.Xml.XmlReader.ReadOuterXml () <0xb41306b8 + 0x00146> in <filename unknown>:0
  at System.Configuration.SectionInfo.ReadData (System.Configuration.Configuration config, System.Xml.XmlReader reader, Boolean overrideAllowed) <0xb4130220 + 0x0025b> in <filename unknown>:0
  at System.Configuration.SectionGroupInfo.ReadContent (System.Xml.XmlReader reader, System.Configuration.Configuration config, Boolean overrideAllowed, Boolean root) <0xb412fbe8 + 0x002a1> in <filename unknown>:0
  at System.Configuration.SectionGroupInfo.ReadData (System.Configuration.Configuration config, System.Xml.XmlReader reader, Boolean overrideAllowed) <0xb4134218 + 0x0005b> in <filename unknown>:0
  at System.Configuration.SectionGroupInfo.ReadContent (System.Xml.XmlReader reader, System.Configuration.Configuration config, Boolean overrideAllowed, Boolean root) <0xb412fbe8 + 0x002a1> in <filename unknown>:0
  at System.Configuration.SectionGroupInfo.ReadRootData (System.Xml.XmlReader reader, System.Configuration.Configuration config, Boolean overrideAllowed) <0xb412fb98 + 0x0003f> in <filename unknown>:0
  at System.Configuration.Configuration.ReadConfigFile (System.Xml.XmlReader reader, System.String fileName) <0xb70bbfd0 + 0x001c7> in <filename unknown>:0
  at System.Configuration.Configuration.Load () <0xb70b7a28 + 0x000f3> in <filename unknown>:0
  at System.Configuration.Configuration.Init (IConfigSystem system, System.String configPath, System.Configuration.Configuration parent) <0xb70b7550 + 0x0017b> in <filename unknown>:0
  at System.Configuration.Configuration..ctor (System.Configuration.InternalConfigurationSystem system, System.String locationSubPath) <0xb70b6da0 + 0x0012b> in <filename unknown>:0
  at System.Configuration.InternalConfigurationFactory.Create (System.Type typeConfigHost, System.Object[] hostInitConfigurationParams) <0xb70b62f8 + 0x0006b> in <filename unknown>:0
  at System.Configuration.ConfigurationManager.OpenMappedExeConfiguration (System.Configuration.ExeConfigurationFileMap fileMap, ConfigurationUserLevel userLevel) <0xb144c4e8 + 0x000a4> in <filename unknown>:0
  at System.Configuration.CustomizableFileSettingsProvider.LoadProperties (System.Configuration.ExeConfigurationFileMap exeMap, System.Configuration.SettingsPropertyCollection collection, ConfigurationUserLevel level, System.String sectionGroupName, Boolean allowOverwrite, System.String groupName) <0xb144c118 + 0x0003b> in <filename unknown>:0
  at System.Configuration.CustomizableFileSettingsProvider.GetPropertyValues (System.Configuration.SettingsContext context, System.Configuration.SettingsPropertyCollection collection) <0xb14ea4a0 + 0x00183> in <filename unknown>:0
  at System.Configuration.LocalFileSettingsProvider.GetPropertyValues (System.Configuration.SettingsContext context, System.Configuration.SettingsPropertyCollection properties) <0xb14ea478 + 0x00021> in <filename unknown>:0
  at System.Configuration.ApplicationSettingsBase.CacheValuesByProvider (System.Configuration.SettingsProvider provider) <0xb14e9f78 + 0x001f5> in <filename unknown>:0
  at System.Configuration.ApplicationSettingsBase.GetPropertyValue (System.String propertyName) <0xb14e9d30 + 0x0006f> in <filename unknown>:0
  at System.Configuration.ApplicationSettingsBase.get_Item (System.String propertyName) <0xb14e9ca0 + 0x00043> in <filename unknown>:0
  at RGAS.My.MySettings.get_FormSettings () <0xb14e9c50 + 0x00019> in <filename unknown>:0
  at RGAS.BaseForm.BaseForm_Load (System.Object sender, System.EventArgs e) <0xb1478230 + 0x00037> in <filename unknown>:0
  at (wrapper delegate-invoke) <Module>:invoke_void_object_EventArgs (object,System.EventArgs)
  at System.Windows.Forms.Form.OnLoad (System.EventArgs e) <0xb14780b8 + 0x00062> in <filename unknown>:0
  at System.Windows.Forms.Form.OnLoadInternal (System.EventArgs e) <0xb1477e90 + 0x00078> in <filename unknown>:0


In my case deleting the file ~/.local/share/RGAS.exe_Url_66945a5eacd08a9182e6ef7e164e5561cc1e6834/user.config (the actual hash will depend on the RGAS executable path) allows me to run the program again.

Tried with both 1.2.2 (bundled with CPCTelera) and 1.2.5.

Anybody knows the proper way to fix this?


TIA

EDIT:

I forgot to include the offending file:


<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <configSections>
    <sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
      <section name="RGAS.My.MySettings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requ
irePermission="false" />
    </sectionGroup>
  </configSections>
  <userSettings><RGAS.My.MySettings>
  <setting name="RecentFiles" serializeAs="Xml">
    <value>
      <?xml version="1.0" encoding="utf-16"?>
<ArrayOfString xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3
.org/2001/XMLSchema-instance" /></value>
...


Note the unescaped <?xml version="1.0" encoding="utf-16"?> in RecentFiles's value.
Title: Re: Retro Game Asset Studio BETA
Post by: lachlank on 00:15, 07 September 17

Hi, I would say you are spot-on correct that the <?xml  tag in the middle of the xml file is the issue. The question is, why is it getting written there? That user config file gets written automatically by the .Net Framework at application close (hence why you don't see the error first time), and read at app startup.


You are running Mono so I would have to say it looks like an issue with the way Mono is writing the config file. Last time I tested on Linux it ran fine, but I can't remember what version of Linux that was, or which version of Mono for that matter.


All I can suggest is that you try upgrading/downgrading Mono to a different version to see if it has been fixed.


Lachlan





Quote from: a13x15 on 18:19, 06 September 17
Hi,
not sure if this is the right place to post this.

I have some problems running RGAS under linux (ubuntu 16.04 desktop, i3 wm) with mono. It runs just fine the first time, but if I close and open it again I get:
...
Title: Re: Retro Game Asset Studio BETA
Post by: a13x15 on 06:19, 07 September 17
Quote
You are running Mono so I would have to say it looks like an issue with the way Mono is writing the config file.

Yes, it seems a mono issue. I have tried running RGAS with wine and I can open/close it without problems. Unfortunately under wine the toolbar icons disapear as I move the mouse pointer over them.


Thanks for taking the time to answer, and for RGAS.
Title: Re: Retro Game Asset Studio BETA
Post by: Joseman on 14:58, 07 November 17
Hi

Anyone knows how to set the color transparent to ink 15 (for example) instead of 0? Rgas seems to generate always the lookup table for color 0!

Good program @lachlank (http://www.cpcwiki.eu/forum/index.php?action=profile;u=133) by the way!

p.s.:maybe is a good option to generate the sprite with: mask,sprite data, mask, sprite data... for masked sprites?

Title: Re: Retro Game Asset Studio BETA
Post by: Redbug on 10:06, 27 February 20
I like this application.
But don't work with mono on macOS catalina :(


Do you have a new version in the pipe ?
Powered by SMFPacks Menu Editor Mod