News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu
avatar_teopl

wincpctelera - create a smooth windows port of a game

Started by teopl, 13:39, 25 April 20

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

teopl

Hello! :)

I am using wincpctelera for game development mainly for debugging and it's a really great thing for that purpose.

However I am wondering if it can be used in porting the game to windows and still work smooth like on real hardware?

Currently I have issue that game has a delay after keyboard input and acts "not smooth" in general.

I calculate object positions based on time I have from interrupt handler function and then I looked into that and I saw that on wincpctelera interrupt handler is called in non equal intervals (2,3,4,5,... ms). Can I make wincpctelera to call it exactly 300 times per second in equal intervals?

I then tried to call the handler from a separate thread loop and got better precision but screen is blinking constantly. Can this be avoided?

So before I spend more time on investigation I would like some advice if someone has similar issues or hopefully a solution to this.

Arnaud

Hi @teopl,
you can try the latest version i just committed, i removed some useless tempo and changed the interruption function.
Now it seems to be always closed to 3ms and the keyboard input is read every 1ms.

Hope it's better otherwise i'll need a little code example with the problem

Arnaud

teopl

Thanks for ultra fast response :) It works now much much better!

Btw, I had issue opening .sln file so I merged the code from the older commit and also I removed the log WinCpcTelera_PrintInt("Int" not to slow down.

But, it works!

Arnaud

Quote from: teopl on 14:29, 25 April 20
Thanks for ultra fast response :) It works now much much better!

Btw, I had issue opening .sln file so I merged the code from the older commit and also I removed the log WinCpcTelera_PrintInt("Int" not to slow down.

But, it works!

Oops i forget to remove traces  ;D Great if it works better.

Concerning your Windows port, what will you do with sound ?



teopl

That is what I am thinking now, I converted .aks songs to .wav using SongToWav.exe and I will try to play it the windows way :)

Maybe I will later add some sound library - do you have some suggestion regarding the sound?


teopl

Just tried this and it plays .mp3 fine https://github.com/dr-soft/miniaudio
I will see if it will be good when it comes to changing the songs, playing sfx, ...

If someone knows a better lib for mp3/ogg playback which is minimal and simple, please reply.

Powered by SMFPacks Menu Editor Mod