Search Unity

Free Kick Game - Code available on Github

Discussion in 'Made With Unity' started by nostalgicbear, Sep 2, 2015.

  1. nostalgicbear

    nostalgicbear

    Joined:
    Mar 21, 2013
    Posts:
    99
    Im about to wipe my old laptop, and am making code available for projects that I did throughout college. Code is not optimized, but the game works fine. All code is available via Github. I actually uploaded the code months ago, but I just want to make people aware of it one more time. All code is commented extensively.

    https://github.com/nostalgicbear/FootballGame

    Video of me talking through the games features


    Game Overview
    This is a free kick game where the player must score a certain amount of free kicks to progress to the next level.

    Game Modes
    Play as the free kick taker & Play as the Goalkeeper

    Game Info
    When taking a shot, you choose the shot height and power. When you shoot, the keeper will try to save the ball. Once you miss/score, the ball will relocate to the next position.
    As levels progress, the game gets more difficult. Static and Moving defenders are added. Wind is also added to affect the trajectory of the ball.
    The camera follows the ball when its kicked.
    Score is updated accordingly.
    Sound effects included.
    Crowd reacts to goals.
    The goalkeeper walks back to the centre of the goal after each shot.
    GUI to indicate socre, wind trajectory, shots remaining etc.

    Notes
    The main script to look at is the "Launcher" script. A lot of shooting functionality is on this script.

    Code in the project that people may find useful
    Shooting an object in a desired direction.
    Resetting an object to a desired position.
    Having characters run along pre-determined paths.
    Updating GUI based on shots taken/score/time etc.
    Changing camera angles depending on certain events.
    Adding friction to an object.
    Having user input affect GUI and cameras.
    Adding working timers to a game.
    Having values from GUI elements feed into functions. (Shot height and power).
    Getting a goalkeeper to dive in the correct direction to save a ball.
    Loading new levels based on how a player performed in a level.
    Working menu system.
    Adding sounds & effects to a game.

    I suggest watching the video at the top of this post. It may be tedious to sit through a 15 min video, but if you see anything you think you can use, the code can be found on Github.
     
    huseyinbaba58 likes this.