Windows Shop System & Downloadable Levels (PDF + Project Files)

Discussion in 'Tutorials' started by Alexx, Aug 15, 2019 at 8:04 PM.

  1. Alexx

    Alexx Member

    Jun 21, 2016
    GM Version:
    Target Platform: Windows

    A PDF & project files showing how to set up a simple shop system, and how to download levels from a website. Includes PDF explaining how to, along with code, example project files and resources.
    Cover of ebook:

    This covers 2 topics - Shop System & Downloading a Level.

    Shop System:
    Lots of game genres make use of a shop system. This tutorial shows how to make a basic shop and inventory system.
    There are lots of ways of doing this, my method is basic and easy to understand.
    Includes screenshot:
    Formatted and Commented code:
    /// @description Sell an item
    if global.items[my_id,3]>=1//check player has item to sell
        global.items[my_id,3]-=1;//reduce item counnt[my_id,4];//increase cash

    Download Level From Website:
    Being able to easily add new levels for your player to have easy access to is always a good thing. This chapter shows you how to download a level from a website and add it to your game. Also includes a working version of Sokoban.

    An example like this could be used to download new levels every week giving some great variation to your game.

    and code with explanations:
    /// @description Commence Download
    //Start async http get file
    file = http_get_file("",working_directory +"level.txt");
    str[0]="";//initiate array
    done=false;//this will be used as a flag to detect if file is downloaded
    Last edited: Aug 16, 2019 at 12:27 AM

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice