Panicman for 3k and 8k vic

Discussion, Reviews & High-scores

Moderator: Moderators

bills442
Vic 20 Amateur
Posts: 62
Joined: Mon Aug 07, 2006 5:12 pm

Re: Panicman for 3k and 8k vic

Postby bills442 » Mon Mar 03, 2014 12:25 pm

orion70 wrote:Damn! I can't download stuff from Google here at work :evil:


Hmm, Is there a better (free) place I could host the prg images I wonder?
That was the only place I could think of that I had an account on.

User avatar
orion70
Meteo VIC
Posts: 3361
Joined: Thu Feb 02, 2006 4:45 am
Location: Piacenza, Italy
Occupation: Biologist

Re: Panicman for 3k and 8k vic

Postby orion70 » Mon Mar 03, 2014 1:51 pm

No better place, don't worry. I only had to wait a few hours, and now I'm enjoying this game, impressively similar to the original :D.
I particularly liked the sounds and the overall smoothness. If I can be the only one to complain about a minor defect, color clash is quite visible compared to other clones (please guys, ignore the last phrase :mrgreen:).

User avatar
Victragic
Frogger '07
Posts: 492
Joined: Tue Nov 14, 2006 5:56 pm

Re: Panicman for 3k and 8k vic

Postby Victragic » Tue Mar 04, 2014 4:13 am

Ahh colour clash.. the scourge of the 8-bits. It's not too bad once they are out of the 'ghost house' though. (Ignoring Orion's request to ignore his comment :wink: )
Commodore Vic-20 -- State of the heart technology

bills442
Vic 20 Amateur
Posts: 62
Joined: Mon Aug 07, 2006 5:12 pm

Re: Panicman for 3k and 8k vic

Postby bills442 » Tue Mar 04, 2014 8:40 am

orion70 wrote:No better place, don't worry. I only had to wait a few hours, and now I'm enjoying this game, impressively similar to the original :D.
I particularly liked the sounds and the overall smoothness. If I can be the only one to complain about a minor defect, color clash is quite visible compared to other clones (please guys, ignore the last phrase :mrgreen:).


Ya, the worst is if there is a 'blue' ready to eat ghost sitting on top of a dangerous ghost -- you can get caught by surprise.
I've been fascinated by some of the really amazing advanced techniques guys use on here for extending the color capabilities of the vic. I would like to try them out someday in a future attempt.

User avatar
tokra
Vic 20 Nerd
Posts: 841
Joined: Tue Apr 27, 2010 5:32 pm
Location: Germany

Re: Panicman for 3k and 8k vic

Postby tokra » Tue Mar 04, 2014 1:36 pm

bills442 wrote:I've been fascinated by some of the really amazing advanced techniques guys use on here for extending the color capabilities of the vic. I would like to try them out someday in a future attempt.

To avoid color clashes you need to go to the "Atari 2600"-style of coding called "Racing the beam" - meaning you will have to update the picture as it is being drawn. This way you can switch colors for each rasterline and avoid vertical (y-axis) color-clashes. Way harder are horizontal (x-axis) raster-splits as they require absolute exact timing. Victragic was crazy enough to try this in his Pitfall-clone and succeeded brilliantly :D

Another way to go to avoid clashes would be to display one "sprite" (ghost/pacman) in one frame, and the other sprite in the next, leading to a flashing effect between the two which will flicker a bit, but at least you have total control over the colors, can clearly see both objects and don't need to waste too much time thinking about the rasterline that is being drawn. The original PacMan for the Atari 2600 famously overdid this, animating all the ghosts this way - however when you only show each enemy ghost every 4th frame, things flicker a lot. Later PacMan-clones for the Atari used the flicker-effect only when the ghosts were on the same horizontal level, otherwise using the raster-split method mentioned above.

So basically you have four techniques dealing with color-clashes:

1. Ignore
2. Minimize (raster-splits)
3. Flicker (interlace)
4. Jedi (combine minimize+flicker)

User avatar
beamrider
Vic 20 Nerd
Posts: 878
Joined: Sun Oct 17, 2010 2:28 pm
Location: UK

Re: Panicman for 3k and 8k vic

Postby beamrider » Wed Mar 05, 2014 10:27 am

I've just tried playing this on real hardware and it looks really nice.

I did spot a few little bugs however...

1) At one stage there were about three additional copies of pacman below the cage. I went to get my phone to make a video but it didn't re-occur.

2) I did also notice that sometimes pacman seem to get a sudden burst of extra speed, but this doesn't unduly affect the game

