Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
You are not logged in - nap
CSDb User Forums


Forums > C64 Coding > Pinball Dreams discussion forum
2003-02-13 19:16
WVL

Registered: Mar 2002
Posts: 886
Pinball Dreams discussion forum

Hey guys/girls,

instead of updating my homepage all the time, I though I could open a new thread here instead. This will also allow other ppl to comment on the development.

okay, so whassup at the moment?

Well, Last month I completely restarted from scratch on the code. Why? Well, first I wanted to concentrate more on getting the game to run in less memory, also I wanted to focus more on accurate simulation of the ball and some small other things...

What I have done till now :

1 - spawned the ball ;-)
2 - added gravity to the surroundings, the gravity data is now RLE encoded, so it doesn't take up much memory anymore. Used to eat 20 blocks of memory, now I think a map would use 3-4 blocks..
3 - I changed the gravity routine to use polar-based vectors instead of cartesean, much more accurate!
4 - added a debug mode to the movement routines, you're able to pick up the ball with the firebutton and move it around. Let go of the button and you drop it on the table again.
5 - Worked on an accurate (within 1 'bradian' degree) direction calculation routine. This routine will be used for both friction calculations and calculating new directions after collisions. So it needs to be
6 - added a (simple) friction routine.
7 - I put a small preview on the web ;-)

get it at http://www.interstyles.nl/pinball.rar

okay, what am I up to now?

1 - increase the speed accuracy to 24 bit, I need this because the friction only affects speed in the last 3 bits or so, so it's not accurate at all..
2 - add spin to the ball, so it is allowed to roll.. (also gives effect to the ball like top-spin and such)
3 - dunno yet, I'll see what is the next logical step after that.. probably the new method of collision detection, dunno..

I'm thinking of putting the sourcecode online as ascii file, so everyone can check it out...

Suggestions? Questions? other stuff?

greets, Werner
 
... 163 posts hidden. Click here to view all posts....
 
2003-03-07 15:02
WVL

Registered: Mar 2002
Posts: 886
btw, what would you consider not-critical calculations? :)
2003-03-07 16:24
chatGPZ

Registered: Dec 2001
Posts: 11114
"non critical" is everything that is not immediatly visible.... for example the actual scrolling _must_ be done each frame, else the screen goes jerky. the ball movement for example can be calculated taking a time-factor into consideration, so "frames" of ball-movement can be skipped when there is not enough time in current frame.... actually there are a lot of these kinda "non critical" calculations in a game, its just a little bit "different" to implement them this way.
2003-03-07 16:39
cadaver

Registered: Feb 2002
Posts: 1153
With doublebuffering, almost every main program task except color-RAM scrolling becomes not-critical. Basically, things that cause slowdown if they're missed, but won't cause outright ugliness onscreen, as raster interrupts keep things running. But this is just a different ideology, I won't lose my sleep if some frames are missed in some tight / action-full situations :)
2003-03-07 16:44
WVL

Registered: Mar 2002
Posts: 886
it doesn't help skipping frames when moving the ball. The ball movements all are traced, so calcs are done for each pixel position, to consider gravity + wall bounces and such.

If I skip the ball movement for one frame, I have to do double the amount of calculations, so it doesn't speed up anything..

also the flickering of the lights must be done instantly, otherwise you could have the top of a light and the bottom in a different color - UGLY.

also I have to play music and scroll each frame, otherwise things get jerky.

the only things not critical is score keeping and displaying it IMO

Werners
2003-03-07 17:01
cadaver

Registered: Feb 2002
Posts: 1153
Yeah, frameskipping on C64 mostly doesn't help, as the movement calculations are usually the heaviest (minus hardscrolling). In filled vectors it perhaps helps :)

According to my experiments, a missed frame of movement here or there doesn't feel that bad, *but* slowdown of music is something that's immediately noticeable, so one can't skip that, ever :)

Of course, if the game starts to skip like every second or third frame it will feel satanic :) I guess your CPU-load will be roughly the same on each frame?
2003-03-07 17:10
WVL

