Can't delete useless junk from my game!

Started by SmashManiac, Sat 03/01/2004 08:55:24

Previous topic - Next topic

SmashManiac

Ok, so this is my first post. I've played with AGS since last month and just encountered a really annoying problem.

Ok, well, this sounds stupid, but I was trying to develop a template and I'm not able to delete some things I manually added:

- Inventory items
- Dialogs
- Views
- Characters
- Cursors
- Fonts

If that was not enough, I'm not able to delete some global variables created with the interaction editor. There's also that "Global 1" variable that I absolutely don't know if AGS uses it for something and if its safe to remove it... once I find HOW to remove it.

I'm sure all those are really easy to erase... when you know it. I won't even be surprised if I say "This is so easy, why didn't I think of it?" or something like that, but I've tried many things, searched in the help file and on the forums, and found nothing except "How to CREATE dialogs, cursors, characters, etc."

I'm using ver. 2.60

BTW I suppose it's possible to use more than 10 cursors in AGS in the scripts even if in the interaction editor there's only Usermode1 and Usermode2?

Phemar

Basically out of that list you gave there,  the only things I've discovered how to delete are fonts, guis, rooms, sprites and things off the parser.

Hope this helps!

Ishmael

You cannot delete those things. You can get rid of fonts by resetting them. CJ has said (if I remember right)  that if he'd include the possibilty to delete character, views, dialog topics, someone would ofcource mess their game, and come here asking "what is the problem when I try to run my game but ít crashes all I did was deleted rogers view???"

So you just can't. Atleast not yet.
I used to make games but then I took an IRC in the knee.

<Calin> Ishmael looks awesome all the time
\( Ö)/ ¬(Ö ) | Ja minähän en keskellä kirkasta päivää lähden minnekään juoksentelemaan ilman housuja.

SmashManiac

Quote from: TK on Sat 03/01/2004 11:47:23
You cannot delete those things. You can get rid of fonts by resetting them. CJ has said (if I remember right)  that if he'd include the possibilty to delete character, views, dialog topics, someone would ofcource mess their game, and come here asking "what is the problem when I try to run my game but ít crashes all I did was deleted rogers view???"

So you just can't. Atleast not yet.

Wh-wh-wh-WHAT? Geez... now that's not cool at all, but I understand. (Thanks for the font tip!)

Oh well, guess I'll do with it. Hey, it's free!!!

Archangel (aka SoupDragon)

#4
Quote from: SmashManiac on Sat 03/01/2004 18:30:30
Oh well, guess I'll do with it. Hey, it's free!!!

Hehe it's so refreshing to hear someone say that for a change! Anyway, I think the idea, Smash, is that unused sprites don't take up much space neither do they cause slowdown, so allowing you to delete them would probably cause more problems than it would solve.

Happy AGSing ^,^

Hollister Man

The other option for sprites is to create an image that says "Replace me" or something, so that you KNOW that it can be overwritten.  Then just import over that sprite when the time comes.  Just keep track of what you are using, and it will work for everything you mentioned.  It doesn't really take up any additional time to do so, in my experience.

Perhaps someone with a copy of the older versions (back when CJ implemented delete options) could make a template with the maximum of blankness, but it isn't REALLY needed. Everything can be overwritten, AFAIK.

That's like looking through a microscope at a bacterial culture and seeing a THOUSAND DANCING HAMSTERS!

Your whole planet is gonna blow up!  Your whole DAMN planet...

Dorcan

#6
The only way to delete all dialog Topics, is to clic on replace from file and select the blank dialog file previously created from a new blank game...
So, if you just want to add a topic, or an option, to test, just remember to export dialogs so you can undo your changes  ;D!

James Kay

Maybe it'd be cool to have a "deletable" option in the main settings (or rather an "expert user" on/off setting)..
I can see why AGS was written the way it was - to make it pretty foolproof, but for more experienced coders and people with a general grasp on what they're doing, not being able to delete stuff is a real pain. And all these roundabout ways of circumventing that is, well, ridiculous.

On the other hand, with today's connection speeds, an extra few K on a download isn't going to kill anyone, really...but personally I'm just really anal and don't want stuff I don't use cluttering up the game (it's obsessive compulsive).

Scorpiorus

#8
QuoteMaybe it'd be cool to have a "deletable" option in the main settings (or rather an "expert user" on/off setting)..
I remember something like this was already suggested some time ago.

QuoteOn the other hand, with today's connection speeds, an extra few K on a download isn't going to kill anyone, really...
Well, sprites take up the most of the space but we can delete them already.

I noticed AGS became more spotting on deleting things, so for example, you can't delete a sprite if it's used in a view or for cursor graphics. Text script is another matter as it's impossible to check all the referenced resource data at design time.

