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.

Joseman

#25
Good night

news: Keyboard routines working, now it's possible to exit the demo mode, configure controls (really not, they are speccy controls), and change the name of the characters (until the game crash), the characters are non visible because still i don't have a routine to convert coordinates to screen ram, when i achieve this routine, it's very possible that the game starts working itself!.

sna: skool Daze [keyboard working, input names working].sna


Joseman

#26
Good night again  ;D

Great news with the Skool:

This night i coded a routine that traslate the game's coordinates to cpc screen and...

it comes alive!, now near all the characters (not eric) walks across the skool, even without a proper random routine!: the speccy uses a "system variable" called "FRAMES" that is a counter located at #5C78 that increments every 20ms, i suspect that the routine that update this variable is located in the spectrum ROM, hence it doesn't work on CPC. The location at #5C78 is not updated on the CPC,  then the random routine doesn't work well: As you may see, all the students and teachers go to the library and stay there in the spare time. Because of this the students on Skool Daze CPC version are more erudite than on the ZX version  :laugh: . Anyway, i will code a proper random routine for the cpc.

Now you can see all the students and teachers walking on and off on the name change section of the game.

When you enter the game, almost all works well, the students walks across the skool without problem, the teachers too. When the ringbell sounds the students go to the classroom and sitdown, then the teacher enter the classroom and the lesson starts!

Even the keyboard works with eric in the game itself.

The problem right now is that Eric is not properly moved across the screen (i suspect of 2 routines), but now i'm tired, perhaps another day  :P

Thanks that the ZX version makes a 80.000 t-states delay on the MAINLOOP, i can adjust the speed of the game at the same speed of the spectrum adjusting this delay to 10.000 t-states. Even with my bad routines, slooooooooooooooooow routines the students and teachers walks at the same speed than on spectrum, and if i don't do the delay, the game runs more speedy than on spectrum!!  :laugh:

Here is the sna as usual: skool Daze [characters moving, skool comes alive].sna

MiguelSky


Neil79

:D So are we going to have better graphics? Smooth frame rates? Do tell  ;D
The latest in Indie & Retro News!!! IndieRetroNews - Indie Retro News on twitter

Joseman

Quote from: Neil79 on 13:46, 04 June 15
:D So are we going to have better graphics? Smooth frame rates? Do tell  ;D

No no, you know that I LOVE the speccy graphics, even i will tell you more, I prefer the 1 bit graphics that the spectrum have, like this, 1 bit color.

ohhhh and the attribute system... you don't know how i'm ENJOYING removing all this crap, you know? i know that the speccy has this marvelous character based screen, but, i will tell you that i prefer the system of my  olivetti typewriter for character based screen, at least it is linear!!

no no, 1 bit color and olivetti typewriter based screen

this is really retro retro eh?  :)

just kidding  :P




MacDeath


Joseman

#31
News on the port:

This time it took several days for me to avance any further on it.

All because of the "speech bubble" thingy, that is the bubble that the teachers or the alumns use to talk to eric or to give lessons in the classroom.

The routines of speech bubble needed to be fully rewriten because the words of the sentences where scrolled 1 pixel at a time from right to left, using rlca ... rl (hl), thanks of the lame 1bit per pixel that the spectrum have, this is the only needed to scroll the sentence 1 pixel to the left, this way is not possible on cpc in mode 1, we have 2 bits per pixel, if you scroll 1 bit to the left at a time, all becomes a mess. I have to "imitate" this routine with a lot of bit, set & res commands, this was a nightmare and i know that it have to be more easy than this, but like all my routines, I only do without any optimization and redundant every where. I'm not an expert z80 programmer, is enough that the routines works.

****
And if anyone is wondering... this is not fault of the cpc, all the graphics are 1bit shitty spectrum pixel, they are optimized for the spectrum, not the cpc, they have to be converted everywhere to 2 bits per pixel and the spectrum memory have to be converted everywhere too, only for this, the game never will be as fast as spectrum. This is the real reason why some games are more slow on cpc than on spectrum, shitty graphics and shitty code for this graphics. With optimized graphics and optimized code, sure the cpc can match the spectrum speeds, with more colors and better graphics. Its only a problem of the direct ports from spectrum to cpc. I say this, because some people tends to think (and make fun) that the speccy have any advantage over the cpc on scrolls or games on full screen (256x192 shitty full screen,  remember that the cpc is 320x200 full screen without overscan). No way only spectrum blind fanboys can think this.
****

Now the teachers talks, the little boy talks to eric several times, the sentence moves very jerky because the routine prints 2 letters at a time, then move characters, then print another 2 letters, then move characters and so on... because of my superfast routines... well this is the result...  :laugh:

Another thing that works now is the teachers givelines bubble (that is not the same bubble that the speech bubble), only fails on restore the school bottom because i didn't reprogrammed all the routine, then it uses speccy widths and sizes at the moment.

Eric can Sit down if you press "s" and you will see the givelines bubble sooner or later  :laugh:

