News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu
avatar_Joseman

Skool Daze port for CPC (FINISHED)

Started by Joseman, 22:33, 14 May 15

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

KaosOverride

Do you calculate on the fly or use any precalculated table? Maybe some speed can be gained...
KaosOverride · GitHub
MEGA Amstrad Public Amstrad folder

Joseman

Quote from: KaosOverride on 21:24, 28 June 15
Do you calculate on the fly or use any precalculated table? Maybe some speed can be gained...

the 2 things, when i paint the school i use a mini-precalculated table but, when i do the 1bpp - 2bpp it's real time.

And yes, you're right, i started to build a precalculated table with all the spectrum byte occurrences... i really think that a LOT of speed can be gained (and some other thing ;))

Thanks for the tip, it's the next that i will do, but as i said, now i have 2 works, this update will come with some delay...





Joseman

#77
Hi

Quick update of the next beta:

*The routine to print a tile is now using precalculated data (as @KaosOverride suggested), the routine without precalculated data wasted 107us EVERY painted tile, now, it waste 64us, 43us we gain EVERY tile painted, that's for sure a big improvement, the game now runs very quick (not the scroll, only the tile paint), and i'm pretty sure that now it's very approximate to de spectrum speed. When a lot of sprites are in screen, the slowing down occurs on spectrum too.

*The routine to display the bubble speech is now a lot optimized it gains 50,0000 us every time it's called!!! now the bubble is MORE quick than on spectrum version!  :laugh: , on the past betas the speech bubble was displayed quick because a trick that i used: on spectrum the characters are set to "slow" to talk, on amstrad i was setting the characters to "quick" to talk, hence the quick text. Now the character is set to "slow" like on spectrum and the bubble is even more quick.

That means too that the game is overall more quick, because of the incredible waste of 50,0000us every time that a character was speaking every 2 letters (teachers on other rooms plus teacher on our classroom), all the game was slowing down, now this is solved. The 43us gained on the tile paint is clearly visible when there are not much characters on screen, Eric will run like hell (before even on this situation Eric was very slow)

I will not publish this beta, i have more ideas to do before...

KaosOverride

KaosOverride · GitHub
MEGA Amstrad Public Amstrad folder

Joseman

Quote from: KaosOverride on 01:07, 06 July 15
LOL  Turbo Skool Daze!!!!  :P

Not exactly, to be fair i'm shortening the delay that the game has on the mainloop, thanks to this i can make the impression of the game being more quick than on spectrum, if the delay were shortened on speccy the game will be a lot quick than on cpc!

arnoldemu

@Joseman: I think you're doing great.

I see that now you have the game working you can optimise some of the code for CPC to improve it's speed :)

What would be interesting is if the game could be re-coloured for mode 1. I think this could be possible but it would mean extra ram for the pixels and extra code for the drawing.

EDIT: The job to recolour would be easier (here I mean the coding), because you have the source and this makes it easier to organise for the new code.
My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

Neil79

Ah man I can't wait for the next version then, keep up the great work :D
The latest in Indie & Retro News!!! IndieRetroNews - Indie Retro News on twitter

Joseman

Hi

This night i was playing redoing the logo and colouring it... by the way i implemented aplib and compressed it.

Can anyone tell me a good and powerful sprite cpc editor for windows?

As you see, I don't know how to make a good logo and scorebox section  :laugh: ... IF anyone wants to help me with this, i will be very grateful!




see you!

Morri

I would recommend RGAS (Retro Game Asset Studio) which was written by @lachlank . Excellent PC based program which is easy to use and even includes a level designer and is compatible with CPCtelera.
Keeping it Kiwi since 1977

Neil79

Quote from: Joseman on 23:17, 06 July 15
Hi

This night i was playing redoing the logo and colouring it... by the way i implemented aplib and compressed it

see you!


Nice!! Now all you need is coloured walls :D
The latest in Indie & Retro News!!! IndieRetroNews - Indie Retro News on twitter

zeropolis79

I was thinking it needed some colour to it..

arnoldemu

@Joseman: It is better already!
The colours improve it.

