Jump to content

Photo

Pinball games


37 replies to this topic

#26 Asmusr OFFLINE  

Asmusr

    River Patroller

  • Topic Starter
  • 2,908 posts
  • Location:Denmark

Posted Wed Aug 29, 2018 11:34 AM

 

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/l...MaskPinballTest

 

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....reams64_src.zip

Look under PD/tools/PD/run.bat 



#27 Asmusr OFFLINE  

Asmusr

    River Patroller

  • Topic Starter
  • 2,908 posts
  • Location:Denmark

Posted Wed Aug 29, 2018 1:50 PM

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....reams64_src.zip

Look under PD/tools/PD/run.bat 

 

Yes, it looks like that tool can be used to produce a collision map.



#28 Asmusr OFFLINE  

Asmusr

    River Patroller

  • Topic Starter
  • 2,908 posts
  • Location:Denmark

Posted Wed Oct 24, 2018 2:04 PM

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.

 

 

 

Attached Files



#29 arcadeshopper OFFLINE  

arcadeshopper

    River Patroller

  • 3,820 posts
  • Location:Portland, Oregon USA

Posted Wed Oct 24, 2018 3:02 PM

nice!



#30 fabrice montupet OFFLINE  

fabrice montupet

    Moonsweeper

  • 395 posts
  • Location:Burgundy - France

Posted Wed Oct 24, 2018 3:05 PM

Very nice and promising!



#31 Vorticon OFFLINE  

Vorticon

    River Patroller

  • 3,382 posts
  • Location:Eagan, MN, USA

Posted Wed Oct 24, 2018 7:39 PM

Super smooth. Would love for this to turn into a full game!



#32 OLD CS1 OFFLINE  

OLD CS1

    Technomancer

  • 5,684 posts
  • Technology Samurai
  • Location:Tallahassee, FL

Posted Wed Oct 24, 2018 10:57 PM

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.



#33 digdugnate OFFLINE  

digdugnate

    Stargunner

  • 1,903 posts

Posted Sun Oct 28, 2018 9:34 AM

Zero Zap is like pinball-  *ducks and runs*



#34 globeron OFFLINE  

globeron

    Dragonstomper

  • 748 posts

Posted Sun Oct 28, 2018 12:33 PM

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

https://www.youtube....h?v=QMRKgdIkuWg

 

 

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

>> Here you can play it online: https://classicreloa...-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....h?v=qka_9iI2DFI

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

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

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


Edited by globeron, Sun Oct 28, 2018 12:36 PM.


#35 Asmusr OFFLINE  

Asmusr

    River Patroller

  • Topic Starter
  • 2,908 posts
  • Location:Denmark

Posted Fri Nov 2, 2018 1:00 PM

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.



#36 OLD CS1 OFFLINE  

OLD CS1

    Technomancer

  • 5,684 posts
  • Technology Samurai
  • Location:Tallahassee, FL

Posted Fri Nov 2, 2018 3:50 PM

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.


  • RXB likes this

#37 Retrospect OFFLINE  

Retrospect

    Stargunner

  • 1,102 posts
  • Location:Wakefield, England

Posted Sat Nov 3, 2018 2:05 PM

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? 



#38 OLD CS1 OFFLINE  

OLD CS1

    Technomancer

  • 5,684 posts
  • Technology Samurai
  • Location:Tallahassee, FL

Posted Sat Nov 3, 2018 2:42 PM

The other option is to only scroll in sections.  One of the games I posted above does that.






0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users