Giter Club home page Giter Club logo

dino_run's Introduction

Dino Run

A 2D infinite side scroller made using Flame engine.

Demo

Menu

Jump

Hit

Downloads

Build steps

# Clone this project
$ git clone https://github.com/ufrshubham/dino_run

# Access
$ cd dino_run

# Install dependencies
$ flutter pub get

# Run the project (Make sure that a virtual or physical device is connected first)
$ flutter run

# The will start the game on any connected device.

Supported platforms

  • Android
  • iOS
  • Windows (without audio)

License

Assets provided in this repo are not owned by my. For more details about their origin and authors, check assets/images/readme.md and assets/audio/readme.md

This project is under license from MIT. For more details, see the LICENSE file.

Why the code is so different than the YouTube series?

Dino run is a simple mobile game that I originally started making, so that I can learn Flame engine. But while doing so, I couldn't find a lot of up-to date resources (apart of the official docs). So I decided to make a YouTube series covering the development of this game.

Everything went great and in about 7 weeks I wrapped up the series (actual game completed way sooner than the series). The original game and the YouTube series was made using version 0.28 of Flame (probably latest at that time). But little did I know that Flame was under massive development preparing for the 1.0 release.

I suspected that my videos were going to get outdated pretty soon with newer versions of Flame. My plan to deal with this was to keep updating this repository with latest changes from Flame, so that new viewers of the series don't get stuck with a code that won't even build. But things got much worst after Flutter went null-safe. I tried migrating this project to null-safety and latest version of Flame multiple times. But I always ended up introducing a lot of bugs in the game.

It was not like this is a very big project and a lot of people are follow it. I was easier to leave this repository in a broken state. But personally, I've been through the frustration of trying to learn something new, spending hours and hours watching some tutorial series only to find out at the end that it is completely outdated. Remaking the whole YouTube series is a big undertaking (which I am not prepared for). But rewriting this game again wasn't that big of a deal. So finally I decided to rewrite the whole thing from scratch (almost), keeping the original code on a separate branch. Surprising it took me only few hours to get it up and running.

To check the original code, checkout the main branch.

Games inspired from Dino Run

This list might not contain all the project that are inspired from Dino Run, but these are the ones that I know of. If you want to add your game here or know of a game that should be featured here, feel free to open a pull request or send me the required details.


Join my Discord if you want to discuss something about this project.

dino_run's People

Contributors

karniv00l avatar ufrshubham 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  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  avatar  avatar

dino_run's Issues

White Screen - Renderbox did not set its size

RenderBox did not set its size during layout.

Because this RenderBox has sizedByParent set to true, it must set its size in performResize().
It appears that this did not happen; layout completed, but the size property is still null.
The RenderBox in question is: GameRenderBox#7a1b6 NEEDS-LAYOUT NEEDS-PAINT
parentData: (can use size)
constraints: BoxConstraints(w=827.8, h=411.4)
size: MISSING
When the exception was thrown, this was the stack:
#0 RenderBox.debugAssertDoesMeetConstraints. (package:flutter/src/rendering/box.dart:2175:9)
#1 RenderBox.debugAssertDoesMeetConstraints (package:flutter/src/rendering/box.dart:2300:6)
#2 RenderObject.layout. (package:flutter/src/rendering/object.dart:1782:9)
#3 RenderObject.layout (package:flutter/src/rendering/object.dart:1784:8)
#4 RenderConstrainedBox.performLayout (package:flutter/src/rendering/proxy_box.dart:277:14)
...
The following RenderObject was being processed when the exception was fired: GameRenderBox#7a1b6 NEEDS-LAYOUT NEEDS-PAINT
... parentData: (can use size)
... constraints: BoxConstraints(w=827.8, h=411.4)
... size: MISSING
RenderObject: GameRenderBox#7a1b6 NEEDS-LAYOUT NEEDS-PAINT
parentData: (can use size)
constraints: BoxConstraints(w=827.8, h=411.4)
size: MISSING

======== Exception caught by rendering library =====================================================
The following assertion was thrown during performLayout():
RenderBox was not laid out: GameRenderBox#7a1b6 NEEDS-PAINT
'package:flutter/src/rendering/box.dart':
Failed assertion: line 1930 pos 12: 'hasSize'

pub get failed (66; , errno = 1314))

Running "flutter pub get" in dino_run...
Cannot create link, path = 'G:\AndroidStudioProjects\flutter.pub-cache_temp\dir76fa0be4\ios\Classes\AudioplayersPlugin.h' (OS Error: 客户端没有所需的特权。
, errno = 1314)
pub get failed (66; , errno = 1314))
Process finished with exit code 66

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.