Hi,
Is there an official suggestions forum for the engine? If so, and this is not it, apologies.
I have one request above all others: consistency in the engine.
At the moment things are scattered everywhere; some room-related methods are under the Room object, some are global functions. Objectcount is under Room, but objects are global. Hotspots don't even have a count!
And case (which is sensitive) is all over the place. 'x' and 'y' are lowercase for characters, but uppercase for other things.
What AGS needs is a clearer, friendlier object-oriented structure. This may already be in the pipeline but I thought I'd make the suggestion just in case.
Sincerely
This is more suitable to be posted in the Technical Forum.
Objects are not global, they're all local to rooms. :P
I think the reason hotspot doesn't have a coutn is that there's technically no such thing as whether there's a hotspot created or not. All those room areas (walkbehind, regions, hotspots, walkable areas) are actually stored as bitmaps. For example, the hotspots in a room are actually stored as ONE bitmap in a room file, the colour value of a pixel determines which hotspot that pixel belongs to. If you want to have the hotspot coutn, it's not impossible technically, but that just mean the engine needs to look through the bitmap and check which colours are in-used or not-in-used.
The case problem was because those "x" "y" were kept to retain compatibility with old versions (Only new properties introduced after moving towards OO use "X" "Y" at the moment). You need to know that the script language had been moving towards OO not very long ago, and it's still changing, which would need time to reach perfection.
In fact, things are (slowly) changing, like for example the editor is being rewritten (http://www.adventuregamestudio.co.uk/yabb/index.php?topic=29789.0) at the moment, so the engine may undergo overhaul also, but not in a short time.
Yes, suggestions should be made in the Tech forum, not Beginners Tech. I'll shift it over, but perhaps this could be combined with the 2.8 preview thread Gilbot mentioned?
EDIT: Ah, right. I thought Chris was making internal changes for 2.8, too.
I don't think so, since V2.8 aims mainly on remaking the editor at the moment.
Quote from: Gilbot V7000a on Fri 19/01/2007 02:09:34
Objects are not global, they're all local to rooms. :P
Indeed they are, but they're referenced in the script as 'object
- ' not 'room[n].object
- ', or 'Room.object
- '. That's all I meant. Logically they should be under Room but that would incur more typing. I'm curious to see what the revamped engines does with this.
Quote from: Gilbot V7000a on Fri 19/01/2007 02:09:34
..technically no such thing as whether there's a hotspot created or not... hotspots in a room are actually stored as ONE bitmap in a room file, the colour value of a pixel determines which hotspot that pixel belongs to.
I see your point. Incidentally, is the 'bitmap' stored as a BMP or a PNG?
Quote from: Gilbot V7000a on Fri 19/01/2007 02:09:34
..case problem because "x" "y" were kept to retain compatibility with old versions..script language had been moving towards OO not very long ago... need time to reach perfection.
That's perfectly fine by me. As I said, I thought you were probably on this road already. Just wanted to express some encouragement for good OO design.
Also, if this is the forum for suggestions, I might push my luck and offer a few more 2c beauties.
Some might be completely obselete given the future OO design. For your consideration and amusement:
- FOR loops!
- SWITCH CASE blocks (i.e. Switch (i) { Case 0: break; Case 1: break; } )
- 'break' command, to get out of While loops.
- 'With' statements.
- A greater number of backgrounds for a room.
- The ability to stop the room from auto-changing backgrounds, by setting the delay to -1 perhaps?
- More screen transitions (wipe horizontal/vertical/diagonal, box dissolve, horizontal/vertical slam in, etc)
- A function for detecting the shortest distance between a hotspot area and a given coordinate.
- Ability to delete characters, views, rooms, etc from within editor.
- A button on the script editor to Validate my script immediately.
- Being able to save even if script errors exist (Might want to fix 'em later)
- Auto-complete in the script editor on space. If I type 'cEgo.Vis' I have to press Return to get 'Visible'. If i type space it will leave it as 'Vis' and cause errors. Often you're writing something like 'cEgo.Visible = True' so space is the logical next character, not return. I keep typing space then erasing it and typing it again, because it's instinctual to press space.
- Greater independence amongst object types. You can't give a View the same name as a Character, even though they are separate objects. It's not a scripting problem because Views don't appear in scripts and characters are called c<Name> anyway. It's the editor.
Over and out.
Quote from: Fornax on Fri 19/01/2007 04:55:15
Indeed they are, but they're referenced in the script as 'object[ x ]' not 'room[n].object[ x ]', or 'Room.object[ x ]'. That's all I meant. Logically they should be under Room but that would incur more typing. I'm curious to see what the revamped engines does with this.
You won't know the content of the objects unless that room is loaded into memory, so room[n].object[ x ] practically won't work, unless the room info are loaded at runtime when needed.
Room.object[ x ] makes sence, but the reason was object[ x ] was used for versions, it's just that this hadn't been incorporated into OO yet (like I said, OO-support is not perfect at the moment).
Quote
I see your point. Incidentally, is the 'bitmap' stored as a BMP or a PNG?
I don't know, I just meant it's handled like a raster image, that is, technically, a 2-d array of values, which loosely speaking, a bitmap image.
Quote
- FOR loops!
- SWITCH CASE blocks (i.e. Switch (i) { Case 0: break; Case 1: break; } )
- 'break' command, to get out of While loops.
- 'With' statements.
- A greater number of backgrounds for a room.
- The ability to stop the room from auto-changing backgrounds, by setting the delay to -1 perhaps?
- More screen transitions (wipe horizontal/vertical/diagonal, box dissolve, horizontal/vertical slam in, etc)
- A function for detecting the shortest distance between a hotspot area and a given coordinate.
- Ability to delete characters, views, rooms, etc from within editor.
- A button on the script editor to Validate my script immediately.
- Being able to save even if script errors exist (Might want to fix 'em later)
- Auto-complete in the script editor on space. If I type 'cEgo.Vis' I have to press Return to get 'Visible'. If i type space it will leave it as 'Vis' and cause errors. Often you're writing something like 'cEgo.Visible = True' so space is the logical next character, not return. I keep typing space then erasing it and typing it again, because it's instinctual to press space.
- Greater independence amongst object types. You can't give a View the same name as a Character, even though they are separate objects. It's not a scripting problem because Views don't appear in scripts and characters are called c<Name> anyway. It's the editor.
Over and out.
Actually most of these stuff are already in the to-do list (which was removed from the docs folder since V2.7 I think), some are even in the tracker (http://www.adventuregamestudio.co.uk/tracker.php), you may read more info. and post and show your support if you wish. For example, in fact there WERE 'for' loops before AC V2.14, CJ has yet to add it back, but since you can do it with 'while', it's not of high priority.
Quote from: Gilbot V7000a on Fri 19/01/2007 05:34:19
Quote
I see your point. Incidentally, is the 'bitmap' stored as a BMP or a PNG?
I don't know, I just meant it's handled like a raster image, that is, technically, a 2-d array of values, which loosely speaking, a bitmap image.
Just curious, in terms of space saving.
Quote from: Gilbot V7000a on Fri 19/01/2007 05:34:19
Actually most of these stuff are already in the to-do list
Excellent. Love the tracker. Thanks.
Backgrounds are stored with gif like compression, sprites are stored with RLE compression if enabled. Not amazingly good compression schemes, but effective on graphics with a lot of flat colour and fast. The games still zip down a lot further.
You guys have thought of everything. :)