TinyCircuits

TinyCircuits Products => Tiny Arcade => Topic started by: kuran_kuran on February 28, 2017, 11:12:13 AM

Title: New game and movie converter
Post by: kuran_kuran on February 28, 2017, 11:12:13 AM
SuperOteme : Jump action game.
http://daimonsoft.info/kuran_kuran/index.php?TinyArcade%2FSuperOteme

TinySTG : 2D shooting game.
http://daimonsoft.info/kuran_kuran/index.php?TinyArcade%2FTinySTG

TsvTool :  tsv movie Converter
http://daimonsoft.info/kuran_kuran/index.php?TinyArcade%2F%C6%B0%B2%E8%A5%C7%A1%BC%A5%BF%BA%EE%C0%AE
Title: Re: New game and movie converter
Post by: lfreed on February 28, 2017, 05:39:02 PM
Hey kuran_kuran, love TinySTG! It's a ton of fun. I am having some problems with the video converter. I can run the program, but when I select a file (.avi) and select "Convert", it says it's done converting but nothing happened. There is no converted video in my folder. Do videos need to be a 3 : 2 ratio to be converted? Is there a file size limit? Or, do I need to have certain drivers or software to run your program? I would appreciate your help determining the problem.
Title: Re: New game and movie converter
Post by: kuran_kuran on March 01, 2017, 08:38:11 AM
Thank you for playing my game!

>Do videos need to be a 3 : 2 ratio to be converted?
automatically adjust.

>Is there a file size limit?
If there are restrictions it may be 2GB or 4GB.

>do I need to have certain drivers or software to run your program?
there is no need.

select "Convert". temp folder created?
is there a png and wav in temp folder?
please also try mp4 or mpg.

Sorry, my English is not good.
Title: Re: New game and movie converter
Post by: kuran_kuran on March 01, 2017, 09:26:39 AM
I found a converter bug.
Are you possibly in the same folder as TsvTool.exe?
Please try using Version 1.02.
Title: Re: New game and movie converter
Post by: lfreed on March 01, 2017, 12:55:14 PM
A "temp" folder was created, but contained no files. I did attempt to convert an mp4 with no results. The videos I picked were not in the same folder as the program. I will give ver 1.02 a try this afternoon. No worries about your English - I really appreciate your help!
Title: Re: New game and movie converter
Post by: beermat on March 01, 2017, 02:16:43 PM
Love the games! Thanks for posting!
Title: Re: New game and movie converter
Post by: lfreed on March 01, 2017, 04:07:55 PM
1.02 is still not working. Both mp4 and avi files create temp folder, but there are no files in the folder. I ran it in administrator mode to see if it was a permissions problem, no results. However, I figured out something new - the program does work on my personal laptop. My problem is getting it to work on my company computer. They both run on Windows 10. Both are 64x processors and 64 bit OS. If you need any additional information to determine this bug, I'm happy to provide it.
Title: Re: New game and movie converter
Post by: kuran_kuran on March 01, 2017, 06:18:14 PM
Love the games! Thanks for posting!

Thank you for very much!
Title: Re: New game and movie converter
Post by: kuran_kuran on March 01, 2017, 06:21:43 PM
1.02 is still not working. Both mp4 and avi files create temp folder, but there are no files in the folder.
It is an error in converting movies to png or wav.
I will take time on weekends. Thank you.
Title: Re: New game and movie converter
Post by: lfreed on March 01, 2017, 10:05:12 PM
1.02 is still not working. Both mp4 and avi files create temp folder, but there are no files in the folder.
It is an error in converting movies to png or wav.
I will take time on weekends. Thank you.

No rush! Thank you for being so helpful. I've been looking for an application type TSV converter, and yours is perfect! My coworkers tested it on their computers, and it works for them. I have a feeling my desktop PC may be an exception.
Title: Re: New game and movie converter
Post by: steven on March 01, 2017, 10:32:57 PM
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
Title: Re: New game and movie converter
Post by: kuran_kuran on March 02, 2017, 09:53:42 AM
No rush! Thank you for being so helpful. I've been looking for an application type TSV converter, and yours is perfect! My coworkers tested it on their computers, and it works for them. I have a feeling my desktop PC may be an exception.
Thank you for your concern.
Please try using version 1.03.
The file management method was changed from relative path to absolute path.
Title: Re: New game and movie converter
Post by: kuran_kuran 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
http://daimonsoft.info/kuran_kuran/index.php?TinyArcade%2F%B2%E8%CC%CC%C9%BD%BC%A8

30FPS sample
http://daimonsoft.info/kuran_kuran/index.php?TinyArcade%2F30FPS%A4%C7%B2%E8%CC%CC%C9%BD%BC%A8

A program source of TinySTG is also helpful.
http://daimonsoft.info/kuran_kuran/index.php?TinyArcade%2FTinySTG
Screen::DrawSprite()
Screen::DrawSpriteNoClip()

Bmp or png to C converter(Japanese only...)
http://daimonsoft.info/kuran_kuran/index.php?TinyArcade%2F%B2%E8%CC%CC%C9%BD%BC%A8%CD%D1%A4%CE%B2%E8%C1%FC%A5%C7%A1%BC%A5%BF%BA%EE%C0%AE

Title: Re: New game and movie converter
Post by: steven on March 02, 2017, 08:39:05 PM
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
http://daimonsoft.info/kuran_kuran/index.php?TinyArcade%2F%B2%E8%CC%CC%C9%BD%BC%A8

30FPS sample
http://daimonsoft.info/kuran_kuran/index.php?TinyArcade%2F30FPS%A4%C7%B2%E8%CC%CC%C9%BD%BC%A8

A program source of TinySTG is also helpful.
http://daimonsoft.info/kuran_kuran/index.php?TinyArcade%2FTinySTG
Screen::DrawSprite()
Screen::DrawSpriteNoClip()

Bmp or png to C converter(Japanese only...)
http://daimonsoft.info/kuran_kuran/index.php?TinyArcade%2F%B2%E8%CC%CC%C9%BD%BC%A8%CD%D1%A4%CE%B2%E8%C1%FC%A5%C7%A1%BC%A5%BF%BA%EE%C0%AE

Thanks your response.
So each frame update is after render all materials then transfer to SRAM if I did not miss.
Something let me surprise as seems your sound and control action very smooth if your game use  30FPS to update frame.  :)
Your code help me a lot thanks again.
Title: Re: New game and movie converter
Post by: beermat on March 04, 2017, 01:25:02 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 :)
Title: Re: New game and movie converter
Post by: kuran_kuran 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.
Title: Re: New game and movie converter
Post by: Ben Rose 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
Title: Re: New game and movie converter
Post by: kuran_kuran 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.
Title: Re: New game and movie converter
Post by: kuran_kuran 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
Title: Re: New game and movie converter
Post by: TonyA. on March 31, 2017, 04:44:03 PM
Great work, thanks for sharing!!
Title: Re: New game and movie converter
Post by: kuran_kuran 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.
Title: Re: New game and movie converter
Post by: Ben Rose 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
Title: Re: New game and movie converter
Post by: kuran_kuran 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);