Build a Tile-Based Platformer - Python PyGame Tutorial Part 1

Published: 01 January 1970
on channel: The Python Lab
728
15

In this Python tutorial I code a Tile Based Platformer Game using the PyGame module. I'm going to cover the initial game setup and how to create the map.
Timelabs
00:00 Intro
00:13 downloading assets
00:47 import pygame
00:58 create a blank window
02:11 add a way of closing the game
03:47 5x5 Gid-system
04:40 create world class
05:25 import os
05:48 load all images
06:58 literate through this tile list
09:29 define draw function
10:06 create a instance of world
11:13 end credits

world_data = [
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[0, 0, 0, 0, 0, 118, 0, 62, 0, 0, 0, 0, 0, 49, 0],
[0, 0, 0, 0, 0, 179, 180, 180, 181, 0, 0, 0, 184, 183, 185],
[0, 0, 0, 0, 0, 0, 37, 0, 0, 0, 0, 0, 0, 0, 0],
[0, 0, 167, 0, 0, 0, 0, 37, 0, 0, 0, 0, 0, 0, 0],
[0, 0, 0, 0, 0, 0, 0, 0, 45, 0, 0, 0, 0, 0, 0],
[0, 0, 0, 0, 0, 179, 180, 180, 180, 181, 0, 0, 0, 0, 0],
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 177, 0, 0, 0],
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 177],
[0, 0, 0, 0, 0, 0, 0, 37, 0, 0, 0, 0, 0, 0, 0],
[0, 0, 0, 0, 0, 0, 37, 0, 37, 0, 0, 0, 0, 177, 0],
[62, 0, 0, 116, 125, 128, 0, 0, 0, 0, 116, 0, 0, 62, 0],
[175, 174, 174, 174, 174, 176, 312, 312, 312, 175, 174, 174, 174, 174, 176],
[172, 171, 171, 171, 171, 173, 310, 310, 310, 172, 171, 171, 171, 171, 173],
[172, 171, 171, 171, 171, 173, 310, 310, 310, 172, 171, 171, 171, 171, 173],
]
#python #pygame #gamedev #platformer #coding #programming


On this page of the site you can watch the video online Build a Tile-Based Platformer - Python PyGame Tutorial Part 1 with a duration of hours minute second in good quality, which was uploaded by the user The Python Lab 01 January 1970, share the link with friends and acquaintances, this video has already been watched 728 times on youtube and it was liked by 15 viewers. Enjoy your viewing!