Search found 9 matches

by Djehuti
Sun May 12, 2024 3:10 pm
Forum: Libraries and Examples
Topic: ZCM/PCM-player without use of library
Replies: 2
Views: 2316

Re: ZCM/PCM-player without use of library

I like your indentation style and I'm going to steal it. ;)
by Djehuti
Thu May 09, 2024 9:51 pm
Forum: Libraries and Examples
Topic: Prog8 library for frame-based applications (read: games/demos)
Replies: 14
Views: 6412

Re: Prog8 library for frame-based applications (read: games/demos)

Ants seems like is a good demo to show how to use the library. I think extending the ant demo might be best done by those who take the time to invest in learning how to use the library. That sounds like a fine idea to me. ;) That frees you up for your original goal of porting your early program to ...
by Djehuti
Thu May 09, 2024 9:47 pm
Forum: Libraries and Examples
Topic: Prog8 library for frame-based applications (read: games/demos)
Replies: 14
Views: 6412

Re: Prog8 library for frame-based applications (read: games/demos)

What's a bool? I meant that for music I will just have a "playing/not" to skip the frame function when the music is paused (as opposed to taking it out of the frame task list). In asm this is a byte, but the only thing that's important about this byte is whether or not it's 0. In prog8 th...
by Djehuti
Sat May 04, 2024 2:43 am
Forum: Libraries and Examples
Topic: Prog8 library for frame-based applications (read: games/demos)
Replies: 14
Views: 6412

Re: Prog8 library for frame-based applications (read: games/demos)

Thanks. I like the idea of the aardvark, I might use that. I did think about leaving a dead ant on the screen in another color for a few frames, and that might be a fun extension too. I was also thinking that I could make new ants orange until their first move, to highlight them when they pop up. My...
by Djehuti
Fri May 03, 2024 7:19 pm
Forum: Libraries and Examples
Topic: Prog8 library for frame-based applications (read: games/demos)
Replies: 14
Views: 6412

Re: Prog8 library for frame-based applications (read: games/demos)

The ants work now. They're (dumb-looking) PETSCII ants, not sprites, so no VERA limitation there. ;) The ant demo is here: https://github.com/djehuti/x16-framer/blob/main/examples/ants.p8 . 3130 I can have as many of them as I have (a) slots in the one-shot ringbuffer, and (2) time to animate during...
by Djehuti
Wed May 01, 2024 5:54 pm
Forum: Libraries and Examples
Topic: Prog8 library for frame-based applications (read: games/demos)
Replies: 14
Views: 6412

Re: Prog8 library for frame-based applications (read: games/demos)

BTW if you can keep your mob state small enough to fit in 16 bits, that state can just live in the argument part of the ringbuffer and take up 0 extra space. So you could (for example) use 2 bits for a 4-frame countdown timer, 6 bits each for x/y coordinates, and 2 bits for direction, and not need t...
by Djehuti
Wed May 01, 2024 5:04 pm
Forum: Libraries and Examples
Topic: Prog8 library for frame-based applications (read: games/demos)
Replies: 14
Views: 6412

Re: Prog8 library for frame-based applications (read: games/demos)

Overloads to only add a task if it isn't already in the queue. For example, in a multiplayer game, if two players press the Start button on the same frame, the game should only attempt to pause once. Being able to remove a task from the queue without having to reset it completely could be nice. E.g...
by Djehuti
Wed May 01, 2024 4:57 pm
Forum: Libraries and Examples
Topic: Prog8 library for frame-based applications (read: games/demos)
Replies: 14
Views: 6412

Re: Prog8 library for frame-based applications (read: games/demos)

Thanks for the feedback, all! Yes, I've thought a lot about the "every N frames" thing, or "schedule this task for the next N runs" or "run this task N frames in the future", but all of those would require me implementing a counter in the framer(Private) to keep track o...
by Djehuti
Wed May 01, 2024 4:53 am
Forum: Libraries and Examples
Topic: Prog8 library for frame-based applications (read: games/demos)
Replies: 14
Views: 6412

Prog8 library for frame-based applications (read: games/demos)

I've put a new prototype, called x16-framer , on Github: https://github.com/djehuti/x16-framer It's a prog8 library (put it in your project or in a shared source directory and import it) to manage an event loop with two kinds of tasks on it: "frame tasks" to be executed every frame (e.g. t...