~Cheers

James Kay

The best feature would be and option like:
delete unused (sprites/fonts/scripts)
but I can't even begin to imagine the pain and headache this would be to program.

Wattshout

Quote from: James Kay on Wed 07/01/2004 12:23:03
The best feature would be and option like:
delete unused (sprites/fonts/scripts)
but I can't even begin to imagine the pain and headache this would be to program.

That would be cool. In my line of work, I use AutoCAD. It has a command named "purge" which delete from the drawing all (or filtered) unused items and data. At time you can take a 5megs drawing and bring it down to 800k, just because of all the things you inserted just to delete it 2 days later.

Many times I wished more programs had this feature.

Gilbert

Well this can be a dangerous feature and I don't think it's worth taking the risk in inplementing it.
The reason is, for it to correctly determine whether a say, sprite, is unused or used, it must also scan in the scripts, which in some cases, may contains things like calling a function with a variable holding the sprite number, or even calculating a sprite sprite number to use via a formula, etc., which is impossible to be analysed correctly.

Ben

Well, what if the editor left a blank space where the sprite is, but left the index? Wouldn't that solve the problem of scripts calling sprite numbers that don't exist?

Scorpiorus

#13
I suppose the function needs an actual bitmap image and the sprite number is just a reference to one. But even if it wouldn't crash what should it display instead?

EDIT: imo, the error message (saying the sprite that doesn't exist) is the most suitable mean to handle these kind of faults.

~Cheers

Gilbert

Actually even that, it's just a solution past crashes, still it would become even more annoying if you really need to use a sprite in your script (since it would display something you didn't expect). Moreover, this kind of cleaning functions, if existed, will be mostly used near the final stage of creating a game, in which case you'll mostly likely to release a game with graphics glitch (if it's not well spotted in final tests, and even if you spotted it, it can also be quite annoying yto import the sprites back).

I think it's safer and better to let the game maker himself to determine which resource is redundent, and remove/replace it one by one himself, as there SHOULD NOT be that many such useless junks in your game if you planned your game nicely.

Scorpiorus

Furthermore, again since that cleaning routine would be unable to check the sprites in script there is no sprite it the database that can be considered unused for sure.

I still like the idea to be able to delete everthing you want as long as that option is hidden under user/expert mode or something.

~Cheers

Pumaman

The main problem is things that are referenced by number (eg. dialog topics, views, GUIs, cursors etc). I have been gradually changing these to have textual names (which GUIs and views now support) so that I will be able to add support for deleting them.

The other option that has been discussed is some sort of "reset" option for things like views and characters, which would leave the view there but simply blank out all its loops and frames, or for a character reset all its options to the default state.

However, I'm generally very cautious about adding Delete functionality - when it was added for sprites it has caused several problems since with people deleting things that they were still using.

SmashManiac

Quote from: Pumaman on Sat 10/01/2004 20:08:06

However, I'm generally very cautious about adding Delete functionality - when it was added for sprites it has caused several problems since with people deleting things that they were still using.


That's the USER's problem! As long there's no accidental deleting possibility, the problem you mentionned should not be a problem for an attentive user.

Ishmael

QuoteThat's the USER's problem!

Yeah, it is, but as there are users who do not realize this every time they are about to delete something, it caused problems.

I once screwed up my spriteset (don't remember how...), AGS crashed every time I tried to see a view which used sprites, that didn't exists, as I had place the default spriteset (from a blank game) on the game folder. Even after I had re-imported my sprites to the game, AGS crashed, because I didn't have all the sprite numbers that the views used. Thus, sometimes, if I selected a view that had used the sprites that didn't exist, I got a load of warnings, and eventually the crash. This way I was able to replace the frame sprites with the proper ones. Also, my GUIs looked really wierd, as for ex. the text window had one of the main char's walking frames as a border image.... that looked fun... but after I got the sprites back in order, AGS and my game ran normally. After that I have been careful about messing with the game data files in other programs.........
I used to make games but then I took an IRC in the knee.

<Calin> Ishmael looks awesome all the time
\( Ö)/ ¬(Ö ) | Ja minähän en keskellä kirkasta päivää lähden minnekään juoksentelemaan ilman housuja.

Pumaman

Quote from: SmashManiac on Sat 10/01/2004 21:15:11
That's the USER's problem! As long there's no accidental deleting possibility, the problem you mentionned should not be a problem for an attentive user.

It is the user's problem, yes. However, even with the warning message that the Delete Sprite option has, a surprising number of people were managing to accidentally delete things, because they forgot that the sprite was used by one of their inventory items, and so on.

In a way it's a case of a minority spoiling it for the majority - but as I say, I am looking into ways to add deletion support to other parts of the game.

SMF spam blocked by CleanTalk