Search found 137 matches
- Fri Oct 29, 2021 7:32 pm
- Forum: Support and Development
- Topic: How to make bitser more robust
- Replies: 6
- Views: 7607
Re: How to make bitser more robust
Use Blob instead. It recently got userdata support when I asked for it!
- Fri Aug 20, 2021 7:03 am
- Forum: General
- Topic: Bouncing an idea for determining bot behavior
- Replies: 10
- Views: 11170
Re: Bouncing an idea for determining bot behavior
Ignoring one's environment is hardly intelligence. AI needs to look around and make decisions based on what they see. What you've described is simply random behavior (with some behaviors more likely than others, but not conditionally so). If you add an evaluation function to each node instead of a f...
- Sun Aug 15, 2021 12:14 am
- Forum: General
- Topic: How to do pixel-perfect rendering in löve?
- Replies: 14
- Views: 15185
Re: How to do pixel-perfect rendering in löve?
Instead of pre-deciding on a fixed resolution with black bars around, I adapt to any screen size and orientation. Scaling only by integer multiples (for square pixels), but drawing the upscaled canvas such that the edgemost 1 pixel on all sides "bleeds" outside the screen. That is, the vie...
- Fri Aug 13, 2021 12:07 am
- Forum: Support and Development
- Topic: Implementing save data
- Replies: 32
- Views: 22125
Re: Implementing save data
Ignore all functions in save files? How do you load a Lua file while "ignoring all functions"? data = require("savedata.lua") This super simple and fast mechanism executes everything in savedata.lua. The trouble with it is you have to trust that the file hasn't been maliciously ...
- Thu Aug 12, 2021 7:18 pm
- Forum: Support and Development
- Topic: Implementing save data
- Replies: 32
- Views: 22125
Re: Implementing save data
Serializing to Lua like that has the benefit of "free" deserialization by the Lua parser itself, which is implemented in fast C.
The disadvantage is that the save file can execute Lua code, which might not be desirable, especially if players share save files.
The disadvantage is that the save file can execute Lua code, which might not be desirable, especially if players share save files.
Re: Ravi
Only supports 64-bit numbers (ref) , so not very useful at all. LuaJIT which LÖVE uses supports a wide variety of types (ref) : 8, 16, 32, and 64 -bit signed and unsigned integers. Smaller numbers are important for games with large tile-based worlds. If you only need an 8-bit value, that's 87.5% sma...
- Tue Aug 10, 2021 6:54 pm
- Forum: General
- Topic: Passing arguments to a function used as an argument?
- Replies: 7
- Views: 8296
- Sun Aug 08, 2021 3:54 pm
- Forum: General
- Topic: Passing arguments to a function used as an argument?
- Replies: 7
- Views: 8296
Re: Passing arguments to a function used as an argument?
A function when passed around is just the function. If you also want to pass around arguments, you have to pass them separately (as you've been trying), or you can wrap the function in a table. In other programming languages this is called a closure or a delegate . This code is a bit weird for educa...
- Sat Aug 07, 2021 7:09 pm
- Forum: Support and Development
- Topic: How to efficiently play an animation/video of 500 frames?
- Replies: 18
- Views: 7520
Re: How to efficiently play an animation/video of 500 frames?
Dang you're right.
- Sat Aug 07, 2021 3:25 pm
- Forum: Support and Development
- Topic: Multiplayer using sock.lua | Can't host a server
- Replies: 17
- Views: 14488