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.

Messages - kuran_kuran

Pages: 1 2
Tiny Arcade / Re: SdFat and directories
« on: June 20, 2018, 03:47:27 AM »
Please use SdFat in the new version of SuperOteme.(

Tiny Arcade / Re: New game for TinyArcade
« on: July 25, 2017, 07:57:37 PM »
KemonoRogue updated.
- Fixed that the display of Toki's attack power was 1. - English version. - Japanese version.

There are Japanese version and English version. rest assured.
GameData.cpp - line 25-26 to switch languages.
I am very sleepy.


Tiny Arcade / New game for TinyArcade
« on: July 24, 2017, 10:24:26 AM »
It is New!
*KemonoRogue Version 1.00
It is an rogue-like game of animation 'Kemono Friends'.

*TinySTG Version 1.02
Added new stage.

There is also an Android version.

I was able to write data to the SD card.
Thank you for giving me good advice.

*Program Changes
My sample

Added Line 3
#include <Wire.h>
#include <SPI.h>

Line 21
if("Sample.txt", O_RDWR | O_CREAT))
if("Sample.txt", O_WRITE | O_CREAT | O_TRUNC))

Line 30
if("Sample.txt", O_RDWR | O_CREAT))
if("Sample.txt", O_WRITE | O_CREAT | O_TRUNC))


Line73 and 76
while(SERCOM1->SPI.INTFLAG.bit.DRE == 0);
while(SERCOM1->SPI.INTFLAG.bit.DRE == 0 || SERCOM1->SPI.INTFLAG.bit.RXC == 0);

Data can not be saved on the SD card.
I am still in trouble.

Do you know how to write data to SD card with TinyArcade?
I want to save game data with SdFat library but I will fail by mistake.
If Sample.txt exists on the SD card, only 1st succeeds. 2nd will fail.
If Sample.txt does not exist, both 1st and 2nd will fail. zero byte Sample.txt is created.

#include <TinyScreen.h>
#include "SdFat.h"

TinyScreen tiny_screen = TinyScreen(TinyScreenPlus);
SdFat sd_fat;
int write_bytes1 = -1;
int write_bytes2 = -1;

void setup()
   // Initialize SD card
   sd_fat.begin(10, SPI_FULL_SPEED);
   // Initialize screen
   tiny_screen.setBrightness( 8 );
   tiny_screen.fontColor(TS_8b_White, TS_8b_Black);
   // Write file 1st
   SdFile file1;
   if("Sample.txt", O_RDWR | O_CREAT))
      char text[128];
      sprintf(text, "123456 text");
      write_bytes1 = file1.write(text, 12);
   // Write file 2nd
   SdFile file2;
   if("Sample.txt", O_RDWR | O_CREAT))
      char text[128];
      sprintf(text, "654321 text");
      write_bytes2 = file2.write(text, 12);

void loop()
   char text[128];
   sprintf(text, "1st %dbytes", write_bytes1);
   tiny_screen.setCursor(0, 0);
   sprintf(text, "2nd %dbytes", write_bytes2);
   tiny_screen.setCursor(0, 14);

Tiny Arcade / Re: New game and movie converter
« on: April 12, 2017, 12:20:20 PM »
Hi again- sorry about the slow response, thank you very much for the development of your games and publishing so much, we are very happy to publish it of course.

I thought I saw a scaling/rotating example on your site at some point, that was working but slow- did I imagine that? Is it something we could investigate optimizing?


Scale or rotation uses the DrawSprite of the Screen class.(Screen.cpp/Screen.hpp)
It simply uses sin and cos.
However, I could not think of any way to optimization it.

