Giter Club home page Giter Club logo

tinyduinogame-playground's Introduction

Project purpose

Programming games for the TinyDuino system is a challenge. The severe limitations regarding RAM and flash memory makes it difficult to develop games with this system.

The TinyScreen itself has a small resolution, however drawing to the screen takes substantial amounts of time. Moreover, drawing has to happen one line after another, all lines through from top to bottom. This property makes it additionally complicated to draw on the screen in a flickerfree way.

This project aims to require as little resources as possible while providing an interface to draw efficiently as well as easily on the screen.

Approach

  • Include everything into the main file via #include
    • The compiler can optimize the code better when everything is in one file
    • The code execution is significantly faster - calling externally defined functions is expensive. Yes, this is a violation of common programming practices. The gained performance and memory saving however is worth the hazzle.
  • Avoid C++
    • ... I am simply not experienced enough at writing C++ code
    • it's easy to waste precious flash memory for a bit more comfort
    • I have saved quite some memory by porting existing code into plain C code, thus gaining the attitude that it might be worth the effort
  • Declare functions as static - faster to call and smaller memory footprint

Rendering engine

The most important aspect of this code is to provide a rendering engine. Being able to draw shapes and texures on the TinyScreen is at the core of the code.

Reason

The rendering works as it works because of the challenges that the TinyScreen API is posing.

tinyduinogame-playground's People

Contributors

zet23t avatar

Watchers

 avatar

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.