Eric can jump now too if you press "j"

At the moment Eric can't move (i didn't modified the routines, sure it uses shitty attribute bytes and speccy mem directions)

Neither can shoot the catapult ("c") or the game will hang immediately, the same here, attribute bytes and speccy mem directions to change...

The game now can run without hang anymore (unless you shoot the catapult), the skool works and do all the scripts without problem apparently.

Oh, and the routine to scroll the skool to the left is much more quick now... almost equal to speccy, even when the cpc has to move 2 times more screen mem and my routines are very shitty  ;)

SNA: skool daze [characters talking, teachers give lessons, teachers give lines,

Joseman

#32
now going to sleep...

Gryzor


Joseman

#34
News on the port:

The bubble lines now are restored ok, no more garbage on screen after a teacher giving lines to us.

The scoreboard is working, now when you receive lines they are correctly displayed on the scoreboard. Highscore and score works ok too.

Improved the random routine with patrik's of WOS: http://www.worldofspectrum.org/forums/showpost.php?p=583693&postcount=3, i added two ld a,r to improve the routine, but i'm not sure that this is the perfect random routine... anyway, now is clearly visible more random on the boys and teachers when walking on playtime, perhaps even more random than on spectrum... but again, i'm not sure...

I know that there is a bug on the speech bubble on the middle floor, but at the moment is not really important.

Next will be move  Eric correctly, i don't know at the time what's failing with Eric, but is clear that Eric and his catapult pelet are managed different than the other sprites...

i will see next time  ;)

SNA: skool Daze [ bubble lines ok,score board ok, random improved ].sna

Remember to press a key and say "n" to change names if you want to see the game working totally correct (without move eric), you can (j)ump or (s)it to receive lines from the teachers... oh, and you can (h)it other people too (you will receive lines if there is a teacher near)

Curiosly right now you can loose the game with over 10000 lines and you can't do nothing to avoid this  :laugh:

Joseman

Last news on the port:

Luckily the problem with eric's movements was only a remaining line of spc code that i let untouched. In asm is more hard to find errors than correct them  :laugh:

Now eric's can move without problem to the right, the skool will scroll correctly to the left. Really the skool can scroll to the left from the start of the port because the code is the same to skroll the entire skool in screen than scroll the skool 8 columns. You can visit the skool to the right and even go upstairs or downstairs.

Now remains to code the skool scroll to the right, in fact if you move eric to the left the game will hang when trying to scroll the skool. There is only speccy code in this routine right now. Anyway it will be easy to modify this routine, perhaps tonight.

The game will then nearly to be completely ported ...

by the way... I omited the delay routine in the mainloop so you can see how quickly the sprites are even with my bad coding  :laugh: , the slowdown when there are too much sprites on screen occurs too in the spectrum version...

SNA of this version: skool daze [Eric moving, skool scrolling to the left, no delay].sna







Joseman

#36
Ok, as i said, the right scroll of the school was going to be easy... it's working now

Fixed the middle bubble speech bug too

Now almost all things are working, even you can hit the shields jumping (not flashing because of the nasty flash attribute byte of the spectrum), i think that i will change the sprite when hit a shield instead of emulate the flashing attribute of the spectoy.

You can write on the blackboards too, hit the other pals (hitting angelface brings points), sit and attend classes (is a bit tricky because on some classroms there are more students than chairs).

You really can play the game now (not finish it because still the catapult is not working), the rest is ok i think...

Here is the SNA: skool daze [skool scrolling to the right, middle bubble speech fixed].sna

Here are the instructions of the game: http://www.worldofspectrum.org/pub/sinclair/games-info/s/SkoolDaze.txt

Now, if there is people here that can playtest the game, specially the ones who played the speccy version, you can report bugs, or things that you think are wrong with the cpc version (gameplay)








Joseman

#37
Nobody can't stop me now!  :laugh:

Ok the catapult is working now, the pellet will do justice! The problem was (again) speccy code untouched...

Now you can fire the other alumns and (more important) the teachers, because with one hit you knock down the teacher and with another hit the pellet will bounce on his head and go up, this way you can hit the shields that you can't reach jumping. You can jump on top of knock down characters by the way...

Another thing is that now Eric can RUN, in speccy if you press "shift" + direction key, Eric will start to run, this way you can go quickly from one location to another (very handy), the problem is that this way multiple keys have to be press simultaneously... On the cpc i do this thing different: if you press (only 1 time) "caps lock" or "shift" Eric will RUN by default and if you press "caps lock" or "shift" again, Eric will walk normal by default... so less keys to press, they are a lot enough  :laugh:

Now the port is almost done, like i said, i will appreciate betatesting, the game is very fun! try it!, if you want DSK instead of SNA let me know!!

SNA: skool daze [catapult working, eric can run].sna

P.S. I will do the joystick input and the cursor input soon...


CraigsBar

Quote from: Joseman on 10:01, 19 June 15
Nobody can't stop me now!  [emoji23]

