How to make a basic monster with v0.2.4..
Example monster for reference:
1. Create the Monster's StructureMonsters in Voxatron (and all complex objects) are represented as special folders in the item navigator. The first thing you need to do is set up a folder with at least one animation in it (so that you can see the monster!)
1.1 Create a new item somewhere in the Objects tab, choose a size, and set the type to monster.
1.2 Double click on the monster folder to look inside (it will be empty to start with)
1.3 Create an animation: new item, set type to animation, add some props as frames.
Here's the structure for the armoured pig character in the example level:
I've separated the pig into 3 parts. The limbs are animated as the pig moves (one frame per voxel moved), and the head and body are static. They could have been combined, but later I might want to add optional body armour or some idle movement to the body frame. You can call the animations anything you like. When the monster is drawn, all animations in the root folder are drawn at the monster's position.
The folder structure looks like this:
MONSTER pig guard ANIMATION head PROP frame0 ANIMATION body PROP frame0 ANIMATION limbs PROP frame0 PROP frame1 .. PROP frame5 FOLDER BLAH PROP marker
The 'blah' folder doesn't need to be there, but I used it to make a mock-up of the monster with head,limbs & body combined. If you select the prop inside a monster's folder (or sub-folders), you can the 'Set Marker' button to use that prop in the editor for representing the object. Otherwise the first frame of the first animation is used by default.
Set the Monster's PropertiesNavigate to the monster's properties by control-clicking on the monster folder, or click on the orange navigation button.
Width and height are in voxels. This defines the collision box and can be completely different from the animation size. For now, the base of monsters have to be square, so length is set to width.
Life: Number of hitpoints. 0 for immortal
Points: Points scored when the monster is killed
Lock X, Y, Z: Lock the position (X,Y) or elevation (Z) of the monster.
Lock Rotation: Mostly just a visual thing. When set, the monster always faces forwards.
Speed, Jump Height: 1.0 is roughly the same as the robot
Jump Freq: How frequently on average the monster jumps. 120 is once a second. 0 means never, 1 means constantly bouncing.
Move Style: Some default behaviours. Patrolling means that the monster always walks straight and then turns left when it hits something. To get left/right, or away/towards patrolling, lock the Y or X axis respectively.
Interaction: Usually you want to check the first 2, so that the object has collidable sides and can be stood on. All of the standard monsters now have these on. Check hoistable & throwable if you want to be able to pick up an object (by pressing shoot infront of it) and throw it (by pressing shoot while carrying).
Leave Debris: When the monster dies, it's voxels settle on the ground
Spread out: Avoid walking to close to other monsters. If this is unchecked, monsters tend to bunch up into tight packs (like the demo pig)
Hurt Player on Contact: Choose if the player is hurt when standing on top of and/or touches the side of a monster. You can use this for things like Sonic-style spikes (hurt only on top) or monsters that are harmless to stand on (the example pig).
PickupsThe pickup type is very similar to monsters. The only difference is that on collision, the default behaviour is to collect it (duh), and optionally to announce the name of the pickup on collection, and to act as one of the internal pickup types (Special: life, boom etc..)
Animation PropertiesDuration: How long an animation plays for in frame (120 frames is 1 second). Duration 0 means play forever, which is usually what you want for monster/pickup animations.
Frame Length: This is how many world frames (120 frames per second) you want each animation frame to display for. e.g. 4 will play your animation at 30 frames per second (120 / 4)
Play Style: LOOP repeats the animation forever (if Duration is 0). PLAY ONCE displays each frame once and then disappears. Likewise for PLAY ONCE AND HOLD, but instead the last frame is shown forever. ACTOR MOVEMENT ignores frame length, and instead advances the frame each time the actor moves one voxel in any direction (useful for walking animation etc.)
Paint Mode: PAINT SOLID only draws the animation on voxels that are non-empty. PAINT EMPTY draws onto into empty space.
Random Starting Frame: Choose a random starting frame so that multiple instances of the same animation are not synchronized.
Draw in Screen Space: Ignore the camera position and draw at a fixed position on the screen. This doesn't make sense for use with mosnters, and will be useful later on for things like custom inventory items.
Note that it isn't possible to do any kind of projectile attacks yet.. that's coming in the next couple of updates along with custom bullets and 'emitters'. Apart from that, please post here if you have any ideas about basic monster features (apart from attacks) you would like to see so that I can check they will be possible in future versions.
I tried to make a little tank following this tutorial, but for some reason it levitates a few voxels above it's collision box(roughly 4). The bounding box size is set to "8 8 8" for everything. Any idea what I'm doing wrong?
Make sure you draw everything sitting on the ground rather than floating in the middle of each frame. The bounding box and animation frames are anchored at the bottom, centre.
It shouldn't make a difference if the animation frames and collision box (width, height in the monster's properties) are not the same size, as they operate quite independently.
I unchecked "draw in screen space" and that fixed it.
May I ask how duration, frame length, play style, and paint mode work for animations? I have a simple 2 frame tank tread animation, but all I can manage is to make it cycle through the animation once, and then it hides the treads indefinitely.
Also, when I set the monster's move style to "chase player", the game crashes when I try to play the level.
Oops.. yes, you'll need to know how animations work! I added an "Animation Properties" section above.
I heard from someone else having the chase player crash too, but haven't been able to reproduce it yet. Does the crash happen if you're using some other movement style? (Like Wander). Does the demo level work for you? (#7098 -- can access through PLAY > BBS LEVELS)
No, the crash only happens when the movement style is "chase player" and interaction includes "spread out".
The demo level works perfectly for me, however it looks like the enemies all swarm; leading me to believe they don't have the"spread out" interaction selected.
As for my animation trouble, even when I set the play style to "loop", the duration to 0, and the frame length to 4, it only cycles through the entire animation once and then it stops drawing anything.
-EDIT- Looks like I didn't finish my post fast enough... lol.
hi zep great work, its pretty stable too, heres a few things i noticed,
snail in adventure mode is friendly now, i had heaps of fun with that snail filling the screen with slime. I rode round on its back and then hoisted it running around while it sprayed goop everywhere. just awes fun. Its cool coz old levels get a makeover too in a sense.
The slightly buggy water seems to only crash when the character is touching the edge of the screen. Incase you didnt know that already. But water looks soooo awesome. I noticed the water was changing underneath, coz at the side of the screen you get a cross section type view happening. Maybe thats part of the problem? if so could you block out the edges. (sorry i dont know wtf im talking bout really)
the monster i made had hoistable checked but when i tried i seemed to just stick to the monster and it wouldnt hoist. Also seems that the hoist or shoot got confused (voxman wouldnt shoot or hoist just sort of jammed when right up by the monster) but only when trying to hoist the monster i made. Btw my monster also has top and side damage set to off for now, so maybe that is the prob. wait, i just realised, if i locked z then maybe it cant hoist? ill check and let you know.
All the monsters push me around a bit now which is awesome, a much realer sense of being inside of the game. purple guys jump on my head....yay!
I really want to be able to have a few forms of blast for my enemy weapons (shotgun, knife, flame) so now even though im thrilled to be making my levels monsters, now i cant to wait to get the bullets. Could i make monsters that were bullets as a hack? lets see.
I really want to make an awesome big boss. just saying is all.
- The intro screen still doesnt go through to the start screen until you push a button....but would be good if it said press any key to start mayhaps? just a niggle really. I notice the randomness of the little bluey guys an minotaur now yo. ha!
anyways exciting great update, cool to see everyone immediately noticed and got all up in the bbs.
p.s. Im running it with windows xp on an old IBM. gangster.
I have in idea for a basic monster feature; rotation delay.
Pseudo code: When a monster rotates, wait 'x' amount of time before allowing it to rotate again.
It'd be nice for slowing down larger monsters a bit so the player can try to get behind them. It would also allow for turrets that periodically shoot in each direction(in a future release, of course) by merely locking 'x' and 'y' and setting the monster's "move style" to patrol.
Alrighty, the crash is fixed in 0.2.5. Thanks for the help in tracking that one down.
You should be able to load the demo, copy the key item, load your level and then paste it into the inventory. Have a look at the properties and the way the folders are set up, and I hope it makes sense. I plan to make a tutorial video, but after the bullets & attacks are available (because it will be much more interesting then!).
I forgot to mention that. You can ride around and carry snails now!
I found a slightly different way to do the water which will hopefully fix that instability too. The goal is to have water than can be at different heights in different parts of the room, but then flow together to level out when the bodies of water are connected.
Yes, the z locking is the problem -- it's very strong and applies to everything. Later it might be better to also have a flying monster property than can be mixed with hoisting/throwing.
Great, I'm glad it comes across like that. There are a lot of gameplay side-effects that could potentially mess up the old adventure mode + bbs levels, but I think it feels more natural now (and sometimes more comical).
- Attacks won't be too far off. I decided to release the bare bones monster editor early just to let people get to grips with it and experiment with animations. But yeah. I'm looking forward to attacks too! The way that I'm doing attacks, it will be possible to do a bunch of other things too (e.g. changing behaviour/properties when close to a player).
- Good point. Someone mentioned this a long time ago but I forgot to todo-list it.
Interesting. At the moment the notion of monster direction is very superficial -- it just looks at the momentum and picks a visual direction to represent that. I was considering adding an separate 'tank-like' mode, where the monster has a customisable turn speed and can only accelerate the way it's facing. I think this would enable what you're describing. It would also allow turrets that track you but take a while to catch up with your position, and for patrolling monsters that can face in a direction that isn't the way they're moving (e.g. turrets on train tracks). Periodically shooting in different directions is a bit trickier in any case, and probably better handled by scripting later on.
oh the idea with the water being able to level out sounds terrific! Its cool how much this latest build opens up possibilities for the game and fun trying old levels with the new physics. I do recall some old levels needing the snail to be deadly so might be cool to have a tick box for that ?
I know what you mean about comical. When the little blue guys push me i feel like, you little punks! **** off! ha ha
uh turrets sound cool hmm. could make some uberhard platform stages with this new version, i suppose thats what your getting at with no-floor level. that was quite tricky to get past btw... :p
oh forgot to say that rabbit character is supercute!
Not yet, but that's what I'm working on now. This will be done with 'modifiers' -- alternative monster definitions that kick in when something happens. So for example, being close to a player may cause a swinging_sword monster definition to add a body animation of the swinging the sword, and emitting tiny invisible bullets along the sword's path to do the damage.
I've been messing around wit this but I've found that my monster's animation shows only for a few seconds and then it becomes invisible. I set the width and height to 15 and 16 respectively. Speed and jump heoght are both 1. Move style is chase player. It is push and standable and spread out is on. Hurt player is set to top and side. Help?
[Please log in to post a comment]