Search found 137 matches

by Xii
Wed Jun 16, 2021 6:40 am
Forum: General
Topic: I need help understanding how to make client and servers.
Replies: 6
Views: 6715

Re: I need help understanding how to make client and servers.

You might want to use a serialization library like Blob.lua which lets you turn a Lua table into a string, which you can then send over the network. (and turn back into a table on the other side)
by Xii
Thu Jun 10, 2021 2:17 am
Forum: Libraries and Tools
Topic: An Easy to Integrate In-Game Console
Replies: 6
Views: 18452

Re: An Easy to Integrate In-Game Console

I see references in the code to colored text, but console.draw() doesn't actually draw colored text. Incomplete functionality?
by Xii
Wed Jun 09, 2021 12:08 am
Forum: Libraries and Tools
Topic: An Easy to Integrate In-Game Console
Replies: 6
Views: 18452

Re: An Easy to Integrate In-Game Console

Was delightfully simple to integrate. Only needed a tiny tweak: The tilde key ~ on my keyboard layout (finnish) is somewhere else, so I added: function console.enable(enable) enabled = enable return enabled end In order to map the console to F1 instead: function love.keypressed(key, scancode, isrepe...
by Xii
Sat Jun 05, 2021 7:33 pm
Forum: General
Topic: Best practices and things you'd like changed about Love2D
Replies: 47
Views: 56562

Re: Best practices and things you'd like changed about Love2D

[...] about Xii's complaint about lack of edge detection for keys; I said it was no big deal, as I don't think it's a frequent use case, [...] Jumping in a platformer. Shooting in a shooter. Activating a special ability. Pressing undo. It's a very frequent use case to detect single key presses. And...
by Xii
Sat Jun 05, 2021 12:02 am
Forum: General
Topic: Best practices and things you'd like changed about Love2D
Replies: 47
Views: 56562

Re: Best practices and things you'd like changed about Love2D

How about love.keyboard.isDown(key)? Or am I wrong? That doesn't tell you the key was pressed right now. It just tells you the key was pressed sometime in the past and is still held down. It will be true for every frame until the key is released, not just the first frame after it has been pressed.
by Xii
Fri Jun 04, 2021 6:37 pm
Forum: General
Topic: Best practices and things you'd like changed about Love2D
Replies: 47
Views: 56562

Re: Best practices and things you'd like changed about Love2D

LÖVE feels less like a framework for gamedev and more like a Lua wrapper for SDL. Which is fine, but it means that simple things you'd want to do are frequently implemented in weird, obtuse mechanisms. The documentation gives the false impression that everything is simple and easy. But all of the pr...
by Xii
Mon May 24, 2021 1:33 pm
Forum: General
Topic: What's everyone working on? (tigsource inspired)
Replies: 1791
Views: 1494673

Re: What's everyone working on? (tigsource inspired)

Still putting the fundamentals together. Next on the list is loading sprites into an atlas. Solutions probably exist but it might be less work to do it meself than study libraries.
by Xii
Fri May 07, 2021 8:54 pm
Forum: General
Topic: What is your advice for saving game state?
Replies: 6
Views: 6538

Re: What is your advice for saving game state?

I use moonblob . Makes it easy to save/load any table from disk. local writer, reader = require("BlobWriter"), require("BlobReader") local filesystem_identity = "68841bcfb1b0c875" state = {} function save_state() love.filesystem.setIdentity(filesystem_identity) local bl...
by Xii
Mon May 03, 2021 8:45 pm
Forum: Support and Development
Topic: Coordinates for lines vs points (and pixel grid alignment for points)
Replies: 20
Views: 18024

Re: Coordinates for lines vs points (and pixel grid alignment for points)

In particular, double-precision floating-point numbers can exactly represent all integers from -9007199254740992 to 9007199254740992 inclusive. The first integer they can't exactly represent is 9007199254740993 = 2^53 + 1. Oh, ok. I've been taught to never assume floating point is exact, ever. :cra...
by Xii
Mon May 03, 2021 8:42 pm
Forum: Support and Development
Topic: How to Generate Gibberish voices
Replies: 14
Views: 11543

Re: How to Generate Gibberish voices

Record short voice samples, then play them randomly in rapid succession.

Actual AI generated gibberish is a new technology that hasn't matured yet. A couple years out.