TinyCircuits

New game and movie converter

Re: New game and movie converter
« Reply #15 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:

https://github.com/egonbeermat/fireworks

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.

Re: New game and movie converter
« Reply #16 on: March 21, 2017, 04:29:24 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?

Thanks,
Ben

Re: New game and movie converter
« Reply #17 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.

Re: New game and movie converter
« Reply #18 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
http://daimonsoft.info/kuran_kuran/index.php?TinyArcade%2FSuperOteme
TinySTG Version 1.01
http://daimonsoft.info/kuran_kuran/index.php?TinyArcade%2FTinySTG

Re: New game and movie converter
« Reply #19 on: March 31, 2017, 04:44:03 PM »
Great work, thanks for sharing!!

Re: New game and movie converter
« Reply #20 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.

Re: New game and movie converter
« Reply #21 on: April 11, 2017, 06:34:13 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?

Thanks,
Ben

Re: New game and movie converter
« Reply #22 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?

Thanks,
Ben

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);