GithubHelp home page GithubHelp logo

crystal-bit / angry-aliens Goto Github PK

View Code? Open in Web Editor NEW
57.0 4.0 20.0 23.53 MB

Angry Birds like mobile game. Used for tutorials on how to create a mobile game with Godot 3

License: MIT License

GDScript 100.00%
mobile-game godot-engine hacktoberfest

angry-aliens's Introduction

Angry Aliens

optimized

Angry Aliens is an open source game made with Godot Engine 3.2.1.

Source code is MIT licensed. Feel free to read it, modify it and reuse it in your projects.

Gameplay is definitely inspired by Angry Birds.

Disclaimer

This project is used as a base for video tutorials in Italian. All the source code and documentation is in English. If you are interested, videos are released on my Crystal Bit YouTube channel.

Table of Contents

Branches: master, develop and video

  • develop branch contains the complete project.Some advanced features may not be included in the master branch.
  • master branch will be in sync with video tutorials releases on my YouTube channel.
  • videoX/start branches contains the code to follow the tutorial number X. Example:

Prerequisites

The tutorials require basic Godot understanding about Scenes, GDScript, 2D Nodes such as Sprite2D, CollisionShape2D, Area2D.

You can learn these topics by:

Tutorial Contents

1. Introduction

This tutorial series will focus on creating a simple mobile game using Godot 3.2.

I choose to make an Angry Birds clone because:

  1. it is short to recreate (without adding polish)
  2. it allows to stress Godot performances on the worst case scenario: intense game (physics based) on a low-power device (smartphone)

I'm creating these tutorials using Manjaro Linux (Arch Linux derivative), but similar steps can be done on other operating systems as well.

Currently I don't have an Apple device and I cannot develop/test iOS/OSX games. I'll try to provide instructions for other OSs, but help here is really appreciated (especially if you are a Debian, Ubuntu, Windows or OSX user).

2. Configure Godot and Android SDK

How do I configure my computer for Android development?

  • android-tools and jdk-openjdk
  • debug keystore
  • Godot configuration
  • Export templates
  • APK creation
  • APK one click installation

3. Testing performances on the smartphone

If we include all the physics elements and we create hundreds of game objects, is the game playable?

Stress test scene screen

4. Slingshot

How to create a slingshot that reacts on touchscreen and mouse input

  • Create a projectile
  • Create a simple slingshot
  • Input handling for mouse and touchscreen
  • Projectile launch
  • Load new projectile

5. Level (for multiple resolutions)

Image level screen

  • Mobile Layout
  • Multiple resolutions handling

6. Enemies

7. Obstacles

[EXTRA] Possible improvements / future topics

Extra topics are available in the develop branch.

They are not tutorialized, but the code should be simple to understand.

More than that, there are still a lot of areas that can be explored like:

  • Camera handling (pan, focus, zoom, ...)
  • Publishing on a game store
    • Fdroid
    • Play Store
  • Managing audio sfx
  • Improve the slingshot elastic animation
  • Parallax background
  • Moving clouds
  • Particle effects
  • Android modules
  • Double tap, drag 'n drop, pinch to zoom,...
  • Using Sensors (GPS, accelerometer, light sensor, bluetooth,...)

Credits

Thanks

angry-aliens's People

Contributors

davcri avatar lucashilles avatar masmartyg avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

angry-aliens's Issues

Create slingshot sprites

The slingshot is made with 3 brown rectangles.
It's ugly.

It would be nice to make some sprite similar to the 2 references from Angry Birds (the 2nd and 3rd image).

Screenshot_20200318_095557

Random error on startup in Develop branch

Sometimes, with low probability, this error is generated when starting from editor:

Running: D:\Work\Virtual Reality\Godot\Godot_v3.2.2-stable_win64\Godot_v3.2.2-stable_win64.exe --path D:/GoogleDrive/_GODOT/Projects/3.2/angry-aliens-develop --remote-debug 127.0.0.1:6007 --allow_focus_steal_pid 3224 --position 485,270
Godot Engine v3.2.2.stable.official - https://godotengine.org
OpenGL ES 2.0 Renderer: AMD Radeon HD 5700 Series
OpenGL ES 2.0 Batching: ON

ERROR: Node not found: Label.
   At: scene/main/node.cpp:1381
ERROR: Node not found: Label.
   At: scene/main/node.cpp:1381
SCRIPT ERROR: _set_btn_text: Invalid set index 'text' (on base: 'null instance') with value of type 'String'.
          At: res://Objects/GUI/Button1/Button.gd:33

Probably due to not fast enough initialization. Sorry, I don't have enough knowledge of Godot to investigate ...

Graphic glitch with default settings "Framebuffer Allocation 3D"

With the settings rendering/quality/intended_usage/framebuffer_allocation set to 3D (default value) I have some graphic glitch on the sprites used for the background.
Setting framebuffer_allocation to 2D seems to solve the problem (however I still have to commit this change to the repo).

untitled-f000044

It would be interesting to know if this happens on other devices as well.

Image used for background: blue_desert.png, 1024x1024px

System:    Kernel: 5.5.2-1-MANJARO x86_64 bits: 64 Desktop: KDE Plasma 5.17.5 Distro: Manjaro Linux 
Machine:   Type: Laptop System: Dell product: XPS 15 7590 v: N/A serial: <root required> 
           Mobo: Dell model: 0VYV0G v: A00 serial: <root required> UEFI: Dell v: 1.2.3 date: 07/23/2019 
CPU:       Topology: 6-Core model: Intel Core i7-9750H bits: 64 type: MT MCP L2 cache: 12.0 MiB 
           Speed: 4096 MHz min/max: 800/4500 MHz Core speeds (MHz): 1: 4068 2: 4099 3: 4091 4: 4095 5: 4093 6: 4099 7: 4101 
           8: 4098 9: 4086 10: 4100 11: 4097 12: 4091 
Graphics:  Device-1: Intel UHD Graphics 630 driver: i915 v: kernel 
           Device-2: NVIDIA driver: N/A 
           Display: x11 server: X.Org 1.20.7 driver: intel unloaded: modesetting resolution: 1920x1080~60Hz, 1920x1080~60Hz 
           OpenGL: renderer: Mesa DRI Intel UHD Graphics 630 (Coffeelake 3x8 GT2) v: 4.6 Mesa 19.3.3 

Use PoolableNode2D for every pooled object

VFX objects managed by ParticlesManager.gd should use PoolableNode2D and Node2DPool.

  • Consider making a global pool
  • Free pooled objects on scene change
  • Manage orphan nodes

Complete game flow

  • Player should be able to throw 3 aliens.
  • Player should see a level end screen after clearing the level or after throwing 3 aliens.
    Screenshot_20200327_102513

English written tutorials?

I'm thinking about doing tutorials also in English. I don't know if I'll have enough time, but still I want to consider this option.

If someone is interested, please let me know here by leaving a thumbs up πŸ‘ or by leaving a comment.

If there is enough interest, I'll create markdown files in a tutorial folder in this repository.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.