We need at least one kind of enemy to test damaging the player.
I'm not sure what species, maybe evil kangaroos or gophers?
It would at least need walk, maybe idle and a death animation.
Instead of storing them as a custom struct, we could simply parse them as a regular actor and use the standard copy constructor (with type name functionality)
To establish a kind of 3d-feel we can use slow scrolling background images.
The scrolling speed depends on the size of the image. It always reaches the rectangular borders of the map. The smaller the image, the slower the scrolling and vice versa.
Since this simple method of the effect depends on the map borders, the camera should be restricted to those (yet to be implemented!)
This kind of background should be implemented in the .tmx file via an image layer with the custom "PARALLAX" property set to true.
For a proper game we definitely need sound which plays when certain circumstances meet (get hurt by enemies, jump, land, bark)
Sounds are packed as events, so it's probably wise to bundle them with other events via the "Multi event"
A "While event A, do event B" event would be awesome, so a sound can stop if an event aborts preemtively
The option to make the sounds volume and pan positionally dependant would also be great
When all possible sound events get parsed, an extra class should be instructed to load and hold the files
The loaded sound file itself shouldn't be bound to the event, the event should only point at it
Music works the same way, only difference should be the repeat option and maybe the option to set a starting music in the custom properties of the mapfile itself
To make player interaction easier, plain tiles should have, just like actors, a kind of type associated with them.
To match their actor counterparts, tile types should be stored as a plain string var
The "cause" value of events holds tile ids, so that extraction of tile types is possible
Also add a method extracting type of tile id, no matter if its actually an actor or a tile
These steps should make the implementation of "slippery" tiles, deadly spike or fire, etc. much easier.
Currently either the types are hardcoded enums which a user can't expand by themselves, but they are running reasonably fast, or the types are plain strings which can be introduced via the Tiled GUI, but run slower. We need a solution in between!
Con String: its slow
Con Enum: You can't print readable output (it only says "animation state: 3" or so) and a end user can't introduce new types without touching code
Better would be a slim class which mainly acts like an enum(no string comparisions) but has a lookup function for spitting out its "real" name for debugging purposes. The type names could be either introduced via a text file or dynamically while parsing the map file.
The heart of the game logic will propably reside in these events so beware
We need an event class which somehow can hold all types of possible events which can be exectued by the corresponding actors ingame (will inheritance help me here?)
Every actor needs some kind of event pipeline which it processes with each update call
Each event needs a variable which stores its priority; needed for correct event execution order
Every actor action should be event based, even the most basic stuff like walk right
Create a function which checks for colission of an actor with the surrounding tile hitboxes and returns a vector of const references to the colliding tiles
Create a function which checks for colission of an actor with another actor and returns a vector of const references to the colliding actors
This is important to get those actors finally walking
We need some kind of collectible to test the colission with the player.
The choice is up to you :-)
It would be great if it could have an idle animation and/or pickup animation.
The second fastest layer should be various trees to enhance the impression of depth.
Different exemplars of the ten most common Australian trees. Acacia, for example, and eucalyptus, of course. This layer runs a little slower, so details are more important. I'd like to see some fun detail. Birds, for example. A Cockatoo here and there... such things.
Specifications: - Look: Common Australian trees, in different variations, preferably without much repetitions.
Complemented with cute funny details. - Size: 7000 x 1800 px - Format: png
The fastest moving layer should be tall grass and little bushes passing behind the player.
Typical grass as a good reference to the Outback. Spinifex for example. ๐บ
Trees belong more on layer 2 and 3, which is why we prefer small, dense plants here.
Specifications: - Look: Spinifex Grass or similar looking. Dried-up grass and fresh green. Mixed. - size: 12000 x 2000 px - format: png
Trees further away are to be drawn on this layer.
The scroll speed is slower, but the trees are also smaller.
That's why the details aren't so important.
Basically the same tree types as on layer 2, but smaller.
Interrupted by grassy plains and sandy areas.
Specifications: - Look: Common Australian trees, grassy plains, sand, some rocks and stones. If possible create an illusion of depth, a view into the far distance. - Size: 4500 x 1500 px - Format: png
Instead of a bool indicating if the event's processed, the event could return a enum which can also tell if the next event should also be processed or if the event processing should stop here.
The default signal should also be parsed (and if not it should be probably "next")
For our major game logic to happen, we need a handful of events which wrap other events and trigger them if a certain condition is met. For example:
"Play Sound X as long as event Y doesn't abort"
After collision -> Trigger event X if the cause(tile or actor) is of type Y, else trigger Z
If event X runs successfully trigger Y else if event Z... else, and so on
This means we need a couple of events:
While Event
As long as event x runs, also run event y afterwards. If x aborts preemtively, also abort y.
If, Elseif, Else Event
Simply chain events together via If, Elseif and Else. A Successful completion means true, abort means false, next means that no evaluation happens. (But there should also be an option so that next means false as long as no evaluation can happen (so the else and elseifs could be triggered sooner))
If Type ==, Elseif Type ==, Else Event WIP Name
First implement a "isType" Sub event which successfully ends when the cause matches the given String type, else return abort
Then we can use the "normal" If, Elseif, Else Event and use the "isType" as condition for the Ifs and Elseifs
This is made possible because all kinds of multi events, (including logic events since these also hold other events) inherit the cause object of the "mother event".
The slowest layer should be reserved for things on the horizon. Mountains and hills. Everything that makes up the real Australian horizon. Even the sky and a few little happy clouds too.
Specifications:
Look: Mountains in the far distance, with sky, clouds, some birds drawn in a suggestive way.
Currently the collision methods bug out when the rect width or height is below the pixel step
(about 10px with a maximum actor speed of 500px per second), fix that with a better algorithm!
The performance is probably als not as good as it could be
Bugs when actors are partly or completle outside of map boundaries