Git Product home page Git Product logo

nelua-game2048's Introduction

2048 Game Clone in Nelua

Screenshot

Play in your browser at https://edubart.github.io/nelua-game2048/

This an experimental clone of the 2048 game using Nelua and Raylib. Made mainly for checking out raylib in practice.

Raylib bindings from raylib-nelua are used, thanks to @Andre-LA.

Running

You must have both Nelua and latest Raylib installed and working.

To run simple do nelua game2048.nelua

nelua-game2048's People

Contributors

edubart avatar

Stargazers

 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

Forkers

andre-la

nelua-game2048's Issues

Nelua and C disagree on type size on emscripten

Using:
nelua game2048.nelua --cc emcc

I get these C compile errors:

nelua_cache/game2048.c:100:1: error: static_assert failed due to requirement 'sizeof(struct nelua_GCItem) == 40' "Nelua and C disagree on type size"
nelua_static_assert(sizeof(nelua_GCItem) == 40, "Nelua and C disagree on type size");
^                   ~~~~~~~~~~~~~~~~~~~~~~~~~~
nelua_cache/game2048.c:23:29: note: expanded from macro 'nelua_static_assert'
#define nelua_static_assert _Static_assert
                            ^
nelua_cache/game2048.c:110:1: error: static_assert failed due to requirement 'sizeof(struct nelua_span_GCItem) == 16' "Nelua and C disagree on type size"
nelua_static_assert(sizeof(nelua_span_GCItem) == 16, "Nelua and C disagree on type size");
^                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
nelua_cache/game2048.c:23:29: note: expanded from macro 'nelua_static_assert'
#define nelua_static_assert _Static_assert
                            ^
nelua_cache/game2048.c:122:1: error: static_assert failed due to requirement 'sizeof(struct nlstringview) == 16' "Nelua and C disagree on type size"
nelua_static_assert(sizeof(nlstringview) == 16, "Nelua and C disagree on type size");
^                   ~~~~~~~~~~~~~~~~~~~~~~~~~~
nelua_cache/game2048.c:23:29: note: expanded from macro 'nelua_static_assert'
#define nelua_static_assert _Static_assert
                            ^
nelua_cache/game2048.c:142:1: error: static_assert failed due to requirement 'sizeof(struct nelua_span_uint8) == 16' "Nelua and C disagree on type size"
nelua_static_assert(sizeof(nelua_span_uint8) == 16, "Nelua and C disagree on type size");
^                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
nelua_cache/game2048.c:23:29: note: expanded from macro 'nelua_static_assert'
#define nelua_static_assert _Static_assert
                            ^
nelua_cache/game2048.c:170:1: error: static_assert failed due to requirement 'sizeof(struct game2048_span_TileAnim) == 16' "Nelua and C disagree on type size"
nelua_static_assert(sizeof(game2048_span_TileAnim) == 16, "Nelua and C disagree on type size");
^                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
nelua_cache/game2048.c:23:29: note: expanded from macro 'nelua_static_assert'
#define nelua_static_assert _Static_assert
                            ^
nelua_cache/game2048.c:220:1: error: static_assert failed due to requirement 'sizeof(struct nelua_GC) == 104' "Nelua and C disagree on type size"
nelua_static_assert(sizeof(nelua_GC) == 104, "Nelua and C disagree on type size");
^                   ~~~~~~~~~~~~~~~~~~~~~~~
nelua_cache/game2048.c:23:29: note: expanded from macro 'nelua_static_assert'
#define nelua_static_assert _Static_assert
                            ^
nelua_cache/game2048.c:234:1: error: static_assert failed due to requirement 'sizeof(nlusize_arr24) == 192' "Nelua and C disagree on type size"
nelua_static_assert(sizeof(nlusize_arr24) == 192, "Nelua and C disagree on type size");
^                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
nelua_cache/game2048.c:23:29: note: expanded from macro 'nelua_static_assert'
#define nelua_static_assert _Static_assert
                            ^
nelua_cache/game2048.c:332:1: error: static_assert failed due to requirement 'sizeof(struct nelua_stringbuffer) == 24' "Nelua and C disagree on type size"
nelua_static_assert(sizeof(nelua_stringbuffer) == 24, "Nelua and C disagree on type size");
^                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
nelua_cache/game2048.c:23:29: note: expanded from macro 'nelua_static_assert'
#define nelua_static_assert _Static_assert
                            ^
nelua_cache/game2048.c:345:1: error: static_assert failed due to requirement 'sizeof(struct nlstring) == 16' "Nelua and C disagree on type size"
nelua_static_assert(sizeof(nlstring) == 16, "Nelua and C disagree on type size");
^                   ~~~~~~~~~~~~~~~~~~~~~~
nelua_cache/game2048.c:23:29: note: expanded from macro 'nelua_static_assert'
#define nelua_static_assert _Static_assert
                            ^
nelua_cache/game2048.c:399:1: error: static_assert failed due to requirement 'sizeof(struct game2048_vector_TileAnim) == 24' "Nelua and C disagree on type size"
nelua_static_assert(sizeof(game2048_vector_TileAnim) == 24, "Nelua and C disagree on type size");
^                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
nelua_cache/game2048.c:23:29: note: expanded from macro 'nelua_static_assert'
#define nelua_static_assert _Static_assert
                            ^
nelua_cache/game2048.c:438:1: error: static_assert failed due to requirement 'sizeof(game2048_vector_TileAnim_arr4) == 96' "Nelua and C disagree on type size"
nelua_static_assert(sizeof(game2048_vector_TileAnim_arr4) == 96, "Nelua and C disagree on type size");
^                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
nelua_cache/game2048.c:23:29: note: expanded from macro 'nelua_static_assert'
#define nelua_static_assert _Static_assert
                            ^
nelua_cache/game2048.c:440:1: error: static_assert failed due to requirement 'sizeof(game2048_AnimTileMap) == 384' "Nelua and C disagree on type size"
nelua_static_assert(sizeof(game2048_AnimTileMap) == 384, "Nelua and C disagree on type size");
^                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
nelua_cache/game2048.c:23:29: note: expanded from macro 'nelua_static_assert'
#define nelua_static_assert _Static_assert
                            ^
nelua_cache/game2048.c:451:1: error: static_assert failed due to requirement 'sizeof(struct record_3verfCjmM8wbHgWWfabDjo) == 24' "Nelua and C disagree on type size"
nelua_static_assert(sizeof(record_3verfCjmM8wbHgWWfabDjo) == 24, "Nelua and C disagree on type size");

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.