Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / Media checker

Author
Message
JimHawkins
14
Years of Service
User Offline
Joined: 26th Jul 2009
Location: Hull - UK
Posted: 17th Dec 2014 17:49
This is just a proof-of-concept program which will do some elementary checking on the files you specify in your code against the files you have in your media folder.

If you think this is useful I will make it a lot more sophisticated.

Possibilities are:

* Check WAV files for compliance
* Check over-sized images
* Open project file and scan all includes
* Do C++ and Pascal projects in the same way

I thought i'd do this while I had an hour waiting to pick somebody up from hospital, since loads of errors seem to be file errors.

Should I make this a proper program?

-- Jim - When is there going to be a release?

Attachments

Login to view attachments
paulrobson
9
Years of Service
User Offline
Joined: 22nd Nov 2014
Location: Norfolk, England
Posted: 17th Dec 2014 19:30
Isn't there a requirement (or an advantage) in having the image sizes as powers of 2 as well ?

Something also worth considering is a warning for mixed case filenames. Because Windows doesn't differentiate, and Android does, this can cause errors - I'm inclined to have *all* file names l/c, alphanumeric and underscore names.
Conjured Entertainment
AGK Developer
18
Years of Service
User Offline
Joined: 12th Sep 2005
Location: Nirvana
Posted: 17th Dec 2014 19:42 Edited at: 17th Dec 2014 20:02
Quote: "Isn't there a requirement (or an advantage) in having the image sizes as powers of 2 as well ?"

I was going to suggest the same thing.
I copy/paste a lot when working on 2d sprites, and I just realized the other day that one of my game's sprites had 74x74 pixel images instead of 64x64. It seems that I had hit the 7 instead of the 6 on that first image and didn't catch that before using it for a base. Having those images the right size is going to be important for the end product to avoid padding them, thus creating larger files to load. Those 74x74 would have been padded to 128x128, which is 4 times the size of a 64x64. Big difference!(yeah, yeah, I should be using a sprite sheet instead of separate, I know, but I can make that after I finish polishing the game)

Your other suggestion was a good one as well paulrobson. I still use my 'all lower case with underscore separators' rule from back in the day. While some of the new systems opted to include the other stuff, some legacy systems still use the old rules. I never saw the need for more either. Of all the things Windows could have improved on back in the day, uppercase file names would have been a lot lower on the priority list for me too.

This would be helpful for people to avoid common problems encountered by new users.

Good ideas guys.     -             -             -    

JimHawkins
14
Years of Service
User Offline
Joined: 26th Jul 2009
Location: Hull - UK
Posted: 17th Dec 2014 21:26
I'll add some asset checking, if people want it.

It already warns if file names are not correct. I would not want to impose some rule that file names must be lower case. That's up to programmers.

-- Jim - When is there going to be a release?
george++
AGK Tool Maker
16
Years of Service
User Offline
Joined: 13th May 2007
Location: Thessaloniki, Hellas
Posted: 17th Dec 2014 21:31
Quote: "Should I make this a proper program?"

Definetly yes!
JimHawkins
14
Years of Service
User Offline
Joined: 26th Jul 2009
Location: Hull - UK
Posted: 17th Dec 2014 23:30 Edited at: 17th Dec 2014 23:33
Yiasou!

As I said, this is a one-hour program. I could make it fix up the file names in the source, for example.

The parsing is as primitive as you would expect for a quick-and-dirty look at the problem. Tomorrow I'll make it a bit more sophisticated!

I'm happy to share the Delphi source, but if you want some seriously good stuff I won't be able to because I'll use some commercial components.

-- Jim - When is there going to be a release?
JimHawkins
14
Years of Service
User Offline
Joined: 26th Jul 2009
Location: Hull - UK
Posted: 19th Dec 2014 16:28
Okay - I've added:

* Check images for non-compliance
* Saving paths

I'll add the WAV file format checks in later today, and auto-edit case sensitivity with save file option.

Anything else?

Picture of a run attached.

-- Jim - When is there going to be a release?

Attachments

