Jump to content
IGNORED

Pinball games


Asmusr

Recommended Posts

 

I guess an array with a nibble (half a byte) per pixel would do, but then maybe that approach will take up too much memory.

 

Guess you've seen this.

 

...

 

https://github.com/leonardo-ono/JavaBitmapMaskPinballTest

 

Thanks, I didn't notice the Java code link before. This is very helpful for trying to implement the same demo on the TI. If I load the playfield image (background.png) into Magellan it calculates 253 vertical character transitions, so it should be possible to make a 2 pixel smooth scroller for this demo.

 

I can use a ROM banks for storing the collision map since so I'm not so worried about the space. For this demo it would take 40K.

 

I still don't know how the collision map was produced. I think you need a tool where you can draw as many normal vectors on top of the playfield image as you like, and then the tool interpolates the vectors and calculates the collision map.

 

There is a Java tool in the source code for the C64 Pinball Dreams demo, but I'm not sure yet what it's for and how it works:

https://files.scene.org/view/resources/code/sources/pindreams64_src.zip

Look under PD/tools/PD/run.bat

  • Like 3
Link to comment
Share on other sites

  • 1 month later...

I finally made a proof of concept for the TI, very similar to the Java demo that sometimes99 posted a video of a while back, but with scrolling. You can just view the ball bouncing around, or press joystick left and right to steer the ball a little.

 

The collision map is stored uncompressed, so it takes up 40K of the 64K ROM image. From the collision map I get a byte value that can be used to check if there is a wall at the given point and to look up a normal vector for the wall. The normal vector can then be used to calculate the reflection vector for the ball when it hits the wall. Calculations are done using fixed point arithmetic.

 

 

 

pinball-demo-8.bin

source.zip

  • Like 13
Link to comment
Share on other sites

In terms of a game, half of the work, the difficult half at that, looks to be done: the physics are in place, the mask and collision routines are written, and the scrolling is functional (per any Rasmus production.)

 

Here we have a template for any pinball game anyone might want to produce, even a construction set for the TI.

Link to comment
Share on other sites

I like the TI-99/4A - Micro Pinball version of course:

https://www.youtube.com/watch?v=QMRKgdIkuWg

 

 

but on the PC also played this one a lot (4 different in 1 game):

>> Here you can play it online: https://classicreload.com/pinball-fantasies.html

(use SHIFT LEFT and RIGHT, Arrow Back, Space Bar)

 

I still remember these music themes:

Pinball Fantasies:

1. Speed Devils (at 0.45min you can see the selection screen) -https://www.youtube.com/watch?v=qka_9iI2DFI

2. Party Land - https://www.youtube.com/watch?v=6rEehNb4eQg

3. Stones 'n Bones - https://www.youtube.com/watch?v=FOnEf6UsF_4

4. Billion Dollar Show - https://www.youtube.com/watch?v=NgvNn4iumq8

Edited by globeron
  • Like 1
Link to comment
Share on other sites

In terms of a game, half of the work, the difficult half at that, looks to be done: the physics are in place, the mask and collision routines are written, and the scrolling is functional (per any Rasmus production.)

 

Here we have a template for any pinball game anyone might want to produce, even a construction set for the TI.

 

I think it's a bit more complicated than that. :)

 

The next step is adding flippers. My first idea was to use sprites, but with two flippers vertically aligned I don't see how we can to avoid running into the 4 sprites per line limitation. Not having them vertically aligned is a possibility, but it breaks with the classic pinball machine layout.

 

If sprites are not an option then the flippers have to be made from characters. But with the smooth scrolling, that requires approximately 16 characters (out of 256) per position for each flipper. With 4 position that's 128 characfers = half of the character set, which could otherwise be used for the playfield.

 

A combination of one sprite per flipper plus characters is another option. It's possible but far from simple. Either that or abandoning the idea of smooth scrolling.

 

No matter how the flippers are displayed there's still the issue of how to determine when the ball hits a flipper and what the normal vector of the flipper is at the time of impact. I don't have a clear idea of how to do that. Making collision maps for the flippers at diffent (virtual?) positions is one option.

  • Like 3
Link to comment
Share on other sites

I think it's a bit more complicated than that. :)

 

While talking up the work you have done, already, I was also deliberately avoiding the more complex issues.

 

During my college network security course I lamented to my instructor, who also invited me into the program, about how so many of the other students did not seem to be taking the course seriously -- or at least as seriously as I was. To them I was an over-achiever, a.k.a. "that asshole who didn't give everyone a 10 on their presentations." I also pointed out a couple of deeper subjects related to what we were learning I thought the course should include.

 

He said to me, "Remember this is just an undergrad course. We want them interested up-front and not scare them off so quickly."

 

No matter how the flippers are displayed there's still the issue of how to determine when the ball hits a flipper and what the normal vector of the flipper is at the time of impact. I don't have a clear idea of how to do that. Making collision maps for the flippers at diffent (virtual?) positions is one option.

This was how I envisioned the flippers would work.

  • Like 1
Link to comment
Share on other sites

Rasmus mentioned characters and sprites not being an option. I noticed during one of my games my sprite/char was off, the further across the screen it went. I'm not sure but i think TI Invaders uses sprites to chars for player shot vs the enemies. Is there any way to do it accurately at all for all parts of the screen? That way flippers could be character tiles and ball obviously a sprite?

Link to comment
Share on other sites

  • 4 months later...
  • 2 years later...

I made another demo. This time full screen and with flippers, which is probably the most difficult part to get right. It would be better if the flippers were wider, but the 4 sprite limitation makes that difficult. 

 

 

This is a cartridge image, e.g. for FinalGROM. Launch ball by holding down space for a while and releasing. Control flippers using Z and M. If the ball gets stuck use space to tilt.

pinball-demo2-8.bin

  • Like 15
Link to comment
Share on other sites

Freaking Awesome!

The flipper sizes are the same size as flippers that were in the first Pinball machines that were equipped with flippers, I see no issue. If you're an old fart like me you played many tables that had flippers that were this size.

Please, please, please keep going with this!

 

  • Like 1
Link to comment
Share on other sites

11 hours ago, TheMole said:

Very cool stuff, but why do the flippers have to be sprites? Can't they work just as well as background tiles? Or is the tile budget too small for that?

As you know, with the smooth scrolling technique you can very quickly use a lot of characters. So far, with the pretty rough graphics, I'm using about 100 characters out of 256 (that the number of transitions from a base set of 56 characters). I'm planning to save the remaining characters for some slightly more interesting background graphics. Maybe it's not so easy to see, but the flippers actually consist of 6 frames each, so that could easily eat up all the remaining characters. 

One idea would be to make the flippers part sprites part characters. Perhaps they could be drawn so the thickest part was always the same, and that part could be characters?

Another way forward would be to forget about the smooth scrolling. That would free up a lot of characters and then it would also be possible to use bitmap mode colors. But I have crossed that bridge and I'm not coming back. ?

But as sparkdrummer wrote, short flippers is not really a big issue, you just have to build up your skills :-). 

flippers.gif

Edited by Asmusr
  • Like 4
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...