Page 1 of 1

Limitations

Posted: May 7th '18, 18:49
by WeirdoYYY
Couldn't find anything related to this. It's a long shot because I don't think it is possible but would there be a way to add in "extra" weapons into Aleph One? I know theoretically you could just use different physics files for a level but you are still limited to the nine slots and having to change how it appears on the HUD would be kind of annoying.

Furthermore, what are the limitations for the amount of bitmaps you could have in a shapes file?

Re: Limitations

Posted: May 8th '18, 07:54
by ravenshining
If you want Anvil or Hackvil to be capable of reading the file, no more than 256 bitmaps per collection and 512 frames per collection. More than 256 bitmaps will crash Anvil badly and more than 512 frames is readable but not editable.

Otherwise, probably 65536 of each is what the file format can store, not sure what A1 and ShapeFusion can access.

Re: Limitations

Posted: May 8th '18, 12:24
by treellama
There are actually 10 weapon slots :) But, there's no way to increase that number currently.

For shapes you are limited to 32 collections, with 8 color tables and 256 bitmaps per collection. There's a limit of 32767 frames per collection but I doubt you'll get there.

Re: Limitations

Posted: May 8th '18, 19:00
by WeirdoYYY
treellama wrote:There are actually 10 weapon slots :) But, there's no way to increase that number currently.

For shapes you are limited to 32 collections, with 8 color tables and 256 bitmaps per collection. There's a limit of 32767 frames per collection but I doubt you'll get there.
Right. Isn't the 10th the ball? How do you use it in single player?

Also another question, is it necessary for physics to be in 256 intervals? Like does a projectiles speed have to be 512 or can it be anything?

Re: Limitations

Posted: May 8th '18, 19:51
by The Man
I’m not sure what you mean about projectile speed, but I’ve definitely got projectiles with speeds a lot slower than 256. One particular level has an enemy that fires projectiles with a speed of 24.

Re: Limitations

Posted: May 8th '18, 20:34
by ravenshining
treellama wrote:For shapes you are limited to 32 collections, with 8 color tables and 256 bitmaps per collection
Project Conflict used more than 256 bitmaps in a collection, that's how I found out about it crashing Anvil but still working in A1. IIRC there is an empty byte in front of the bitmap addresss pointer that ShapeFusion makes use of when you go above 256.
WeirdoYYY wrote:Also another question, is it necessary for physics to be in 256 intervals? Like does a projectiles speed have to be 512 or can it be anything?
The default physics has plenty of examples of shots that move at non=power-of-two speeds and speeds slower than 256. If you keep alien shot and monster speeds to multiples of 16, it will make for cleaner math when the engine adjusts them for difficulty.

Speeds are generally limited to a max of 1024 to ensure they don't skip across the map or cause desync in multiplayer, but Alien Weapon shots in M1 move at 1280 on TC. If you're making a single-player only map, I've had good results with shots up moving to 3072.

Re: Limitations

Posted: May 8th '18, 20:59
by WeirdoYYY
ravenshining wrote:
treellama wrote:For shapes you are limited to 32 collections, with 8 color tables and 256 bitmaps per collection
Project Conflict used more than 256 bitmaps in a collection, that's how I found out about it crashing Anvil but still working in A1. IIRC there is an empty byte in front of the bitmap addresss pointer that ShapeFusion makes use of when you go above 256.
WeirdoYYY wrote:Also another question, is it necessary for physics to be in 256 intervals? Like does a projectiles speed have to be 512 or can it be anything?
The default physics has plenty of examples of shots that move at non=power-of-two speeds and speeds slower than 256. If you keep alien shot and monster speeds to multiples of 16, it will make for cleaner math when the engine adjusts them for difficulty.

Speeds are generally limited to a max of 1024 to ensure they don't skip across the map or cause desync in multiplayer, but Alien Weapon shots in M1 move at 1280 on TC. If you're making a single-player only map, I've had good results with shots up moving to 3072.
Makes sense. Just wanted to be sure.

Re: Limitations

Posted: May 8th '18, 21:02
by The Man
Since we’re talking limitations and ShapeFusion, I might as well inject a completely irrelevant question. When I try to open my shapes file (in the .zip file linked here), I get this weird error message. I think it’s all caused by a 34-character sequence name; it seems to think they should be no longer than 32 characters, and I think that messes up its reading of the rest of the shapes file. (They look like cascading error messages.) I don’t recall doing any hex editing to my shapes file, and I don’t recall having more than 256 bitmaps in any one collection, so I’m not sure why it’s occurring. I’m almost certain I only ever edited it with Anvil. I also assume it’s possible to fix the problem by shortening the offending sequence name, but I have no idea how to do that without corrupting the file. (It’d also be possible to rewrite ShapeFusion to handle longer sequence strings, I suppose; I’m not sure if I’d mess something else up by doing that, either, though.)

Code: Select all

17:08:39: [ShapesSequence] Sequence name too long (34/32)
17:08:39: [ShapesDocument] Error loading sequence... Dropped
17:08:39: [ShapesCollection] Error loading 8-bit chunk... Dropped
17:08:39: [ShapesDocument] Could not find enough collections. This may not be a Marathon Shapes file.
17:08:39: [ShapesDocument] There was an error while loading, see log
(The shapes file is absolutely gigantic, by the way: 49.7 MB, making it by far the largest file in the main project folder. Well, unless you count Aleph One itself, which is close at 46.5 MB. The second-largest file, the map, is currently only 26.8 MB, though it’s probably grown slightly larger since I put a few other levels back in.)

I had no idea the M1 Enforcer shots moved that quickly. That’s faster than the player’s bullets, right? It’s still a kind of interesting contrast with modern games that have hitscan weapons. Most Marathon weapons are pretty fast, but not instantaneous, which necessitates the player to anticipate enemies’ moves. I kind of prefer the Marathon approach, I think; it’s more realistic (though there are plenty of other things about Marathon physics that aren’t realistic, of course).

Re: Limitations

Posted: May 8th '18, 23:29
by treellama
ravenshining wrote:Project Conflict used more than 256 bitmaps in a collection, that's how I found out about it crashing Anvil but still working in A1. IIRC there is an empty byte in front of the bitmap addresss pointer that ShapeFusion makes use of when you go above 256.
I'm not sure I understand how that's possible, given this:

Code: Select all

typedef uint16 shape_descriptor; /* [clut.3] [collection.5] [shape.8] */
and this:

Code: Select all

#define GET_DESCRIPTOR_SHAPE(d) ((d)&(uint16)(MAXIMUM_SHAPES_PER_COLLECTION-1))
So, for instance, a monster's stationary_shape is a shape_descriptor. How would it address a shape higher than 255?

Re: Limitations

Posted: May 8th '18, 23:32
by Wrkncacnter
treellama wrote:How would it address a shape higher than 255?
BAD RAM

Re: Limitations

Posted: May 8th '18, 23:44
by treellama
Wrkncacnter wrote:BAD RAM
/thread