5 Looks like my code decoder never had exception decoding implemented. I will
6 need to think of a way to make it so that the exception table is decoded and
7 where jump targets are calculated. Makes me wonder how different exception
8 handling is. Well, throwing has to be handled such as going out of the method
9 and such. I would also probably need an exception register that specifies that
10 an exception was thrown. After each method call, I might have to check for an
11 exception, but that would be costly. Maybe what I can have is an exception
12 return point. Say if an exception occurs, jump to an address in a given
13 register. Well basically there would be the exception register then this
14 address register. If the calling method cannot handle the exception in any way
15 then it will just return and use the address of the exception return point
16 rather than the normal return point. Luckily for me, the monitor stuff is
17 handled by the class except for `synchronized`. So I will need to think about
18 this. That would however very likely be the easiest way to go. Then for
19 different exception handling regions, what can be done is that the exception
20 return address can change accordingly to use different tables. These tables
21 can be part of the method for the most part.
25 I keep thinking there is an `AbstractList` or similar that I did not attach
30 For the level tiles in Squirrel Quarrel, I wonder if I should use mega tiles
31 or just have a gigantic single grid. Mega tiles would help in finding the
32 location of objects though. But for an area effect, there could be a sorted
33 tree map lookup of objects based on X or Y position. Also the smaller arrays
34 in the mega tiles would be more cache friendly. Each mega tile can have a
35 chain of units so to speak. But it depends, I can get away with just a single
36 array. A single array would probably much simpler to code and have less
37 objects for the most part. I do wonder though the minimum requirements of
38 the original game. Even with its somewhat complex calculations it has a
39 minimum of 90MHz which is pretty fast. So I can guess that my game will not
40 have much of a requirement if I optimize some things in it. I suppose for
41 simplicity there can just be two height levels and all collisions when it
42 comes to terrain are on single tile sizes. I would still have to handle
43 collision between objects however. I suppose I can use some tricks to
44 optimize it because collision will be a big thing. The only thing however
45 would be path finding. For example some units can squeeze between others and
46 I would need to have it where units that can fit will walk through.
50 Perhaps though that units are limited to a 8x8 space, they may have differing
51 positional offsets, but in the end they could just be limited to that region.
52 So for each 8x8 cell, only a single unit can be inside it (except for say air