News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu
avatar_Arnaud

WinCPCTelera

Started by Arnaud, 20:58, 29 September 16

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Arnaud

#125
Quote from: teopl on 20:58, 13 August 20
What else can cause lag - input, drawing, some thread being stuck... I don't know

Can you send me your wincpctelera project including your game code, i really don't understand what slow down your game.

Quote from: funkheld on 08:02, 14 August 20
I think we windows users want to play with wincpctelera and not debug. here an equivalence should be established between cpctelera and wincpctelera.

I'm agree, but this is not an emulator just an API for windows and reproduce the CPC timing is this way is really hard. But the source code is provided if anybody can see how improve it, it will be welcome :)




Well it's not perfect but playable and with some manual tempos tweaks it can reaches something near of CPC speed. It's what i'm doing when it's too fast.

awergh

Decrunching to video memory works great  :) , but there are some other graphical issues.
Looking at my previous projects I have similar issues with all of them but on a positive note I see that the scrolling works for my first game.


Last years game seems to move really fast as well, it is not just graphically off.




Arnaud

#127
Thanks a lot to send me your project, with it i fixed a some bugs and i made wincpctelera x64 compatible.

Testing is in progress but background color is fixed and the speed is slow down.

teopl

Quote from: Arnaud on 08:20, 14 August 20Can you send me your wincpctelera project including your game code, i really don't understand what slow down your game.

Like most people I also lack time to finish the project and to debug in more detail. Until then windows port is not in my focus, but thanks for your help, I will probably need it at some point and contact you :)

Arnaud

#129
Repo updated :
- Fix cpct_px2byteM0 and cpct_px2byteM1 (now it's same pixel encoding as cpctelera)
- Slow down sprite display
- Fix x64 warning compilation

Tested with fitzroy 3 and 4, DeeperWarrens and my current cpcretrodev project.

awergh

My new project now looks right now.
Fitzroy 3 feels like everything is working as it should.
In Fitzroy 4 it looks right but I move multiple times instead of once with each key press making the game unplayable.
In 1 and 2 on the menus you cannot see which item is selected.
Also in 2 the hud appears to be the wrong colour (not matching the background).

I am guessing you haven't updated cpct_drawStringM0 following your changes.
I don't use it in my games any more so thats why its not a problem for my newer games.

Arnaud

#131
 
Quote from: awergh on 14:11, 15 August 20
I am guessing you haven't updated cpct_drawStringM0 following your changes.
I don't use it in my games any more so thats why its not a problem for my newer games.
Yes the cpct_drawString functions have changed in cpctelera 1.5.0, but with code correction the menu seems OK
[attach=1,msg191265]

Quote from: awergh on 14:11, 15 August 20In Fitzroy 4 it looks right but I move multiple times instead of once with each key press making the game unplayable.
I can't found the right temporisation in draw functions because if there are too many calls the game will be too slow. In this case the only good solution is to put a manual tempo in main loop.


Well good news, no more bug  :D

awergh

Looks good  :) .

It occurs to me that 1,2 were using cpctelera 1.4.0 and 3 was 1.4.2 and only 4 was on a version of 1.5.
That suggests to me that the API has been very stable.
I can see merit in updating projects to the latest version but I haven't really seen much need.

Perhaps there is a way you could allow the speed to be tuned as a wincpctelera specific function or something.
Or I could just put a dodgy wait in to fix the problem.
That said because it is last years project I am not really likely to touch it again unless I wanted to port it to another platform or something.

Arnaud

Quote from: awergh on 08:44, 16 August 20Perhaps there is a way you could allow the speed to be tuned as a wincpctelera specific function or something.
Or I could just put a dodgy wait in to fix the problem.

I could create a Wincpetelera function helper WinCpcTelera_Slowdown() but it would be nearly the same function as WinCpcTelera_Wait(X).
And put a wait in the main loop could solve speed problem and it's not that horrible  :D

awergh

Hi @Arnaud, I thought it was time to update my cpctelera\wincpctelera installs and it looks like there are some files missing in the latest commit on github.

Currently I cannot build the solution because these files are missing.
_helper\wincpctelera_loader.c
_compressors\zx1\wincpct\ZX1Decrunch.c
_compressors\zx1\wincpct\ZX1Decrunch.h

Arnaud

Hi @awergh,
some local files not commited (i feel like at work :D), thank for reporting.

Typhon

I'm currently stepping into the world of CPCTelera development but on Linux, and WinCPCTelera would be very useful for me if I ported it to Linux and use either SDL or SFML (I'm much more familiar with the latter). So I might have a look to see if that is doable. 

robcfg

#137
While I think that being able to make it work on Linux (and MacOS probably as a bonus) it's a good thing, maybe it would be faster for you to run it under Wine.

Edit: I see that it already works with SDL (https://github.com/Arnaud6128/wincpctelera), so it may be an easy port.

Powered by SMFPacks Menu Editor Mod