Registered: Mar 2002
Posts: 886
cpu load goes up whenever the ball starts hitting walls. especially when it's in one of those ducts going from top to bottom it hits several times/frame... OUCH!
2003-03-09 12:11
Intensity
Account closed

Registered: May 2002
Posts: 337
Hey Werner,

I haven't got an answer from you in ages...

What about the Pnball Dreams Soundtrack? Has it overtaken someone else or is it still my job?

Yours,

Arman
2003-03-09 17:18
chatGPZ

Registered: Dec 2001
Posts: 11114
wvl: you not only can, but you MUST design the way ball movement is calculated in a way that it can "skip frames" (to be more precise, it should calculate the movement over a given period of time). think of multiball for example. it took me some time to understand that aswell when i was doing the pinball engine for the gameboy... but its really the only way to avoid enormous peeks in processing time. however like you are saying yourself, collisions are the big nut to crack at this point, since these also must work in this context, which is not exactly easy to achive....however it _is_ doable :o)

the only "must be processed each frame under all circumstances" type of routines in your pinball engine should actually be the few things that display the playfield, do scrolling and alike.... even music is a candidate for beeing "frame skipped" if necessary.
2003-03-12 08:37
WVL

Registered: Mar 2002
Posts: 886
Just wanted to tell you all I migrated from using TurboAss on the c64 to using 6502tass on pc. Finally I can have more comments then ever before :)

Also all my stuff is compiled, linked and put in a .d64 and autostarted with one press of the COMPILE button.. rullar :)
2003-09-03 20:47
WVL

Registered: Mar 2002
Posts: 886
a small update

I reworked the clipping engine, and cleaned up the sourcecode, which was really necessary. Looking at the last couple of dates on the post, I see I haven't been working too much on Pinball Dreams, which really is a shame :(

anyway, I got better ideas on the collision detection, which I will implement soon, for now have some fun with :

www.interstyles.nl/Main.txt <- "clean" pinball-engine sourcecode

www.interstyles.nl/Main2.prg <- compiled debug version of the engine, check out the clipping, which is done by cutting pixels out of the sprite, and not by putting things infront of it.

enjoy + l8rs
Previous - 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | ... | 18 - Next
RefreshSubscribe to this thread:

You need to be logged in to post in the forum.

Search the forum:
Search   for   in  
All times are CET.
Search CSDb
Advanced
Users Online
Apollyon/ALD
CopAss/Leader
Luca/FIRE
Exploding Fi../Techn..
Didi/Laxity
Sentinel/Excess/TREX
Flex/Artline Designs
Guests online: 101
Top Demos
1 Next Level  (9.8)
2 Mojo  (9.7)
3 Coma Light 13  (9.7)
4 Edge of Disgrace  (9.6)
5 Comaland 100%  (9.6)
6 No Bounds  (9.6)
7 Uncensored  (9.6)
8 Wonderland XIV  (9.6)
9 Memento Mori  (9.6)
10 Bromance  (9.5)
Top onefile Demos
1 It's More Fun to Com..  (9.7)
2 Party Elk 2  (9.7)
3 Cubic Dream  (9.6)
4 Copper Booze  (9.5)
5 TRSAC, Gabber & Pebe..  (9.5)
6 Rainbow Connection  (9.5)
7 Onscreen 5k  (9.5)
8 Wafer Demo  (9.5)
9 Dawnfall V1.1  (9.5)
10 Quadrants  (9.5)
Top Groups
1 Oxyron  (9.3)
2 Nostalgia  (9.3)
3 Booze Design  (9.3)
4 Censor Design  (9.3)
5 Crest  (9.3)
Top Musicians
1 Vincenzo  (9.8)
2 Rob Hubbard  (9.7)
3 Stinsen  (9.7)
4 Jeroen Tel  (9.6)
5 Linus  (9.6)

Home - Disclaimer
Copyright © No Name 2001-2024
Page generated in: 0.074 sec.