(Also consider a colour split so the score part uses different palette ;) )

Ok i stop now ;)

My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

Joseman

Quote from: Morri on 08:41, 07 July 15
I would recommend RGAS (Retro Game Asset Studio) which was written by @lachlank . Excellent PC based program which is easy to use and even includes a level designer and is compatible with CPCtelera.

Already used RGAS to remake the logo, but i miss some copy & paste options to automatize the tasks... I didn't see this options on RGAS...

Quote from: Neil79 on 11:40, 07 July 15

Nice!! Now all you need is coloured walls :D

Already tried to put 2 colors to walls and 2 colors to sprites... but then you have the anoying spectrum attribute class... it's more hard than you can think... is a BIG task, recolour all and make the sprites to act without attribute class... i don't know if i'll have the patience necessary... if any graphic master helps... maybe...

Quote from: arnoldemu on 13:16, 07 July 15
@Joseman: It is better already!
The colours improve it.

(Also consider a colour split so the score part uses different palette ;) )

Ok i stop now ;)

Already considered colour split... but you loose cpu time for virtual nothing... and you're cheating people with only the score box with different colors...  i don't know... i will think on this when it's time...


Carnivius

How were Spectrum graphics done?  I mean were they all black and white as a base and then had the relevant colours 'switched on' in each 8x8 block?   Is that why this game comes out pure black and white on CPC cos of the different ways they colour?

I think I like the black and white look more than the Spectrum original's seemingly random splashes of unattractive colours.  Makes it look like a era from decades ago like it is (and school experiences have changed a fair deal since the 80's when it came out).   Still it would be fun to have a go at colouring it sensibly if the code allows for it.
Favorite CPC games: Count Duckula 3, Oh Mummy Returns, RoboCop Resurrection, Tankbusters Afterlife

Joseman

#89
Quote from: Carnivac on 15:49, 07 July 15
How were Spectrum graphics done?  I mean were they all black and white as a base and then had the relevant colours 'switched on' in each 8x8 block?   Is that why this game comes out pure black and white on CPC cos of the different ways they colour?

exactly, it's like you describe.

The graphics are purely: "pixel on" or "pixel off", the thing work like this:

first they calcule the attribute ram color address (#5800 - #5AFF) of every 8x8 block they want to colour and put the attributes: colour, brightness & flash.

After that, with a simple calculation based on the attribute ram direction they calculate where the 8x8block they coloured will be painted on the screen ram.

simple as that... on spectrum.

On Amstrad this is a nightmare, the graphic data is 1bpp, and i don't know how emulate the attribute ram of the spectrum (i didn't think too much on it), how many cpu time is needed to do something like that... I think that the original R-Type do something like this on the CPC port. If i have this code perhaps... but the attribute clash will be present on the AMSTRAD!

And the problem is not only the graphics are 1bpp: they are stored in diferent ram locations, at equanimous positions to do the calculations more easy... to recolour the graphics on cpc, the graphics will be twice the size, they need to be moved to their (different) screen locations to another where they fit... i'm not a good coder, not a good graphic designer, but i can see a lot of trouble doin' that...



Joseman

#90
Hi

Today i had some time to take a look to the speech bubble annoying bug of "extra black" pixels on the letters, this was a little hard to track bug, the error could be somewhere on the 4 functions that use the speech bubble, but, at last the bug is corrected.

The problem was (as usual) bad implemented code on the cpc side, things that works on spectrum they wont on cpc, as on speccy they rely on the carry flag to set spaces, but on amstrad i can't rely only on the carry flag to do pixel movement, i have register a and one variable that needed to be re-set every letter (on speccy it worked only with the carry flag not set), whithout reset this 2 variables, the space is converted on the last pixels that the last displayed letter had, hence the annoying extra black pixels.



bye!

yurif74

Quote from: Joseman on 19:04, 07 July 15
exactly, it's like you describe.

The graphics are purely: "pixel on" or "pixel off", the thing work like this:

