Code Monkey home page Code Monkey logo

Comments (4)

DavidVentura avatar DavidVentura commented on June 1, 2024

Hi

I had the exact same idea initially; there's indeed 64KB of "machine memory" (with 32KB of scratch and 32KB affecting console state).. but there's also this -- you can allocate up to 2MB of Lua objects; ie: create a table with 20000 entries

Everything else can fit in memory, if barely, but the game-object memory won't.

The "abandoning" is a bit strong -- if you look at the pico_backend.c -- it is very small, at the moment the only thing missing from it is a way to play SFX, the rest works, so you can give it a shot

from picopico.

codetiger avatar codetiger commented on June 1, 2024

I am thinking of a precompiled Lua code instead of real time interpreting. This should allow us to store the Lua memory 2mb in flash storage. Does it make sense?

from picopico.

DavidVentura avatar DavidVentura commented on June 1, 2024

Pre-compiling would help a bit; it is in fact something I'm thinking about -- however you can always do this

function f()
        t = {}
        for var=1,100000 do
                t[var] = 5
        end     
end                    

f()

and it won't execute to completion on the Pico, there's no RAM to keep the table t

from picopico.

DavidVentura avatar DavidVentura commented on June 1, 2024

Hey!
This does not currently work well, partly because it is incomplete and partly because I don't know enough about C++ to generate code properly, but I've started a Lua to C++ compiler here: https://github.com/DavidVentura/lua-but-worse

from picopico.

Related Issues (3)

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.