Log In  

I'm currently working on a game and I seem to be stuck on something that should be fairly simple.

I want to create arrows under specified conditions (I have a beatmap in the spritesheet) and whenever a beat should happen, an arrow should be created which goes down the screen until it hits the buttons etc etc. The part I'm stuck on seems to be creating those arrows.

From what I gather, I am supposed to be using tables and metatables? I have started some code relating to this but I feel like I am just making guesses, and none of the tutorials that I see cover instance creation.

Also I spent a lot of time working on what I have so far, especially the music, so let me know what you think of the very little that is there.

Cart #35095 | 2017-01-06 | Code ▽ | Embed ▽ | No License
2

P#35096 2017-01-06 14:09 ( Edited 2017-01-07 01:28)

I'm still figuring this out myself, but this thread shows an example of how to do it
https://www.lexaloffle.com/bbs/?tid=28447

P#35100 2017-01-06 16:10 ( Edited 2017-01-06 21:10)
1

I was able to get it working doing parallel tables, which is best i think. Now I have a lot of 'for' loops.

Cart #35107 | 2017-01-06 | Code ▽ | Embed ▽ | No License
1

P#35108 2017-01-06 17:07 ( Edited 2017-01-06 22:07)

I like where this is going. :D

FWIW, the steps-per-beat (IE: Music Speed variable) should be equal to frames-per-tile (so, divide by eight*framerate, that's your per-step movement). Having tiles AND music in conveniently equal multiples is great like that. There's a reason I'm working to improve my compostion skills.

Plus, with support for externalized cartridges (IE: loading one cart from another), we can make a core DDR-like engine, and then simply make a set of songcarts to load within it. You're far from the only of us interested in this. :D

P#35113 2017-01-06 17:20 ( Edited 2017-01-06 22:23)

I have already figured out how BPM works and the only easy speed I've seen so far is 16/32, which in 16 speed means that every 4 frames a beat happens. I also have arrows spawn 256 pixels above their destination, moving at a speed of 2 pixels per frame, and I include a lead-in drum track so that the player will get a feel for the music while also leaving some time for the notes to get down there.

The Pico-8 engine is sort of terrible for use-cases such as this, especially considering that as I've been working on this further I notice desync happening a lot, but I have also been looking into how to compensate for possible desync, since it's possible for you to get data about the music from (stat) and then work with that.

One of the main reasons it's terrible is the strict limitations on music. I'm trying super hard to include 3 tracks on this game but that's probably as much as I can do.

I've been working on this project a ton since last Monday, and I will hopefully make a lot of headway on it tonight and over the weekend. Really at this point I'm past most of the major hurdles I'd think. Now there's just a huge amount of very tiny hurdles.

P#35133 2017-01-06 20:28 ( Edited 2017-01-07 01:28)

[Please log in to post a comment]

Follow Lexaloffle:          
Generated 2024-03-29 12:51:23 | 0.010s | Q:21