3) When being chased through the tunnel pacman seems to reappear instantly on the other side of the screen, but the ghosts take longer.

Nothing major though and again plays really nicely on real hardware.

bills442
Vic 20 Amateur
Posts: 62
Joined: Mon Aug 07, 2006 5:12 pm

Re: Panicman for 3k and 8k vic

Postby bills442 » Wed Mar 05, 2014 10:40 am

beamrider wrote:I've just tried playing this on real hardware and it looks really nice.

I did spot a few little bugs however...

1) At one stage there were about three additional copies of pacman below the cage. I went to get my phone to make a video but it didn't re-occur.

2) I did also notice that sometimes pacman seem to get a sudden burst of extra speed, but this doesn't unduly affect the game

3) When being chased through the tunnel pacman seems to reappear instantly on the other side of the screen, but the ghosts take longer.

Nothing major though and again plays really nicely on real hardware.


Was this the 8k version or the 3k? I have to say the 8k has gotten almost no testing; although it's just a re-assembly of the 3k code to load into 8k so I'm hoping that wouldn't introduce any bugs. I did take the 3K version to a little 'retro game' party last weekend and it ran for about 4 hours on a real vic with seemingly no problems. I was surprised nothing bad happened -- if not in the software then I was even worried the old hardware might have gotten hot and flipped a bit or something.

Pacman should have normal speed through the tunnel, ghosts get half speed; but pacman should have to go all the way to the left before appearing on the right and visa-versa.

Pacman should be faster when he's energized (100% speed), the rest of the time he is at 95% speed. The ghosts start at 90% and at the higher levels run at 100% speed so they are a little faster than pacman. So if you are seeing him move at 100% speed when he's not energized that's not good.

I'll try to check into all of these. Thankyou!!

edit:

I guess I should also note that all this is on my NTSC vic -- I just hooked into the stock interrupt service routine, so isn't PAL 1/50 and my vic is 1/60th? I don't suppose that would cause any bugs, but it might make the sounds a little slower.
Last edited by bills442 on Wed Mar 05, 2014 11:06 am, edited 1 time in total.

User avatar
beamrider
Vic 20 Nerd
Posts: 878
Joined: Sun Oct 17, 2010 2:28 pm
Location: UK

Re: Panicman for 3k and 8k vic

Postby beamrider » Wed Mar 05, 2014 10:54 am

It was the 8K version.

Oh ok, perhaps the tunnel behaviour is "as designed" then. Not sure, just to me seemed a little different to the arcade to me, but I could well be wrong.

I got the impression that pac-man moved a little faster sometimes because the load on the game had "reduced" and it was able to occasionally get in more game updates per frame? - again could be wrong....

Cheers
Adrian

bills442
Vic 20 Amateur
Posts: 62
Joined: Mon Aug 07, 2006 5:12 pm

Re: Panicman for 3k and 8k vic

Postby bills442 » Wed Mar 05, 2014 11:14 am

beamrider wrote:It was the 8K version.

Oh ok, perhaps the tunnel behaviour is "as designed" then. Not sure, just to me seemed a little different to the arcade to me, but I could well be wrong.

I got the impression that pac-man moved a little faster sometimes because the load on the game had "reduced" and it was able to occasionally get in more game updates per frame? - again could be wrong....

Cheers
Adrian


Ok, well I just played the game in WinVice with my machine set to be like PAL ( which I assume your vic is? ) and pacman speed seems all goofy, he kinda jumps and bobs. Something is different but I have no idea what!? Let me see if I can figure out why that would be. Would you be willing to try the game in Winvice set up as NTSC and see if the pacman speed issue is gone?

Pacman speed is reduced by just skipping a 'move' every 12 pixels of smooth scrolling. So if the game load is reduced and the frame rate goes up .. everything should move faster, not just pacman.

User avatar
beamrider
Vic 20 Nerd
Posts: 878
Joined: Sun Oct 17, 2010 2:28 pm
Location: UK

Re: Panicman for 3k and 8k vic

Postby beamrider » Wed Mar 05, 2014 11:25 am

Yes, it was a PAL vic and yes it does play better under the Vice on NTSC.

I always found it difficult to keep a game running at a constant speed on a machine like the vic with minimum grunt. I found that you need to limit the number of game updates per screen refresh to get a constant speed but this does means you're wasting some of the CPU.

User avatar
beamrider
Vic 20 Nerd
Posts: 878
Joined: Sun Oct 17, 2010 2:28 pm
Location: UK

Re: Panicman for 3k and 8k vic

Postby beamrider » Wed Mar 05, 2014 11:30 am

