New game and movie converter

kuran_kuran

  • Full Member
  • ***
    • Posts: 21
    • View Profile
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.


Ben Rose

  • Administrator
  • Hero Member
  • *****
    • Posts: 392
    • View Profile
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


kuran_kuran

  • Full Member
  • ***
    • Posts: 21
    • View Profile
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.


kuran_kuran

  • Full Member
  • ***
    • Posts: 21
    • View Profile
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


TonyA.

  • Full Member
  • ***
    • Posts: 10
    • View Profile

kuran_kuran

  • Full Member
  • ***
    • Posts: 21
    • View Profile
I saw a blog. Thank you for introducing my game. I'll let you know when a new game is completed.


Ben Rose

  • Administrator
  • Hero Member
  • *****
    • Posts: 392
    • View Profile
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


kuran_kuran

  • Full Member
  • ***
    • Posts: 21
    • View Profile
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);


 

SMF spam blocked by CleanTalk