Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - CoolieCoolster

Pages: 1
1
Thumby / Accurate usage of the Thumby.Audio.Play function
« on: November 08, 2021, 06:15:12 PM »
As I wanted my game, NanoMem, to make use of the Thumby's audio capabilities, when finalizing the function that illuminates the pattern outputs I assigned each output a frequency value that matched forth-octave notes. Unsure what the optimal volume would be, I had left the third field of the function blank so that it would default to the preset of 50%. After asking someone who had received a pre-release unit to test NanoMem for functionality, as they said the audio was very quiet I modified the audio output functions with the values of the third field set to the maximum value defined in the API. When they tried the modified version, however, there was no audio at all; is there another factor I may have missed?

2
Thumby / Addition of third-party games to the pre-loaded set?
« on: October 31, 2021, 02:10:51 AM »
As there's still at least two weeks until any production begins, and I would imagine still some time after that until devices are assembled and flashed with firmware, perhaps the addition of completed third-party Thumby games to the default set of five could be something to consider as a means of giving the device additional functionality out of the box? While users can always add and remove games based on their preferences, I thought that perhaps the inclusion of third-party games completed prior to whenever firmware flashing will begin could serve as both a means of encouraging additional third-party development and adding to the first impressions that the user would have in regards to the capabilities of the Thumby.

In regards to my own projects, if NanoMem's implemented button-select sound effects work on actual hardware, and if I can figure out how to use the functions transposed from "Pickle" to save the "hard mode unlock" and six high score values to a text file, I would be glad to contribute it, should the creator of TinyMem not have any objections.

3
Thumby / NanoMem v1.5 and Question Regarding NanoBird Animation
« on: October 29, 2021, 12:51:31 AM »
After analyzing other Thumby programs, I improved NanoMem for a v1.4 release that reduces the space used by functions and bitmap data, offsetting my addition of the "pickle" function that I intend to use for serializing save data, once I figure out how it works. As implementing such functionality will take up more storage space, hopefully I can offset it with additional function and bitmap usage efficiency improvements, considering how simple the game is.

