QUICK TIP
COLLISION WARNING
QUICK TIP
QUICK TIP
LEVEL EDITOR
PYGAME
We can alter the text of our game in dialog.py – we can go into much deeper detail than just changing the font face, too. Size (down to height and width), background colour, border colour, text position, and frame can all be adjusted.
Our collision detection is pretty basic, but it does the job. Within runngun_classes.pywe have a class set up specifically to calculate if two given shapes have collided:
We’re using free and open source images for our zombie runner game, but you’re welcome to download your own sprite packages, or even better, create your own. In the run_n_gun\ run_n_gun_data directory you’ll find tile sets for the level maps, and animated sprites.
We’d love to see your creations – if you’ve had a go at creating your own sprites and level maps, please share your screenshots with us on Twitter: @linuxformat.
The game engine we’re using comes complete with a comprehensive level editor, so if you’re not a fan of designing levels in arrays there’s a toolset at hand. Execute world_editor.pyto play around with the default level map; we recommend editing levels before creating them from scratch. There’s no obvious key map, so here are the controls:
Credit: https://raytomely.itch.io/run-and-gun
O to change tileset;
OUR EXPERT