void Screen::DrawSprite(int destination_x, int destination_y, int destination_left, int destination_top, int destination_right, int destination_bottom, const void* source_buffer, int source_x, int source_y, int source_width, int source_height, int color_key, int rotate, int scale);
int destination_x (destination rectangle center of rotation)
int destination_y (destination rectangle center of rotation)
int destination_left (destination rectangle)
int destination_top (destination rectangle)
int destination_right (destination rectangle)
int destination_bottom (destination rectangle)
const void* source_buffer (draw image data)
int source_x (source image center of rotation)
int source_y (source image center of rotation)
int source_width (source image width)
int source_height (source image height)
int color_key (Transparent color code)
int rotate (0~255)
int scale (2~255=small, 256=same, 257~=big)

(example) line 69 of MainLoop.cpp of TinySTG rewritten as follows.

// Draw logo
screen.DrawSprite(image_data->buffer, 0, 0, image_data->width, image_data->height, 0);

// Rotate logo
screen.DrawSprite(96 / 2, 64 / 2, 0, 0, 95, 63, image_data->buffer, image_data->width / 2, image_data->height / 2, image_data->width, image_data->height, 0, global.count, 256);

// Scale logo
// scale = 2~ (It is bug.I want to 0~.)
screen.DrawSprite(96 / 2, 64 / 2, 0, 0, 95, 63, image_data->buffer, image_data->width / 2, image_data->height / 2, image_data->width, image_data->height, 0, 0, 2 + global.count);

Tiny Arcade / Re: New game and movie converter
« on: April 07, 2017, 10:38:06 AM »
I saw a blog. Thank you for introducing my game. I'll let you know when a new game is completed.

Tiny Arcade / Re: Partnumbers
« on: March 31, 2017, 11:21:58 PM »
This sample program display version of controller.
Please expand and put it in the SD card and execute it.

Controller sample.

Tiny Arcade / Re: Displaying the weather in the TinyArcade
« on: March 30, 2017, 09:28:06 AM »
Download the Time library on your library folder.

Tiny Arcade / Re: New game and movie converter
« on: March 24, 2017, 12:35:25 PM »
TinySTG and SuperOteme updated.
SuperOteme source file released.
I updated a screenshot of TinySTG and SuperOteme.

SuperOteme Version 1.02
TinySTG Version 1.01

Tiny Arcade / Re: New game and movie converter
« on: March 22, 2017, 07:10:02 PM »
Didn't get a chance to comment on this- great work, we were really impressed with TinySTG at the office. We would like more people to see it and hope to publish it on our main games page- we would like to put SuperOteme up as well, do you plan to publish source code and screenshots?

Please wait a moment as I upload the latest version of SuperOteme and TinySTG and a screen shot on the weekend.

Tiny Arcade / Re: New game and movie converter
« on: March 04, 2017, 11:39:24 AM »
Take a look at writeBufferDMA in TinyScreen.cpp. Not only is the data transfer slightly faster, the main advantage is that the DMA transfer will run without using the CPU, so you can continue preparing the next frame in a second buffer without waiting for the transfer to finish. You will have to wait for the transfer to finish before the next transfer occurs, but at least you can run processing and transfers in parallel. I used a double buffer with DMA here:

and got almost double the framerate due to the parallel nature of DMA. Of course, this uses a lot of memory to maintain two buffers :)

It is amazing. It is 232-239 FPS. great. It will be helpful.

Tiny Arcade / Re: New game and movie converter
« on: March 02, 2017, 10:11:56 AM »
I love your project all useful and fun for me.
I have a quick question if you can share your experience ?
How you design the game ? as I know the development environment there is no much sketch library can shortly draw the game layout so I think the possible way is store each game material in BMP format. then just in each frame put all material in frame buffer , But I think it may cause Gaming not  smooth.

Thank again your sharing

It is difficult for me to use English.
I may be wrong but about screen rendering?
Prepare an array of 96 * 64 bytes(256 color mode), edit it and transfer it to the screen.
Transfer from SRAM to the screen is slow, so it is good to reduce the number of times.
In my game I transfer to the screen only once at the end of every frame.

Sprite sample

30FPS sample

A program source of TinySTG is also helpful.

Bmp or png to C converter(Japanese only...)

Pages: 1 2
SMF spam blocked by CleanTalk