first they calcule the attribute ram color address (#5800 - #5AFF) of every 8x8 block they want to colour and put the attributes: colour, brightness & flash.

After that, with a simple calculation based on the attribute ram direction they calculate where the 8x8block they coloured will be painted on the screen ram.

simple as that... on spectrum.

On Amstrad this is a nightmare, the graphic data is 1bpp, and i don't know how emulate the attribute ram of the spectrum (i didn't think too much on it), how many cpu time is needed to do something like that... I think that the original R-Type do something like this on the CPC port. If i have this code perhaps... but the attribute clash will be present on the AMSTRAD!

And the problem is not only the graphics are 1bpp: they are stored in diferent ram locations, at equanimous positions to do the calculations more easy... to recolour the graphics on cpc, the graphics will be twice the size, they need to be moved to their (different) screen locations to another where they fit... i'm not a good coder, not a good graphic designer, but i can see a lot of trouble doin' that...
Hello, just talking, i'm not a good coder :)
but could you use the attribute ram (#5800 - #5A00) to draw different color? before drawing the screen look at the attribute ram and draw the appropriate color. or at least you could use a "color map" since there are only block of colours (different room colors) you could draw different colour when drawing particular room..
just an idea, do not know if it is really feasable
Juri

Joseman

Quote from: yurif74 on 08:58, 13 July 15
Hello, just talking, i'm not a good coder :)
but could you use the attribute ram (#5800 - #5A00) to draw different color? before drawing the screen look at the attribute ram and draw the appropriate color. or at least you could use a "color map" since there are only block of colours (different room colors) you could draw different colour when drawing particular room..
just an idea, do not know if it is really feasable
Juri

Yes, it was my first approach to the problem... do some interrupt that constantly read the attributte ram, and traslate to the screen ram the colors set at anytime...

I don't know if it is feasible this way, but i'm sure that this will waste a LOT of cpu time, and the attribute clash will burn out our poor cpc eyes...

Na, if i consider to put colors in this version (i'm not sure), i will redo the school graphics to cpc mode1 tiles and perhaps even use hardware scroll... but is possible that this will never occur...



TFM

One Question: Since this works in MODE 1 ... can all four colors be used in the screen? Or would this be a total mess up of the game? Err... can GFX be replaced by 4 col. GFX? Or does the game work with 2 col. GFX in general? Probably it won't work? Or could it?

TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

MacDeath

looks like a quite straight ZX81 port....  ;D

Joseman

@MacDeath you know that i would LOVE that you re-make the logo, lesson and scoreboxes  :P

seanb

Just tried it and I would've loved to have played this as a child.

Not sure what to do (I've read a walkthrough now) and when I went to the map room I feel over for no reason and couldn't get up again.

I ended up with two teachers giving me lines until I was expelled.  Just like real life  ;D

Look forward to the finished release
Thou shall not question Captain Wrong!

Joseman

Quote from: seanb on 13:47, 31 July 15
Just tried it and I would've loved to have played this as a child.

Not sure what to do (I've read a walkthrough now) and when I went to the map room I feel over for no reason and couldn't get up again.

I ended up with two teachers giving me lines until I was expelled.  Just like real life  ;D

Look forward to the finished release

Glad that you like the great speccy conversion that i made  ;D

The game is working at 99%. I've played many hours on the real CPC without any problem.

You can hit all the shields and after, discover all the letters of the password... I don't know if the history master letter is possible to get, but i think that this part of the code must be working, as the blackboards are working... then you run to the safe to get the report (i don't know if this part works), and finally, you need to re-hit all the shields (this part almost certainly won't work), but trust me, you need to play many times to get to this part of the game...

If you are hit and you fall on the floor, you can get up by pressing 's'. you get hit at any time by the other characters or the pellet, you will press 's' a lot of times!

Any other problem you see, tell me!






seanb

I was using the joystick.
when I went down I did the classic mash the buttons to find one that worked.
Thanks for letting me know what button to press.

I really want to play the completed game and beat it.
Thou shall not question Captain Wrong!

||C|-|E||

I am looking forward to try this in the Plus  :D . I think that I will be able soon, because I have already ordered the HXC today. The game looks really great!

Powered by SMFPacks Menu Editor Mod