Ok the catapult is working now, the pellet will do justice! The problem was (again) speccy code untouched...

Now you can fire the other alumns and (more important) the teachers, because with one hit you knock down the teacher and with another hit the pellet will bounce on his head and go up, this way you can hit the shields that you can't reach jumping. You can jump on top of knock down characters by the way...

Another thing is that now Eric can RUN, in speccy if you press "shift" + direction key, Eric will start to run, this way you can go quickly from one location to another (very handy), the problem is that this way multiple keys have to be press simultaneously... On the cpc i do this thing different: if you press (only 1 time) "caps lock" or "shift" Eric will RUN by default and if you press "caps lock" or "shift" again, Eric will walk normal by default... so less keys to press, they are a lot enough  [emoji23]

Now the port is almost done, like i said, i will appreciate betatesting, the game is very fun! try it!, if you want DSK instead of SNA let me know!!

SNA: skool daze [catapult working, eric can run].sna

P.S. I will do the joystick input and the cursor input soon...
Dsk definately would suit me more.
IRC:  #Retro4All on Freenode

Neil79

Quote from: CraigsBar on 13:50, 19 June 15
Dsk definately would suit me more.


Same here


By the way, game crashes in JavaCPC if you press any key other than the one to start the game.
The latest in Indie & Retro News!!! IndieRetroNews - Indie Retro News on twitter

Joseman

@Neil79 Thanks for the news on your page  :)

The key routine used is the one that is on cpcwiki, i know that if you press "especial" keys the game will crash as they are not returning a valid ASCII code, i know this bug (as the bubble speech bug), but it wast not important until now.

About the sound... it was the first code i made, and it was in 5 minutes... here there isn't limitations, i can use the AY in full power... sound effects, music... all that you want can be made, i have room for it and no limitations at all. I'm not musician and not very good ond SFX. If any one wants Music and sound effects 100% cpc, just help me  :laugh: . If you want even we can use playcity  ;) .

About the graphics and the vibrant cpc colors... Here is the problem... the graphic data is 1bit mode, and heavily hard coded, if you redo the graphics for mode 1 cpc (4 vibrant colors) we need twice the memory data for it, at the moment isn't a problem, it just that the routine that handles the school need to be totally rewriten. About Mode 0 (16 vibrant colors), much memory data needed and even more changes on the routine... Again... i'm not good on gfx too (well in coding not too), if anyone wants to help...

I know and understand about the 100% source code right now, any change can be made without problem if anyone helps...






Neil79

Cheers for that informative reply  8)
The latest in Indie & Retro News!!! IndieRetroNews - Indie Retro News on twitter

SkoolKid

Hi all


Just popping in to say bravo to @Joseman for using my Skool Daze disassembly to port the game to the CPC. Awesome work! It's nice to see that the effort I put in to reverse-engineering the game was of value to someone else, too.


Now I just need to find a CPC emulator and try this out. Anyone know of a good one for Linux?

TFM

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

Joseman

#45
Quote from: SkoolKid on 15:34, 19 June 15
Hi all


Just popping in to say bravo to @Joseman for using my Skool Daze disassembly to port the game to the CPC. Awesome work! It's nice to see that the effort I put in to reverse-engineering the game was of value to someone else, too.


Now I just need to find a CPC emulator and try this out. Anyone know of a good one for Linux?

Hi @SkoolKid!!

Sorry by not getting in touch with you before, but while i wansn't sure that the port will work almost 100% i didn't want to bother anybody.

It has to be clear that the hard job, the difficult part is what skoolkid did, it is an incredible work to reverse enginer a game... and fully commented almost line by line.... thanks to it i learned a lot of asm...

your job  shows the love that you have to this game.

I only added crappy code, to make it work at any cost on the cpc... Now is time to see if the code can be optimized, add features... i don't know...

If the port is finished, it will have a credits part where you will be the first :)


TFM

Indeed an overwork would be nice (scrolling, colors etc). But that's again a lot of work. You did a great job up to now. And.... if I can suggest that... add a small note about "What to do" in this game actually.  :)
TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

arnoldemu

@SkoolKid: I have sent a private message with the location of the wip version.

I have also sent a link to the older linux version.

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

robcfg

@arnoldemu Could you send me the link too, please? I'll be glad to test it.

Nich

Quote from: Joseman on 23:00, 18 June 15
You really can play the game now (not finish it because still the catapult is not working), the rest is ok i think...

Now, if there is people here that can playtest the game, specially the ones who played the speccy version, you can report bugs, or things that you think are wrong with the cpc version (gameplay)
Writing on the blackboards crashes the game when I play it in CPCE. WinAPE seems to be OK, but both emulators don't print spaces correctly and they write a letter to the blackboard instead of a space. Pressing RETURN while writing to the blackboard crashes the game on both emulators.

Nonetheless, I am still very impressed indeed by the amount of progress you've made in the last few days! :o

Powered by SMFPacks Menu Editor Mod