Login to view attachments
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 19th Dec 2014 17:04
Looks really nice Jim, I'll definitely use this tool to check my projects before submission. Thanks a lot for sharing!
JimHawkins
14
Years of Service
User Offline
Joined: 26th Jul 2009
Location: Hull - UK
Posted: 19th Dec 2014 22:42
I'll post a V1 tomorrow (Saturday)

-- Jim - When is there going to be a release?
JimHawkins
14
Years of Service
User Offline
Joined: 26th Jul 2009
Location: Hull - UK
Posted: 20th Dec 2014 00:44 Edited at: 20th Dec 2014 01:14
What are your views on "automatic" correction?

I can easily correct case errors in the source and give you the option to save it.

I can convert 32-bit float WAV audio to PCM.

Would you want these, or just a report?

-- Jim - When is there going to be a release?
JimHawkins
14
Years of Service
User Offline
Joined: 26th Jul 2009
Location: Hull - UK
Posted: 21st Dec 2014 23:12
Slightly behind schedule because of commands from on high involving things like shopping and making Christmas cake.

Apologies for that, but then you all finished your game when you said you would, didn't you?

-- Jim - When is there going to be a release?
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 22nd Dec 2014 09:14
Nobody's complaining Jim, it's great to get useful tools like this no matter how long they take. Besides you're faster than most

It would be great if your tool could convert audio into the correct format as well as just tell you it's wrong in my opinion. As for code correction the compiler is pretty good for that these days particularly if you use option explicit. Seems like a lot of extra work which isn't really necessary. Others might disagree.
JimHawkins
14
Years of Service
User Offline
Joined: 26th Jul 2009
Location: Hull - UK
Posted: 22nd Dec 2014 10:05
Audio conversion from 32-bit float to 16-bit PCM is in!
Auto-correct case errors in scripts is in.

Should be ready today or tomorrow.

-- Jim - When is there going to be a release?
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 22nd Dec 2014 11:18
Superb! Thanks Jim
JimHawkins
14
Years of Service
User Offline
Joined: 26th Jul 2009
Location: Hull - UK
Posted: 23rd Dec 2014 19:20
Shoppers, traffic, arguments - that's Xmas. Roll on Easter.

Attached a beta of the media scanner for you to test.

NOTES:

* There are no help files yet, because things may change.

* This is currently T1-only (I will add T2 and Pascal over Xmas period).

* This does not assume that the media folder is off the source folder, because it may not be.

* There are two modes of scanning. If you open an AGC file it will parse the references and if you select automatic case correction if will correct the cases for you. Then it will scan REFERENCED files (those in your AGC file) for potential errors (image dimensions, audio format).

* If you have Correct WAV file errors ticked in Options menu it will automatically convert 32-bit float files to 16-bit integer format. Because this is beta it will prepend "C" the the converted files. This will be optional later.

* The report save will save your report to the source file folder. This may be useful for external correction.

* If you use programmatic file loading with automatic numbering the first scan will not be able to parse that. Consequently, you can scan the files in the media folder directly for file errors.

* The audio conversion may require some dithering. The source to MediaScan is currently generic Delphi, and can be open-sourced. I can add massive amounts of advanced conversion, but that will require custom code by my Chinese programmer, and could not be published.

This program requires no dependencies and can be run from the zip file. Please try it and give me feedback here. When we're all happy I will ask for it to be added to the TGC download system.

As I'm old enough, if not fat enough, to be Father Christmas, may I at least say that if you are in a post-Christian culture and are having a holiday, enjoy it. Best wishes - Jim

-- Jim - When is there going to be a release?

Attachments

Login to view attachments
george++
AGK Tool Maker
16
Years of Service
User Offline
Joined: 13th May 2007
Location: Thessaloniki, Hellas
Posted: 23rd Dec 2014 21:18
Γειά σου Jim!
I've already used it for my project FOGY.
Ευχαριστώ πολύ!
JimHawkins
14
Years of Service
User Offline
Joined: 26th Jul 2009
Location: Hull - UK
Posted: 23rd Dec 2014 22:32
George Παρακαλώ

-- Jim - When is there going to be a release?

Login to post a reply

Server time is: 2024-04-19 10:42:35
Your offset time is: 2024-04-19 10:42:35