{"id":22530,"date":"2020-08-11T03:07:50","date_gmt":"2020-08-11T03:07:50","guid":{"rendered":"http:\/\/itsourcecode.com\/?p=22530"},"modified":"2025-04-07T08:31:08","modified_gmt":"2025-04-07T08:31:08","slug":"mario-game-in-python-with-source-code","status":"publish","type":"post","link":"https:\/\/itsourcecode.com\/free-projects\/python-projects\/mario-game-in-python-with-source-code\/","title":{"rendered":"Mario Game In Python With Source Code"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\" id=\"h-mario-game-in-python-with-source-code\"><strong><strong>Mario Game In Python<\/strong> With Source Code<\/strong><\/h2>\n\n\n\n<p>The <strong>Mario Game In Python<\/strong> is written in Python, This <strong>Mario Game Code In Python<\/strong> is designed in Graphical User Interface (<strong>GUI<\/strong>) that uses<a href=\"http:\/\/www.pygame.org\/\"> <\/a>th<strong>e PyGame<\/strong> library.&nbsp;<\/p>\n\n\n\n<p>When talking about the Mario Game, it\u2019s a single-player game, where the player (Mario) has to dodge fireballs coming out from a dragon. <\/p>\n\n\n\n<p>Each level comes with more difficulties, the area gets smaller and smaller as soon as there\u2019s an increment in level. In this<strong> Super Mario Python Tutorial,<\/strong> you can learn <strong>how to make a Super Mario Game in Python<\/strong>.<\/p>\n\n\n\n<p>A <strong>Mario Game Program In Python<\/strong> simple and clean GUI is provided for easy gameplay. The gameplay design is so simple that the user won\u2019t find it difficult to use and understand. <\/p>\n\n\n\n<p>Different images are used in the development of this game project, the gaming environment is just like the <strong>Mario game<\/strong>.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-mario-game-in-python-project-information\"><strong>Mario Game In Python<\/strong>: Project Information<\/h2>\n\n\n\n<figure class=\"wp-block-table is-style-stripes\"><table><tbody><tr><td><strong>Project Name:<\/strong><\/td><td>Mario Game In Python<\/td><\/tr><tr><td><strong>Language\/s Used:<\/strong><\/td><td>Python (GUI) Based<\/td><\/tr><tr><td><strong>Python version (Recommended):<\/strong><\/td><td>2.x or 3.x<\/td><\/tr><tr><td><strong>Database:<\/strong><\/td><td>None<\/td><\/tr><tr><td><strong>Type:<\/strong><\/td><td>Python App<\/td><\/tr><tr><td><strong>Developer:<\/strong><\/td><td>IT SOURCECODE<\/td><\/tr><tr><td><strong>Updates:<\/strong><\/td><td>0<\/td><\/tr><\/tbody><\/table><figcaption class=\"wp-element-caption\">Mario Game In Python \u2013 Project Information<\/figcaption><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>Anyway, if you want to level up your knowledge in programming especially games in Python, try this new article I\u2019ve made for you <a href=\"https:\/\/itsourcecode.com\/free-projects\/python-projects\/code-for-game-in-python\/\">Code For Game in Python: Python Game Projects With Source Code<\/a><\/p>\n\n\n\n<p>This <strong>Super Mario In Python<\/strong> also includes a downloadable <strong>Mario Game In Python<\/strong> source code for free, just find the downloadable source code below and click to start downloading.<\/p>\n\n\n\n<p>To start creating a <strong>Mario Game In Python<\/strong>, make sure that you have <strong>PyCharm IDE<\/strong> installed on your computer.<\/p>\n\n\n\n<p>By the way, if you are new to Python programming and don&#8217;t know what Python IDE to use, I have here a list of the<a href=\"https:\/\/itsourcecode.com\/blogs\/best-python-ide-for-windows-2021\/\"> Best Python IDE for Windows, Linux, and Mac OS<\/a> that will suit you. <\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>I also have here <a href=\"https:\/\/itsourcecode.com\/blogs\/how-to-download-and-install-latest-version-of-python-on-windows-2021\/\">How to Download and Install the Latest Version of Python on Windows<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-steps-on-how-to-create-a-mario-game-in-python\">Steps on how to create a <strong>Mario Game In Python<\/strong><\/h2>\n\n\n\n<div class=\"schema-how-to wp-block-yoast-how-to-block\"><p class=\"schema-how-to-description\"><strong>Mario Game In Python<\/strong> <strong>With Source Code<\/strong><\/p> <ul class=\"schema-how-to-steps\"><li class=\"schema-how-to-step\" id=\"how-to-step-1597071331226\"><strong class=\"schema-how-to-step-name\">Step 1: Create a project name.<\/strong> <p class=\"schema-how-to-step-text\">First, open <strong>Pycharm IDE<\/strong> and then create a &#8220;<strong>project name<\/strong>.&#8221; After creating a project name click the &#8220;<strong>create<\/strong>&#8221; button.<br\/><img decoding=\"async\" src=\"https:\/\/itsourcecode.com\/wp-content\/uploads\/2020\/08\/Mario-Game-Program-In-Python-Project-Name.png\" alt=\"Mario Game Program In Python Project Name\"\/><\/p> <\/li><li class=\"schema-how-to-step\" id=\"how-to-step-1597071411320\"><strong class=\"schema-how-to-step-name\">Step 2: Create a python file.<\/strong> <p class=\"schema-how-to-step-text\">Second, after creating a project name, &#8220;<strong>right click<\/strong>&#8221; your project name and then click &#8220;<strong>new<\/strong>&#8221; After that click the &#8220;<strong>python file<\/strong>&#8220;.<br\/><img decoding=\"async\" src=\"https:\/\/itsourcecode.com\/wp-content\/uploads\/2020\/08\/Hangman-Game-In-Python-File-1.png\" alt=\"Hangman Game In Python File\"\/><\/p> <\/li><li class=\"schema-how-to-step\" id=\"how-to-step-1597071446963\"><strong class=\"schema-how-to-step-name\">Step 3: Name your python file.<\/strong> <p class=\"schema-how-to-step-text\">Third, after creating a Python file, Name your Python file after that click &#8220;<strong>enter<\/strong>&#8220;.<br\/><img decoding=\"async\" src=\"https:\/\/itsourcecode.com\/wp-content\/uploads\/2020\/08\/Mario-Game-Program-In-Python-File-Name.png\" alt=\"Mario Game Program In Python File Name\"\/><\/p> <\/li><li class=\"schema-how-to-step\" id=\"how-to-step-1597071484859\"><strong class=\"schema-how-to-step-name\">Step 4: The actual code.<\/strong> <p class=\"schema-how-to-step-text\">You are free to copy the code given below and download the full source code below.<\/p> <\/li><\/ul><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-the-code-given-below-is-for-importing-modules\"><strong>The Code Given Below Is For Importing Modules<\/strong><\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>import pygame\nimport sys<\/code><\/pre>\n\n\n\n<p><\/p>\n\n\n\n<p>The code is given which is importing all modules.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-the-code-given-below-is-for-the-starting-game-of-mario\"><strong>The Code Given Below Is For The Starting Game Of Mario<\/strong><\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>def start_game():\n    canvas.fill(BLACK)\n    start_img = pygame.image.load('start.png')\n    start_img_rect = start_img.get_rect()\n    start_img_rect.center = (WINDOW_WIDTH\/2, WINDOW_HEIGHT\/2)\n    canvas.blit(start_img, start_img_rect)\n    while True:\n        for event in pygame.event.get():\n            if event.type == pygame.QUIT:\n                pygame.quit()\n                sys.exit()\n            if event.type == pygame.KEYDOWN:\n                if event.key == pygame.K_ESCAPE:\n                    pygame.quit()\n                    sys.exit()\n                game_loop()\n        pygame.display.update()<\/code><\/pre>\n\n\n\n<p><\/p>\n\n\n\n<p>In this module which is the starting game of Super Mario.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-this-will-be-the-output\"><strong>This Will Be The Output<\/strong><\/h2>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"518\" height=\"276\" src=\"https:\/\/itsourcecode.com\/wp-content\/uploads\/2020\/08\/start.png\" alt=\"\" class=\"wp-image-22541\" srcset=\"https:\/\/itsourcecode.com\/wp-content\/uploads\/2020\/08\/start.png 518w, https:\/\/itsourcecode.com\/wp-content\/uploads\/2020\/08\/start-300x160.png 300w\" sizes=\"auto, (max-width: 518px) 100vw, 518px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-the-code-given-below-is-for-the-level-of-the-game\"><strong>The  Code Given Below Is For The Level Of The Game<\/strong><\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>def check_level(SCORE):\n    global LEVEL\n    if SCORE in range(0, 10):\n        cactus_img_rect.bottom = 50\n        fire_img_rect.top = WINDOW_HEIGHT - 50\n        LEVEL = 1\n    elif SCORE in range(10, 20):\n        cactus_img_rect.bottom = 100\n        fire_img_rect.top = WINDOW_HEIGHT - 100\n        LEVEL = 2\n    elif SCORE in range(20, 30):\n        cactus_img_rect.bottom = 150\n        fire_img_rect.top = WINDOW_HEIGHT - 150\n        LEVEL = 3\n    elif SCORE &gt; 30:\n        cactus_img_rect.bottom = 200\n        fire_img_rect.top = WINDOW_HEIGHT - 200\n        LEVEL = 4<\/code><\/pre>\n\n\n\n<p><\/p>\n\n\n\n<p>In this module which is the level of the game if you pass the challenge of the given level. <\/p>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-the-code-given-below-is-for-the-main-module-of-the-game\"><strong>The Code Given Below Is For The Main Module Of The Game<\/strong><\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>def game_loop():\n    while True:\n        global dragon\n        dragon = Dragon()\n        flames = Flames()\n        mario = Mario()\n        add_new_flame_counter = 0\n        global SCORE\n        SCORE = 0\n        global  HIGH_SCORE\n        flames_list = &#91;]\n        pygame.mixer.music.load('mario_theme.wav')\n        pygame.mixer.music.play(-1, 0.0)\n        while True:\n            canvas.fill(BLACK)\n            check_level(SCORE)\n            dragon.update()\n            add_new_flame_counter += 1\n\n            if add_new_flame_counter == ADD_NEW_FLAME_RATE:\n                add_new_flame_counter = 0\n                new_flame = Flames()\n                flames_list.append(new_flame)\n            for f in flames_list:\n                if f.flames_img_rect.left &lt;= 0:\n                    flames_list.remove(f)\n                    SCORE += 1\n                f.update()\n\n            for event in pygame.event.get():\n                if event.type == pygame.QUIT:\n                    pygame.quit()\n                    sys.exit()\n                if event.type == pygame.KEYDOWN:\n                    if event.key == pygame.K_UP:\n                        mario.up = True\n                        mario.down = False\n                    elif event.key == pygame.K_DOWN:\n                        mario.down = True\n                        mario.up = False\n                if event.type == pygame.KEYUP:\n                    if event.key == pygame.K_UP:\n                        mario.up = False\n                        mario.down = True\n                    elif event.key == pygame.K_DOWN:\n                        mario.down = True\n                        mario.up = False\n\n            score_font = font.render('Score:'+str(SCORE), True, GREEN)\n            score_font_rect = score_font.get_rect()\n            score_font_rect.center = (200, cactus_img_rect.bottom + score_font_rect.height\/2)\n            canvas.blit(score_font, score_font_rect)\n\n            level_font = font.render('Level:'+str(LEVEL), True, GREEN)\n            level_font_rect = level_font.get_rect()\n            level_font_rect.center = (500, cactus_img_rect.bottom + score_font_rect.height\/2)\n            canvas.blit(level_font, level_font_rect)\n\n            top_score_font = font.render('Top Score:'+str(topscore.high_score),True,GREEN)\n            top_score_font_rect = top_score_font.get_rect()\n            top_score_font_rect.center = (800, cactus_img_rect.bottom + score_font_rect.height\/2)\n            canvas.blit(top_score_font, top_score_font_rect)\n\n            canvas.blit(cactus_img, cactus_img_rect)\n            canvas.blit(fire_img, fire_img_rect)\n            mario.update()\n            for f in flames_list:\n                if f.flames_img_rect.colliderect(mario.mario_img_rect):\n                    game_over()\n                    if SCORE &gt; mario.mario_score:\n                        mario.mario_score = SCORE\n            pygame.display.update()\n            CLOCK.tick(FPS)\n<\/code><\/pre>\n\n\n\n<p><\/p>\n\n\n\n<p>This Module is the main module of the game that consists of boolean and other loops and conditions.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-the-code-given-below-is-for-the-interface-of-the-game-over\"><strong>The Code Given Below Is For The Interface of The Game Over<\/strong><\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>def game_over():\n    pygame.mixer.music.stop()\n    music = pygame.mixer.Sound('mario_dies.wav')\n    music.play()\n    topscore.top_score(SCORE)\n    game_over_img = pygame.image.load('end.png')\n    game_over_img_rect = game_over_img.get_rect()\n    game_over_img_rect.center = (WINDOW_WIDTH\/2, WINDOW_HEIGHT\/2)\n    canvas.blit(game_over_img, game_over_img_rect)\n    while True:\n        for event in pygame.event.get():\n            if event.type == pygame.QUIT:\n                pygame.quit()\n                sys.exit()\n            if event.type == pygame.KEYDOWN:\n                if event.key == pygame.K_ESCAPE:\n                    pygame.quit()\n                    sys.exit()\n                music.stop()\n                game_loop()\n        pygame.display.update()<\/code><\/pre>\n\n\n\n<p><\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>In This Module which is the interface of the game over.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-the-output\"><strong>The Output<\/strong><\/h2>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"519\" height=\"277\" src=\"https:\/\/itsourcecode.com\/wp-content\/uploads\/2020\/08\/Mario-Game-Program-In-Python-Output-1.png\" alt=\"Mario-Game-Program-In-Python-Output-1\" class=\"wp-image-22540\" srcset=\"https:\/\/itsourcecode.com\/wp-content\/uploads\/2020\/08\/Mario-Game-Program-In-Python-Output-1.png 519w, https:\/\/itsourcecode.com\/wp-content\/uploads\/2020\/08\/Mario-Game-Program-In-Python-Output-1-300x160.png 300w\" sizes=\"auto, (max-width: 519px) 100vw, 519px\" \/><figcaption class=\"wp-element-caption\">Mario-Game-Program-In-Python-Output-1<\/figcaption><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-complete-source-code\"><strong>Complete Source Code<\/strong><\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>import pygame\nimport sys\npygame.init()\n\nWINDOW_WIDTH = 1200\nWINDOW_HEIGHT = 600\nFPS = 20\nBLACK = (0, 0, 0)\nGREEN = (0, 255, 0)\nADD_NEW_FLAME_RATE = 25\ncactus_img = pygame.image.load('cactus_bricks.png')\ncactus_img_rect = cactus_img.get_rect()\ncactus_img_rect.left = 0\nfire_img = pygame.image.load('fire_bricks.png')\nfire_img_rect = fire_img.get_rect()\nfire_img_rect.left = 0\nCLOCK = pygame.time.Clock()\nfont = pygame.font.SysFont('forte', 20)\n\ncanvas = pygame.display.set_mode((WINDOW_WIDTH, WINDOW_HEIGHT))\npygame.display.set_caption('Mario')\n\n\nclass Topscore:\n    def __init__(self):\n        self.high_score = 0\n    def top_score(self, score):\n        if score &gt; self.high_score:\n            self.high_score = score\n        return self.high_score\n\ntopscore = Topscore()\n\n\nclass Dragon:\n    dragon_velocity = 10\n\n    def __init__(self):\n        self.dragon_img = pygame.image.load('dragon.png')\n        self.dragon_img_rect = self.dragon_img.get_rect()\n        self.dragon_img_rect.width -= 10\n        self.dragon_img_rect.height -= 10\n        self.dragon_img_rect.top = WINDOW_HEIGHT\/2\n        self.dragon_img_rect.right = WINDOW_WIDTH\n        self.up = True\n        self.down = False\n\n    def update(self):\n        canvas.blit(self.dragon_img, self.dragon_img_rect)\n        if self.dragon_img_rect.top &lt;= cactus_img_rect.bottom:\n            self.up = False\n            self.down = True\n        elif self.dragon_img_rect.bottom &gt;= fire_img_rect.top:\n            self.up = True\n            self.down = False\n\n        if self.up:\n            self.dragon_img_rect.top -= self.dragon_velocity\n        elif self.down:\n            self.dragon_img_rect.top += self.dragon_velocity\n\n\nclass Flames:\n    flames_velocity = 20\n\n    def __init__(self):\n        self.flames = pygame.image.load('fireball.png')\n        self.flames_img = pygame.transform.scale(self.flames, (20, 20))\n        self.flames_img_rect = self.flames_img.get_rect()\n        self.flames_img_rect.right = dragon.dragon_img_rect.left\n        self.flames_img_rect.top = dragon.dragon_img_rect.top + 30\n\n\n    def update(self):\n        canvas.blit(self.flames_img, self.flames_img_rect)\n\n        if self.flames_img_rect.left &gt; 0:\n            self.flames_img_rect.left -= self.flames_velocity\n\n\nclass Mario:\n    velocity = 10\n\n    def __init__(self):\n        self.mario_img = pygame.image.load('maryo.png')\n        self.mario_img_rect = self.mario_img.get_rect()\n        self.mario_img_rect.left = 20\n        self.mario_img_rect.top = WINDOW_HEIGHT\/2 - 100\n        self.down = True\n        self.up = False\n\n    def update(self):\n        canvas.blit(self.mario_img, self.mario_img_rect)\n        if self.mario_img_rect.top &lt;= cactus_img_rect.bottom:\n            game_over()\n            if SCORE &gt; self.mario_score:\n                self.mario_score = SCORE\n        if self.mario_img_rect.bottom &gt;= fire_img_rect.top:\n            game_over()\n            if SCORE &gt; self.mario_score:\n                self.mario_score = SCORE\n        if self.up:\n            self.mario_img_rect.top -= 10\n        if self.down:\n            self.mario_img_rect.bottom += 10\n\n\ndef game_over():\n    pygame.mixer.music.stop()\n    music = pygame.mixer.Sound('mario_dies.wav')\n    music.play()\n    topscore.top_score(SCORE)\n    game_over_img = pygame.image.load('end.png')\n    game_over_img_rect = game_over_img.get_rect()\n    game_over_img_rect.center = (WINDOW_WIDTH\/2, WINDOW_HEIGHT\/2)\n    canvas.blit(game_over_img, game_over_img_rect)\n    while True:\n        for event in pygame.event.get():\n            if event.type == pygame.QUIT:\n                pygame.quit()\n                sys.exit()\n            if event.type == pygame.KEYDOWN:\n                if event.key == pygame.K_ESCAPE:\n                    pygame.quit()\n                    sys.exit()\n                music.stop()\n                game_loop()\n        pygame.display.update()\n\n\ndef start_game():\n    canvas.fill(BLACK)\n    start_img = pygame.image.load('start.png')\n    start_img_rect = start_img.get_rect()\n    start_img_rect.center = (WINDOW_WIDTH\/2, WINDOW_HEIGHT\/2)\n    canvas.blit(start_img, start_img_rect)\n    while True:\n        for event in pygame.event.get():\n            if event.type == pygame.QUIT:\n                pygame.quit()\n                sys.exit()\n            if event.type == pygame.KEYDOWN:\n                if event.key == pygame.K_ESCAPE:\n                    pygame.quit()\n                    sys.exit()\n                game_loop()\n        pygame.display.update()\n\n\ndef check_level(SCORE):\n    global LEVEL\n    if SCORE in range(0, 10):\n        cactus_img_rect.bottom = 50\n        fire_img_rect.top = WINDOW_HEIGHT - 50\n        LEVEL = 1\n    elif SCORE in range(10, 20):\n        cactus_img_rect.bottom = 100\n        fire_img_rect.top = WINDOW_HEIGHT - 100\n        LEVEL = 2\n    elif SCORE in range(20, 30):\n        cactus_img_rect.bottom = 150\n        fire_img_rect.top = WINDOW_HEIGHT - 150\n        LEVEL = 3\n    elif SCORE &gt; 30:\n        cactus_img_rect.bottom = 200\n        fire_img_rect.top = WINDOW_HEIGHT - 200\n        LEVEL = 4\n\n\n\n\n\ndef game_loop():\n    while True:\n        global dragon\n        dragon = Dragon()\n        flames = Flames()\n        mario = Mario()\n        add_new_flame_counter = 0\n        global SCORE\n        SCORE = 0\n        global  HIGH_SCORE\n        flames_list = &#91;]\n        pygame.mixer.music.load('mario_theme.wav')\n        pygame.mixer.music.play(-1, 0.0)\n        while True:\n            canvas.fill(BLACK)\n            check_level(SCORE)\n            dragon.update()\n            add_new_flame_counter += 1\n\n            if add_new_flame_counter == ADD_NEW_FLAME_RATE:\n                add_new_flame_counter = 0\n                new_flame = Flames()\n                flames_list.append(new_flame)\n            for f in flames_list:\n                if f.flames_img_rect.left &lt;= 0:\n                    flames_list.remove(f)\n                    SCORE += 1\n                f.update()\n\n            for event in pygame.event.get():\n                if event.type == pygame.QUIT:\n                    pygame.quit()\n                    sys.exit()\n                if event.type == pygame.KEYDOWN:\n                    if event.key == pygame.K_UP:\n                        mario.up = True\n                        mario.down = False\n                    elif event.key == pygame.K_DOWN:\n                        mario.down = True\n                        mario.up = False\n                if event.type == pygame.KEYUP:\n                    if event.key == pygame.K_UP:\n                        mario.up = False\n                        mario.down = True\n                    elif event.key == pygame.K_DOWN:\n                        mario.down = True\n                        mario.up = False\n\n            score_font = font.render('Score:'+str(SCORE), True, GREEN)\n            score_font_rect = score_font.get_rect()\n            score_font_rect.center = (200, cactus_img_rect.bottom + score_font_rect.height\/2)\n            canvas.blit(score_font, score_font_rect)\n\n            level_font = font.render('Level:'+str(LEVEL), True, GREEN)\n            level_font_rect = level_font.get_rect()\n            level_font_rect.center = (500, cactus_img_rect.bottom + score_font_rect.height\/2)\n            canvas.blit(level_font, level_font_rect)\n\n            top_score_font = font.render('Top Score:'+str(topscore.high_score),True,GREEN)\n            top_score_font_rect = top_score_font.get_rect()\n            top_score_font_rect.center = (800, cactus_img_rect.bottom + score_font_rect.height\/2)\n            canvas.blit(top_score_font, top_score_font_rect)\n\n            canvas.blit(cactus_img, cactus_img_rect)\n            canvas.blit(fire_img, fire_img_rect)\n            mario.update()\n            for f in flames_list:\n                if f.flames_img_rect.colliderect(mario.mario_img_rect):\n                    game_over()\n                    if SCORE &gt; mario.mario_score:\n                        mario.mario_score = SCORE\n            pygame.display.update()\n            CLOCK.tick(FPS)\n\n\nstart_game()<\/code><\/pre>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-downloadable-source-code\"><strong>Downloadable Source Code<\/strong><\/h2>\n\n\n\n<div class=\"wp-block-buttons is-layout-flex wp-block-buttons-is-layout-flex\">\n<div class=\"wp-block-button\"><a class=\"wp-block-button__link wp-element-button\" href=\"\/\/itsourcecode.com\/wp-content\/uploads\/2020\/08\/Mario-Game-Program-In-Python-With-Source-Code-1.zip\"><strong>DOWNLOAD<\/strong><\/a><\/div>\n<\/div>\n\n\n\n<p><\/p>\n\n\n\n<p>I have here the list of&nbsp;<a href=\"https:\/\/itsourcecode.com\/free-projects\/python-projects\/best-python-project-with-source-code-2020\/\">Best Python Projects with Source code free to download for free<\/a>, I hope this can help you a lot.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-summary\"><strong>Summary<\/strong><\/h2>\n\n\n\n<p>The <strong>Mario Game In Python<\/strong> is written in Python programming language, Python is very smooth to research the syntax emphasizes readability and it is able to reduce time ingesting in developing. <\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>Also, this tutorial is the simplest way for beginners or students to enhance their logical skills in programming.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-related-articles\"><strong>Related Articles<\/strong><\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/itsourcecode.com\/free-projects\/python-projects\/hangman-game-in-python-with-source-code\/\">Hangman Game In Python With Source Code<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/itsourcecode.com\/free-projects\/python-projects\/aircraft-war-game-in-python-with-source-code\/\">Aircraft War Game in Python with Source Code<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/itsourcecode.com\/free-projects\/python-projects\/snake-game-in-python-code\/\">Snake Game In Python Code<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/itsourcecode.com\/free-projects\/python-projects\/how-to-make-bouncing-ball-game-in-python-with-source-code\/\">How to Make Bouncing Ball Game in Python with Source Code<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/itsourcecode.com\/free-projects\/python-projects\/how-to-create-rock-paper-scissor-game-in-python\/\">How to Create Rock-Paper-Scissor Game in Python<\/a><\/li>\n<\/ul>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-inquiries\"><strong>Inquiries<\/strong><\/h2>\n\n\n\n<p>If you have any questions or suggestions about <strong>Mario Game In Python<\/strong>, please feel free to leave a comment below.<\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Mario Game In Python With Source Code The Mario Game In Python is written in Python, This Mario Game Code In Python is designed in Graphical User Interface (GUI) that &#8230; <\/p>\n<p class=\"read-more-container\"><a title=\"Mario Game In Python With Source Code\" class=\"read-more button\" href=\"https:\/\/itsourcecode.com\/free-projects\/python-projects\/mario-game-in-python-with-source-code\/#more-22530\" aria-label=\"Read more about Mario Game In Python With Source Code\">Read more<\/a><\/p>\n","protected":false},"author":1767,"featured_media":117747,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[19632,60567],"tags":[35163,35164,35161,35162,21761,21762,35166,35165,35177,35179,35178],"class_list":["post-22530","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-python-projects","category-pygame","tag-how-to-make-super-mario-game-in-python","tag-mario-game-code-in-python","tag-mario-game-in-python","tag-mario-game-program-in-python","tag-python-projects-with-source-code","tag-python-source-code","tag-super-mario-bros-programming-code-python","tag-super-mario-bros-python-code","tag-super-mario-in-python","tag-super-mario-python","tag-super-mario-python-tutorial","resize-featured-image"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v26.1 (Yoast SEO v27.4) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Mario Game In Python With Source Code<\/title>\n<meta name=\"description\" content=\"The Mario Game In Python is design in (GUI) that uses PyGame library.it also includes a downloadable Mario Game Project In Python source code\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/itsourcecode.com\/free-projects\/python-projects\/mario-game-in-python-with-source-code\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Mario Game In Python With Source Code\" \/>\n<meta property=\"og:description\" content=\"The Mario Game In Python is design in (GUI) that uses PyGame library.it also includes a downloadable Mario Game Project In Python source code\" \/>\n<meta property=\"og:url\" content=\"https:\/\/itsourcecode.com\/free-projects\/python-projects\/mario-game-in-python-with-source-code\/\" \/>\n<meta property=\"og:site_name\" content=\"Itsourcecode.com\" \/>\n<meta property=\"article:published_time\" content=\"2020-08-11T03:07:50+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-04-07T08:31:08+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/itsourcecode.com\/wp-content\/uploads\/2022\/08\/Mario-Game-in-Python-with-source-code.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"675\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"angel jude suarez\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"angel jude suarez\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/itsourcecode.com\\\/free-projects\\\/python-projects\\\/mario-game-in-python-with-source-code\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/itsourcecode.com\\\/free-projects\\\/python-projects\\\/mario-game-in-python-with-source-code\\\/\"},\"author\":{\"name\":\"angel jude suarez\",\"@id\":\"https:\\\/\\\/itsourcecode.com\\\/#\\\/schema\\\/person\\\/dafb6a91b43e60537c56e3e1d227d460\"},\"headline\":\"Mario Game In Python With Source Code\",\"datePublished\":\"2020-08-11T03:07:50+00:00\",\"dateModified\":\"2025-04-07T08:31:08+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/itsourcecode.com\\\/free-projects\\\/python-projects\\\/mario-game-in-python-with-source-code\\\/\"},\"wordCount\":715,\"commentCount\":9,\"publisher\":{\"@id\":\"https:\\\/\\\/itsourcecode.com\\\/#\\\/schema\\\/person\\\/ad9e0497e03b85a9ca299d935298f5dc\"},\"image\":{\"@id\":\"https:\\\/\\\/itsourcecode.com\\\/free-projects\\\/python-projects\\\/mario-game-in-python-with-source-code\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/itsourcecode.com\\\/wp-content\\\/uploads\\\/2022\\\/08\\\/Mario-Game-in-Python-with-source-code.png\",\"keywords\":[\"how to make super mario game in python\",\"mario game code in python\",\"mario game in python\",\"mario game program in python\",\"python projects with source code\",\"python source code\",\"super mario bros programming code python\",\"super mario bros python code\",\"super mario in python\",\"super mario python\",\"super mario python tutorial\"],\"articleSection\":[\"Best Python Projects With Source Code\",\"Pygame Projects\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/itsourcecode.com\\\/free-projects\\\/python-projects\\\/mario-game-in-python-with-source-code\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/itsourcecode.com\\\/free-projects\\\/python-projects\\\/mario-game-in-python-with-source-code\\\/\",\"url\":\"https:\\\/\\\/itsourcecode.com\\\/free-projects\\\/python-projects\\\/mario-game-in-python-with-source-code\\\/\",\"name\":\"Mario Game In Python With Source Code\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/itsourcecode.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/itsourcecode.com\\\/free-projects\\\/python-projects\\\/mario-game-in-python-with-source-code\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/itsourcecode.com\\\/free-projects\\\/python-projects\\\/mario-game-in-python-with-source-code\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/itsourcecode.com\\\/wp-content\\\/uploads\\\/2022\\\/08\\\/Mario-Game-in-Python-with-source-code.png\",\"datePublished\":\"2020-08-11T03:07:50+00:00\",\"dateModified\":\"2025-04-07T08:31:08+00:00\",\"description\":\"The Mario Game In Python is design in (GUI) that uses PyGame library.it also includes a downloadable Mario Game Project In Python source code\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/itsourcecode.com\\\/free-projects\\\/python-projects\\\/mario-game-in-python-with-source-code\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/itsourcecode.com\\\/free-projects\\\/python-projects\\\/mario-game-in-python-with-source-code\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/itsourcecode.com\\\/free-projects\\\/python-projects\\\/mario-game-in-python-with-source-code\\\/#primaryimage\",\"url\":\"https:\\\/\\\/itsourcecode.com\\\/wp-content\\\/uploads\\\/2022\\\/08\\\/Mario-Game-in-Python-with-source-code.png\",\"contentUrl\":\"https:\\\/\\\/itsourcecode.com\\\/wp-content\\\/uploads\\\/2022\\\/08\\\/Mario-Game-in-Python-with-source-code.png\",\"width\":1200,\"height\":675,\"caption\":\"Mario Game in Python with source code\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/itsourcecode.com\\\/free-projects\\\/python-projects\\\/mario-game-in-python-with-source-code\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/itsourcecode.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Mario Game In Python With Source Code\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/itsourcecode.com\\\/#website\",\"url\":\"https:\\\/\\\/itsourcecode.com\\\/\",\"name\":\"Itsourcecode.com\",\"description\":\"Partner In Your Coding Journey!\",\"publisher\":{\"@id\":\"https:\\\/\\\/itsourcecode.com\\\/#\\\/schema\\\/person\\\/ad9e0497e03b85a9ca299d935298f5dc\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/itsourcecode.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/itsourcecode.com\\\/#\\\/schema\\\/person\\\/ad9e0497e03b85a9ca299d935298f5dc\",\"name\":\"itsourcecode\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/itsourcecode.com\\\/wp-content\\\/uploads\\\/2021\\\/01\\\/IT-SOURCECODE_ICON-07.jpg\",\"url\":\"https:\\\/\\\/itsourcecode.com\\\/wp-content\\\/uploads\\\/2021\\\/01\\\/IT-SOURCECODE_ICON-07.jpg\",\"contentUrl\":\"https:\\\/\\\/itsourcecode.com\\\/wp-content\\\/uploads\\\/2021\\\/01\\\/IT-SOURCECODE_ICON-07.jpg\",\"width\":409,\"height\":409,\"caption\":\"itsourcecode\"},\"logo\":{\"@id\":\"https:\\\/\\\/itsourcecode.com\\\/wp-content\\\/uploads\\\/2021\\\/01\\\/IT-SOURCECODE_ICON-07.jpg\"},\"description\":\"Hello Itsourcecoders, welcome to itsourcecode.com. I'm Joken Villanueva, MIT a passionate Blogger, Programmer and a Hobbyist. I started Itsourcecode because I wanted to give back and Share all the learnings and knowledge I've learned in my career and I believe through this website I would be able to help and assist those newbie programmers in enhancing their skills from different programming languages. So let us all help each other by sharing our ideas!\",\"sameAs\":[\"https:\\\/\\\/itsourcecode.com\\\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/itsourcecode.com\\\/#\\\/schema\\\/person\\\/dafb6a91b43e60537c56e3e1d227d460\",\"name\":\"angel jude suarez\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/itsourcecode.com\\\/wp-content\\\/litespeed\\\/avatar\\\/49f87b924bdd4e5fcbc3635ed3f7af29.jpg?ver=1776429718\",\"url\":\"https:\\\/\\\/itsourcecode.com\\\/wp-content\\\/litespeed\\\/avatar\\\/49f87b924bdd4e5fcbc3635ed3f7af29.jpg?ver=1776429718\",\"contentUrl\":\"https:\\\/\\\/itsourcecode.com\\\/wp-content\\\/litespeed\\\/avatar\\\/49f87b924bdd4e5fcbc3635ed3f7af29.jpg?ver=1776429718\",\"caption\":\"angel jude suarez\"},\"description\":\"Hello programmers, I'm Angel Jude Reyes Suarez, a student and a programmer of different programming languages like Python, Java, JavaScript, PHP, C, C++, Vb.net, and MySQL. and I have also knowledge in developing system or websites from Front-End to Back-End. and also a writer of itsourcecode.com.\",\"url\":\"https:\\\/\\\/itsourcecode.com\\\/author\\\/angeljudesuarez\\\/\"},{\"@type\":\"HowTo\",\"@id\":\"https:\\\/\\\/itsourcecode.com\\\/free-projects\\\/python-projects\\\/mario-game-in-python-with-source-code\\\/#howto-1\",\"name\":\"Mario Game In Python With Source Code\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/itsourcecode.com\\\/free-projects\\\/python-projects\\\/mario-game-in-python-with-source-code\\\/#article\"},\"description\":\"<strong>Mario Game In Python<\\\/strong> <strong>With Source Code<\\\/strong>\",\"step\":[{\"@type\":\"HowToStep\",\"url\":\"https:\\\/\\\/itsourcecode.com\\\/free-projects\\\/python-projects\\\/mario-game-in-python-with-source-code\\\/#how-to-step-1597071331226\",\"name\":\"Step 1: Create a project name.\",\"itemListElement\":[{\"@type\":\"HowToDirection\",\"text\":\"First, open Pycharm IDE and then create a \\\"project name.\\\" After creating a project name click the \\\"create\\\" button.\"}],\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/itsourcecode.com\\\/free-projects\\\/python-projects\\\/mario-game-in-python-with-source-code\\\/#schema-image-8b7ad5096a6ce4d5200e708f1e324cba\",\"url\":\"http:\\\/\\\/itsourcecode.com\\\/wp-content\\\/uploads\\\/2020\\\/08\\\/Mario-Game-Program-In-Python-Project-Name.png\",\"contentUrl\":\"http:\\\/\\\/itsourcecode.com\\\/wp-content\\\/uploads\\\/2020\\\/08\\\/Mario-Game-Program-In-Python-Project-Name.png\"}},{\"@type\":\"HowToStep\",\"url\":\"https:\\\/\\\/itsourcecode.com\\\/free-projects\\\/python-projects\\\/mario-game-in-python-with-source-code\\\/#how-to-step-1597071411320\",\"name\":\"Step 2: Create a python file.\",\"itemListElement\":[{\"@type\":\"HowToDirection\",\"text\":\"Second, after creating a project name, \\\"right click\\\" your project name and then click \\\"new\\\" After that click the \\\"python file\\\".\"}],\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/itsourcecode.com\\\/free-projects\\\/python-projects\\\/mario-game-in-python-with-source-code\\\/#schema-image-e9500519199497a7576aeecb3d3cc9a0\",\"url\":\"http:\\\/\\\/itsourcecode.com\\\/wp-content\\\/uploads\\\/2020\\\/08\\\/Hangman-Game-In-Python-File-1.png\",\"contentUrl\":\"http:\\\/\\\/itsourcecode.com\\\/wp-content\\\/uploads\\\/2020\\\/08\\\/Hangman-Game-In-Python-File-1.png\"}},{\"@type\":\"HowToStep\",\"url\":\"https:\\\/\\\/itsourcecode.com\\\/free-projects\\\/python-projects\\\/mario-game-in-python-with-source-code\\\/#how-to-step-1597071446963\",\"name\":\"Step 3: Name your python file.\",\"itemListElement\":[{\"@type\":\"HowToDirection\",\"text\":\"Third, after creating a Python file, Name your Python file after that click \\\"enter\\\".\"}],\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/itsourcecode.com\\\/free-projects\\\/python-projects\\\/mario-game-in-python-with-source-code\\\/#schema-image-aa77d635f0dbdb9a3dfda580bc1f98d9\",\"url\":\"http:\\\/\\\/itsourcecode.com\\\/wp-content\\\/uploads\\\/2020\\\/08\\\/Mario-Game-Program-In-Python-File-Name.png\",\"contentUrl\":\"http:\\\/\\\/itsourcecode.com\\\/wp-content\\\/uploads\\\/2020\\\/08\\\/Mario-Game-Program-In-Python-File-Name.png\"}},{\"@type\":\"HowToStep\",\"url\":\"https:\\\/\\\/itsourcecode.com\\\/free-projects\\\/python-projects\\\/mario-game-in-python-with-source-code\\\/#how-to-step-1597071484859\",\"name\":\"Step 4: The actual code.\",\"itemListElement\":[{\"@type\":\"HowToDirection\",\"text\":\"You are free to copy the code given below and download the full source code below.\"}]}],\"inLanguage\":\"en-US\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Mario Game In Python With Source Code","description":"The Mario Game In Python is design in (GUI) that uses PyGame library.it also includes a downloadable Mario Game Project In Python source code","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/itsourcecode.com\/free-projects\/python-projects\/mario-game-in-python-with-source-code\/","og_locale":"en_US","og_type":"article","og_title":"Mario Game In Python With Source Code","og_description":"The Mario Game In Python is design in (GUI) that uses PyGame library.it also includes a downloadable Mario Game Project In Python source code","og_url":"https:\/\/itsourcecode.com\/free-projects\/python-projects\/mario-game-in-python-with-source-code\/","og_site_name":"Itsourcecode.com","article_published_time":"2020-08-11T03:07:50+00:00","article_modified_time":"2025-04-07T08:31:08+00:00","og_image":[{"width":1200,"height":675,"url":"https:\/\/itsourcecode.com\/wp-content\/uploads\/2022\/08\/Mario-Game-in-Python-with-source-code.png","type":"image\/png"}],"author":"angel jude suarez","twitter_card":"summary_large_image","twitter_misc":{"Written by":"angel jude suarez","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/itsourcecode.com\/free-projects\/python-projects\/mario-game-in-python-with-source-code\/#article","isPartOf":{"@id":"https:\/\/itsourcecode.com\/free-projects\/python-projects\/mario-game-in-python-with-source-code\/"},"author":{"name":"angel jude suarez","@id":"https:\/\/itsourcecode.com\/#\/schema\/person\/dafb6a91b43e60537c56e3e1d227d460"},"headline":"Mario Game In Python With Source Code","datePublished":"2020-08-11T03:07:50+00:00","dateModified":"2025-04-07T08:31:08+00:00","mainEntityOfPage":{"@id":"https:\/\/itsourcecode.com\/free-projects\/python-projects\/mario-game-in-python-with-source-code\/"},"wordCount":715,"commentCount":9,"publisher":{"@id":"https:\/\/itsourcecode.com\/#\/schema\/person\/ad9e0497e03b85a9ca299d935298f5dc"},"image":{"@id":"https:\/\/itsourcecode.com\/free-projects\/python-projects\/mario-game-in-python-with-source-code\/#primaryimage"},"thumbnailUrl":"https:\/\/itsourcecode.com\/wp-content\/uploads\/2022\/08\/Mario-Game-in-Python-with-source-code.png","keywords":["how to make super mario game in python","mario game code in python","mario game in python","mario game program in python","python projects with source code","python source code","super mario bros programming code python","super mario bros python code","super mario in python","super mario python","super mario python tutorial"],"articleSection":["Best Python Projects With Source Code","Pygame Projects"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/itsourcecode.com\/free-projects\/python-projects\/mario-game-in-python-with-source-code\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/itsourcecode.com\/free-projects\/python-projects\/mario-game-in-python-with-source-code\/","url":"https:\/\/itsourcecode.com\/free-projects\/python-projects\/mario-game-in-python-with-source-code\/","name":"Mario Game In Python With Source Code","isPartOf":{"@id":"https:\/\/itsourcecode.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/itsourcecode.com\/free-projects\/python-projects\/mario-game-in-python-with-source-code\/#primaryimage"},"image":{"@id":"https:\/\/itsourcecode.com\/free-projects\/python-projects\/mario-game-in-python-with-source-code\/#primaryimage"},"thumbnailUrl":"https:\/\/itsourcecode.com\/wp-content\/uploads\/2022\/08\/Mario-Game-in-Python-with-source-code.png","datePublished":"2020-08-11T03:07:50+00:00","dateModified":"2025-04-07T08:31:08+00:00","description":"The Mario Game In Python is design in (GUI) that uses PyGame library.it also includes a downloadable Mario Game Project In Python source code","breadcrumb":{"@id":"https:\/\/itsourcecode.com\/free-projects\/python-projects\/mario-game-in-python-with-source-code\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/itsourcecode.com\/free-projects\/python-projects\/mario-game-in-python-with-source-code\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/itsourcecode.com\/free-projects\/python-projects\/mario-game-in-python-with-source-code\/#primaryimage","url":"https:\/\/itsourcecode.com\/wp-content\/uploads\/2022\/08\/Mario-Game-in-Python-with-source-code.png","contentUrl":"https:\/\/itsourcecode.com\/wp-content\/uploads\/2022\/08\/Mario-Game-in-Python-with-source-code.png","width":1200,"height":675,"caption":"Mario Game in Python with source code"},{"@type":"BreadcrumbList","@id":"https:\/\/itsourcecode.com\/free-projects\/python-projects\/mario-game-in-python-with-source-code\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/itsourcecode.com\/"},{"@type":"ListItem","position":2,"name":"Mario Game In Python With Source Code"}]},{"@type":"WebSite","@id":"https:\/\/itsourcecode.com\/#website","url":"https:\/\/itsourcecode.com\/","name":"Itsourcecode.com","description":"Partner In Your Coding Journey!","publisher":{"@id":"https:\/\/itsourcecode.com\/#\/schema\/person\/ad9e0497e03b85a9ca299d935298f5dc"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/itsourcecode.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/itsourcecode.com\/#\/schema\/person\/ad9e0497e03b85a9ca299d935298f5dc","name":"itsourcecode","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/itsourcecode.com\/wp-content\/uploads\/2021\/01\/IT-SOURCECODE_ICON-07.jpg","url":"https:\/\/itsourcecode.com\/wp-content\/uploads\/2021\/01\/IT-SOURCECODE_ICON-07.jpg","contentUrl":"https:\/\/itsourcecode.com\/wp-content\/uploads\/2021\/01\/IT-SOURCECODE_ICON-07.jpg","width":409,"height":409,"caption":"itsourcecode"},"logo":{"@id":"https:\/\/itsourcecode.com\/wp-content\/uploads\/2021\/01\/IT-SOURCECODE_ICON-07.jpg"},"description":"Hello Itsourcecoders, welcome to itsourcecode.com. I'm Joken Villanueva, MIT a passionate Blogger, Programmer and a Hobbyist. I started Itsourcecode because I wanted to give back and Share all the learnings and knowledge I've learned in my career and I believe through this website I would be able to help and assist those newbie programmers in enhancing their skills from different programming languages. So let us all help each other by sharing our ideas!","sameAs":["https:\/\/itsourcecode.com\/"]},{"@type":"Person","@id":"https:\/\/itsourcecode.com\/#\/schema\/person\/dafb6a91b43e60537c56e3e1d227d460","name":"angel jude suarez","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/itsourcecode.com\/wp-content\/litespeed\/avatar\/49f87b924bdd4e5fcbc3635ed3f7af29.jpg?ver=1776429718","url":"https:\/\/itsourcecode.com\/wp-content\/litespeed\/avatar\/49f87b924bdd4e5fcbc3635ed3f7af29.jpg?ver=1776429718","contentUrl":"https:\/\/itsourcecode.com\/wp-content\/litespeed\/avatar\/49f87b924bdd4e5fcbc3635ed3f7af29.jpg?ver=1776429718","caption":"angel jude suarez"},"description":"Hello programmers, I'm Angel Jude Reyes Suarez, a student and a programmer of different programming languages like Python, Java, JavaScript, PHP, C, C++, Vb.net, and MySQL. and I have also knowledge in developing system or websites from Front-End to Back-End. and also a writer of itsourcecode.com.","url":"https:\/\/itsourcecode.com\/author\/angeljudesuarez\/"},{"@type":"HowTo","@id":"https:\/\/itsourcecode.com\/free-projects\/python-projects\/mario-game-in-python-with-source-code\/#howto-1","name":"Mario Game In Python With Source Code","mainEntityOfPage":{"@id":"https:\/\/itsourcecode.com\/free-projects\/python-projects\/mario-game-in-python-with-source-code\/#article"},"description":"<strong>Mario Game In Python<\/strong> <strong>With Source Code<\/strong>","step":[{"@type":"HowToStep","url":"https:\/\/itsourcecode.com\/free-projects\/python-projects\/mario-game-in-python-with-source-code\/#how-to-step-1597071331226","name":"Step 1: Create a project name.","itemListElement":[{"@type":"HowToDirection","text":"First, open Pycharm IDE and then create a \"project name.\" After creating a project name click the \"create\" button."}],"image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/itsourcecode.com\/free-projects\/python-projects\/mario-game-in-python-with-source-code\/#schema-image-8b7ad5096a6ce4d5200e708f1e324cba","url":"http:\/\/itsourcecode.com\/wp-content\/uploads\/2020\/08\/Mario-Game-Program-In-Python-Project-Name.png","contentUrl":"http:\/\/itsourcecode.com\/wp-content\/uploads\/2020\/08\/Mario-Game-Program-In-Python-Project-Name.png"}},{"@type":"HowToStep","url":"https:\/\/itsourcecode.com\/free-projects\/python-projects\/mario-game-in-python-with-source-code\/#how-to-step-1597071411320","name":"Step 2: Create a python file.","itemListElement":[{"@type":"HowToDirection","text":"Second, after creating a project name, \"right click\" your project name and then click \"new\" After that click the \"python file\"."}],"image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/itsourcecode.com\/free-projects\/python-projects\/mario-game-in-python-with-source-code\/#schema-image-e9500519199497a7576aeecb3d3cc9a0","url":"http:\/\/itsourcecode.com\/wp-content\/uploads\/2020\/08\/Hangman-Game-In-Python-File-1.png","contentUrl":"http:\/\/itsourcecode.com\/wp-content\/uploads\/2020\/08\/Hangman-Game-In-Python-File-1.png"}},{"@type":"HowToStep","url":"https:\/\/itsourcecode.com\/free-projects\/python-projects\/mario-game-in-python-with-source-code\/#how-to-step-1597071446963","name":"Step 3: Name your python file.","itemListElement":[{"@type":"HowToDirection","text":"Third, after creating a Python file, Name your Python file after that click \"enter\"."}],"image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/itsourcecode.com\/free-projects\/python-projects\/mario-game-in-python-with-source-code\/#schema-image-aa77d635f0dbdb9a3dfda580bc1f98d9","url":"http:\/\/itsourcecode.com\/wp-content\/uploads\/2020\/08\/Mario-Game-Program-In-Python-File-Name.png","contentUrl":"http:\/\/itsourcecode.com\/wp-content\/uploads\/2020\/08\/Mario-Game-Program-In-Python-File-Name.png"}},{"@type":"HowToStep","url":"https:\/\/itsourcecode.com\/free-projects\/python-projects\/mario-game-in-python-with-source-code\/#how-to-step-1597071484859","name":"Step 4: The actual code.","itemListElement":[{"@type":"HowToDirection","text":"You are free to copy the code given below and download the full source code below."}]}],"inLanguage":"en-US"}]}},"_links":{"self":[{"href":"https:\/\/itsourcecode.com\/wp-json\/wp\/v2\/posts\/22530","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/itsourcecode.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/itsourcecode.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/itsourcecode.com\/wp-json\/wp\/v2\/users\/1767"}],"replies":[{"embeddable":true,"href":"https:\/\/itsourcecode.com\/wp-json\/wp\/v2\/comments?post=22530"}],"version-history":[{"count":12,"href":"https:\/\/itsourcecode.com\/wp-json\/wp\/v2\/posts\/22530\/revisions"}],"predecessor-version":[{"id":127657,"href":"https:\/\/itsourcecode.com\/wp-json\/wp\/v2\/posts\/22530\/revisions\/127657"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/itsourcecode.com\/wp-json\/wp\/v2\/media\/117747"}],"wp:attachment":[{"href":"https:\/\/itsourcecode.com\/wp-json\/wp\/v2\/media?parent=22530"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/itsourcecode.com\/wp-json\/wp\/v2\/categories?post=22530"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/itsourcecode.com\/wp-json\/wp\/v2\/tags?post=22530"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}