Secondly, I've also included a non-gameplay version of my current project, NanoBird, intended to be a Flappy Bird demake. While I'm still working on actually making it functional, nearly all graphics intended for the final release are included (in two palettes for the day/night modes of Flappy Bird, but after everything is implemented I'll test a palette swap function to see whether or not it impacts performance). The question I have regarding it is how Flappy Bird should be animated both before and after gameplay begins (with the former being on the title screen and before the player presses a button on the gameplay screen). On the title screen I intend to have an animated version of the original Flappy Bird sprite, too large for gameplay purposes, moving from the left side of the screen to the right side, followed by the smaller "gameplay" Flappy Bird. I currently have this animation partially implemented, albeit in a manner that is probably inefficient. What I'm having trouble with is synchronizing the animation of Flappy Bird's wing with that of Flappy Bird itself, as it switches between its three frames 25% faster (0.5 vs 0.67 seconds), something I want to try to implement. If anyone who looks at the code might know how to make it work, it would be much appreciated!

Edit: For NanoMem v1.5, I fixed a regression in regards to the detection of button inputs for exiting the high score screen and implemented the saving of high scores to variables once a match ends. The last step will be to have the variables saved to a text file whenever they are modified, and load them from the text file whenever the main menu loop starts.

Edit 2: As requested in the comments, for v0.02 I updated NanoBird to animate the currently-selected button on the menu. I also tried making the wing animation slightly less broken, but the entire function probably just needs to be cleaned up and simplified... To keep the two sets of NanoMem/NanoBird versions available for reference, future updated versions will either be posted in the comments or as a new thread.

4
Thumby / Template Function for Static Animations
« on: October 23, 2021, 02:11:17 AM »
As I was adjusting the function that animates the "Select Speed" text in NanoMem, I thought that creating a template for it might be helpful should others want to replicate the functionality. While I currently only use it for upwards, vertical animation, the template below has aspect ratio and directional input variables that can be set to choose which of the four animation types is being used. Perhaps at some point a page could be created to compile templates for various functions as to make the game creation process simpler for those doing so for the first time.

While I tried to name the input variables in a way that makes sense, I'll give a brief description of each below:

- line_count: The number of lines, vertical or horizontal, in the frame of animation.
- line_length: The number of pixels long that each line is.
- total_line_count: The total number of lines that the animation cycles through.
- x & y: Coordinate that the highest or leftmost line of the animation would be "blitted" at.
- aspect_ratio: If the animation is vertical, this should be set to 0, while if it's horizontal, this should be set to 1.
- direction: If the animation goes rightwards or downwards, this should be set to 0, while if it does leftwards or upwards, this should be set to 1.
- speed: The time in milliseconds between each frame of animation.

Code: [Select]
def animate(line_count,line_length,total_line_count,x,y,aspect_ratio,direction,speed):
    current_line=0
    line_limit=total_line_count-1
    while aspect_ratio==0:
        if direction==0:
            frame_edge=y+line_count
            line_switch=lambda a,b: a-b
        elif direction==1:
            frame_edge==y
            line_switch=lambda a,b: a+b
        while(1):
            if current_line>line_limit:
                current_line-=current_line
            for i in range(line_count):
                if current_line+i>line_limit:
                    prevent_overflow=line_limit
                else:
                    prevent_overflow=0
                thumby.display.blit(line_set[current_line+i-prevent_overflow],x,line_switch(frame_edge,i),line_length,1)
            thumby.display.update()
            wait(speed)
            current_line+=1
       
    while aspect_ratio==1:
        if direction==0:
            frame_edge=x+line_count
            line_switch=lambda a,b: a-b
        elif direction==1:
            frame_edge==x
            line_switch=lambda a,b: a+b
        while(1):
            if current_line>line_limit:
                current_line-=current_line
            for i in range(line_count):
                if current_line+i>line_limit:
                    prevent_overflow=line_limit
                else:
                    prevent_overflow=0
                thumby.display.blit(line_set[current_line+i-prevent_overflow],line_switch(frame_edge,i),y,1,line_length)
            thumby.display.update()
            wait(speed)
            current_line+=1

The main purpose for animating with lines rather than whole frames is not only because the lines can be reused each time the frame is redrawn, but also because the lines themselves are often the same, especially when the the line length is short. For instance, while my "Select Speed" animation in NanoMem cycles through 90 lines, as each line is only three pixels long, the data for the lines can be referenced from an array of only seven 1x3 pixel bitmaps, avoiding the excessive use of storage space. If anyone interested in using the template has any questions, I'll be glad to answer them below.

5
Thumby / Option to Turn the Thumby Emulator Sideways
« on: October 22, 2021, 12:28:13 PM »
As I wrap up major updates to NanoMem, in considering which idea from my "High Likelihood of Adequate Functionality" list to work on next, I've decided to try to implement NanoBird, my mockup of a Flappy Bird demake. As my mockup assumes that the user has the Thumby held sideways for the purpose of having a tall aspect ratio (which is also the case for several of my other demake mockups), I was wondering if it would be possible to implement an option to emulate the Thumby tilted sideways, with the arrow keys remapped accordingly? All my mockups assume that the Thumby would be tilted with the D-Pad on the bottom, though in case anyone else has an idea that would have the device flipped the other way around, perhaps the option for Thumby emulation tilted in either direction would be helpful.

6
Thumby / First Finished Build of NanoMem
« on: October 21, 2021, 11:29:23 PM »
To try to learn some of the basic functions of MicroPython in order to work on the more complex ideas I had, I adapted the font-based Thumby memory game TinyMem to use bitmap data instead. While I added sound functionality that I think should work and began working on high score saving by writing to a text file, since the emulator doesn't support those functionalities, I'll have to finish implementing them when my Thumby arrives. Otherwise, the game is pretty much finished, but let me know if there's anything that could be done to reduce the file size or otherwise improve the efficiency of the various functions. While the attached commented version of the program is 11KB, as it's only 9.5KB with the comments removed, hopefully with a bit more work it can go down to 7KB or so. Making additional use of the new sprite mirroring functionality would have helped in this regard, though as it seems that sprites are often corrupted via this method, for now I'll just have to make do with having extra bitmap data.

Should anyone want to collaborate with one of their ideas or one of my game mockups (such as potential Pac-Man, Calculator, Flappy Bird, and 2048 ports, among others),  I'd be glad to do so! If so, perhaps a temporary Discord group or something could be setup until there's an official server. While I still much prefer the graphical, rather than technical, element of this game making process, hopefully that that will improve with a few more games.

Edit: Made a few modifications to improve performance.
Edit 2: Tried to divide the circle into eight sprites that could theoretically be reduced to one if sufficiently mirrored and rotated, but a function that does that automatically would be necessary to avoid the added Blit functions removing any benefit gained by the reduced bitmap data.
Edit 3: While I've primarily moved on to working on NanoBird, if there's anything else that needs improved with NanoMem feel free to let me know. Version 1.3 is slightly bigger than Version 1.2 as it updates the number display function to enable the centering of the "Round X" number.

7
Thumby / Thumby development Discord server or something similar?
« on: October 18, 2021, 05:21:37 PM »
While I've spent several hours over the past few days trying to figure out how the various functions of the various existing programs work, as I've made quite little progress in understanding why my implementations of the functions break so often, perhaps a Discord server (or some other real-time communication method) could be created to complement the forum? While I could ask each and every question here, not only would many of them be so insignificant as to be a waste of an entire thread, but the frequency at which I would have questions would lend itself more to a real-time form of communication, such as a Discord server. In addition to allowing developers to share projects and ideas with each other more easily, perhaps it could be expanded later on to include other Thumby-related channels?

8
Thumby / Extracting sprites from bitmap data?
« on: October 18, 2021, 01:38:20 AM »
As a means of learning one or two things about Python, I've begun to try implementing my calculator idea, hopefully one I can manage after a bit of trial and error despite my lacking Python abilities. As using the default font wouldn't allow me to fit nearly enough characters on screen at once, I added bitmaps for each of the 25 or so three pixel wide characters that could be used in an operation. While I considered just drawing all of these to the screen in addition to avoid having to take up extra space with a fullscreen bitmap, I realized that the text needed to add all the characters to the screen would eliminate any saved space. Therefore, I was wondering if there were a way to instead define sprites based on their coordinates in the 72x40 bitmap image, as it doesn't seem that coordinate data is directly included in the bitmap data, other than the fact that each column has its own entry for up to eight rows. If it's possible, I imagine not having the character set icons defined twice might save some space.

Attached is my latest "version" of NanoCalc, with nearly all graphics I intend to use included. Next I intend to try to figure out how to add in logic so that it knows which box is currently selected and flicker the white rectangle of that box, so if anyone has suggestions for that, that would also be appreciated!

9
Thumby / My Game Mockups
« on: October 17, 2021, 02:12:09 AM »
While I lack any knowledge of Python, I still wanted to contribute in some way to bringing interesting games to the Thumby, so I made mockups of potential Calculator, Flappy Bird, Tetris, Pac-Man, and Solitaire implementations. Attached is a Thumby "program" I made after analyzing several existing programs that loads the title screen of NanoCalc, my calculator app mockup, with the A button set to load the calculator screen itself. While I intend to continue analyzing Thumby programs to try to better understand how they work, I thought that perhaps, if anyone who knows Python had a Thumby game idea similar to any of mine, it might be beneficial to work together. While I'll continue adding onto my existing mockups and seeing what other games might be feasible to demake to the Thumby, if anyone were willing to help with the technical aspect of implementing any of the ideas I listed above, I'd be glad to finish the creating graphics for the specific game. For the four non-calculator ideas, I've included bitmap data of the mockup images I made for them in the calculator program.

Pages: 1
SMF spam blocked by CleanTalk