..in the case of Pooyan it runs at only 15 fps. Sometimes it could get to 30fps when there was minimal action, but then the speed variablilty made it look terrible to me.

bills442
Vic 20 Amateur
Posts: 62
Joined: Mon Aug 07, 2006 5:12 pm

Re: Panicman for 3k and 8k vic

Postby bills442 » Wed Mar 05, 2014 3:12 pm

beamrider wrote:Yes, it was a PAL vic and yes it does play better under the Vice on NTSC.

I always found it difficult to keep a game running at a constant speed on a machine like the vic with minimum grunt. I found that you need to limit the number of game updates per screen refresh to get a constant speed but this does means you're wasting some of the CPU.




Hmm, yes. Very very good points. I did at one time think about this for a brief bit. I know, for example, that the main game loop takes several frames ... with some remainder of time that is left over. It is spent waiting for the vertical blank before it starts over again. I knew the speed would be inconsistent since I made no effort to lock it down to a known frame rate as you point out. I guess it looked "ok" on the NTSC. It does seem to look quite a bit different on the PAL; perhaps because I'm constantly crossing over the "boundary" where I have a small remainder before the next frame starts ... and then at other times, a large remainder of time before the next frame starts? It is as though there is a lot of "skew" in the game's frame rate on the PAL. I will have to look into a technique like you describe to see if locking it down would help. So many good lessons. I hopefully can apply all of them in a future effort. I see your point that locking it down almost always implies leaving some CPU time on the table, which makes you feel bad.

What technique did you use to limit the framerate? Did you use something like the jiffy timer and just "wait" a little bit if you find your self "early" to the next frame?

I was just looking at Pooyan videos last night! I was intrigued by Robert's SSS library and saw you were an adopter.

bills442
Vic 20 Amateur
Posts: 62
Joined: Mon Aug 07, 2006 5:12 pm

Re: Panicman for 3k and 8k vic

Postby bills442 » Wed Mar 05, 2014 8:32 pm

Ok. I fixed the .org addresses so you can load with just ,8
and I seem to have improved the jumpiness on PAL.
It looks like the main game loop was taking just over 1/60 second. On NTSC I was always overflowing to 2 frames and getting half speed all the time, so it looked ok.
On PAL, with the more generous frame time, every so often it could get a streak in where it would run 100% speed, but other times would require 2 frames for the main loop. I locked the refresh rate to 2 frames which seemed to smooth out the PAL version and had no effect on the NTSC. I wish I could get it to run at 100% all the time :)

Thanks BeamRider!

User avatar
beamrider
Vic 20 Nerd
Posts: 878
Joined: Sun Oct 17, 2010 2:28 pm
Location: UK

Re: Panicman for 3k and 8k vic

Postby beamrider » Thu Mar 06, 2014 3:17 am

That's great work - I'll give it another go at the weekend.

Yes, I used the SSS which uses double buffering and the main game routine enters a wait loop inside the SSSFLIP until the IRQ handler has swapped frame buffers. (I'm sure Robert can explain better).

User avatar
rhurst
Omega Star Commander
Posts: 1304
Joined: Thu Jan 31, 2008 2:12 pm
Website: https://robert.hurst-ri.us
Location: Providence, RI
Occupation: Office of the CIO

Re: Panicman for 3k and 8k vic

Postby rhurst » Thu Mar 06, 2014 4:57 am

bills442 wrote:I wish I could get it to run at 100% all the time :)

But then it might run too fast, and you'd be wishing for more resolution. And if you had more resolution, you need more memory. With that, wouldn't it be great to use multicolor? Oh, that requires masking, so it takes more CPU cycles. Drat, it lost frame rates, I wish I could get it to run at 100% all the time.
- Requiem to the 8-bit videogame programmer

"The point being is in order to have any success, keep your project fun and enjoy the challenge of making it happen within the scope and humble workings of the Commodore VIC 20 home computer... and you will gain better appreciation of what 1980s arcade gaming was all about."

I think both of you have achieved a high-level of appreciation as evidenced by your resulting creative software engineering work. :)

beamrider wrote:... enters a wait loop inside the SSSFLIP

OT: yes, the programmer has the option to update the pending frame, paced by the machine's refresh (calibrated with the IRQ handler for accounting accuracy, but offers little in terms of video effect). The IRQ handler does not do the dirty deed itself, it is governed and under control of the main program / loop.
Any technology distinguishable from magic is insufficiently advanced. See also magic.


Return to “Games”

Who is online

Users browsing this forum: No registered users and 3 guests