Jump to content
VladR

BallBlazer framerate

Recommended Posts

Hah! at first I thought you got me, but here in this case I wanted to get bits 7 and 6 shifted right to position 1 and 0.

So instead of lsr lsr lsr lsr lsr lsr lsr I did it the other way round through the carry bit. The ASLs won't help me here :-)

 

But thanks! I am sure there are hundreds of places in my code where there could be speed improvements. I love to hear hints from you demo coders!

 

There is a 24 bit division routine that I use to calculate the slope of the center line between the tiles (step). Maybe I could use a bresenham algorithm instead... Or lookup tables..

 

At the moment the lineloop routine that puts all the values into the color and hscrol tables is finished just 3 or 4 scanlines befor the Kernel has to start! Way too slow!

  • Like 1

Share this post


Link to post
Share on other sites

Its already running on a different platform ;) I implemented already the fastmul.

 

Brese not sure if that helps as it works in integers only?

 

Of course you could precalc a lot maybe tables tables and tables ;)

 

Unrolling code...

 

Counting tables from top to bottom to avoid the CPX etc, important vars are in page 6 not

ZP...

 

As your tables are 85 for each color why not put them into ZP, too?

 

The turn off OS.

  • Like 1

Share this post


Link to post
Share on other sites

Yessss!! Thank you!

 

What platform?

One which has not the luxury of having LMS ;) and a nice palette...

 

So horizontal is an issue...

 

What is the gfx in your source? 1:1 copy of BB or own? How long is a line? Sorry have not counted.

 

I am toying with dimension X checkboard at the moment.

Share this post


Link to post
Share on other sites

hmm what could that be? NES?

 

I coded the gfx data by hand :-) the lines are different in length, the topmost needs only to be about 45 bytes as it doesn't move much, the bottom line must be about 90.. not sure.

 

yeah, dimensionx could look better!

Share this post


Link to post
Share on other sites

a quick hack Martin's code with original BB texture.... as you see Martin does make a larger screen... but basicly works... just needed to adjust the center line value...

 

next is Dimension X...

 

 

ballblazer.zip

  • Like 2

Share this post


Link to post
Share on other sites

a quick hack Martin's code with original BB texture.... as you see Martin does make a larger screen...

Cough.... heaven .... cough.....

 

 

The original BB texture is used in a game, and not just one time: It is 2 times independently working, at the same time.

Interestingly, the dither line helps to fill the moving part more vertically, as the line doesn't need any calculations.

Share this post


Link to post
Share on other sites

emkay.... sure BB has 2 screens.... I was referring only to the fact that Martin did a larger map... nothing more and no blaming BB...

 

@Bugbiter

 

Dimension X does not work somehow.... esp when you are looking at the game it moves 1 tile when you move left/right so no "fine" adjustments possible.

 

Dx uses much smaller grids... I tried to adjust c_line value but i am not 100 % sure how you calc the wrapping...esp with that value ("2*c_lines").

 

what is your 94? as you have 95 lines data?

Share this post


Link to post
Share on other sites

with the ballblazer grid each tile is two pixels wider each line as you go down. That's why it wraps (with a colour flip) when the bottom line has moved for the amount of #c_lines*2 pixels which is the tile width at the bottom line.

c_lines itself is the number of lines counted from the imaginary central point [Fluchtpunkt] to the bottom. We actually see less lines to achieve the effect of the over-the-horizon-curve. 'lines' is the number of visible lines on the screen.

If both were the same the top line would be in the central point and would not move at all, the tiles woild be infinitely small in width and the diagonals in the checkerboard geometry would look very curved near the horizon. The halving of the horizontal border's Y positions is just an approximation of the correct function and that curved error is already there if you look closely...

 

Try to count the visible playfield lines in Dimension X and set Lines to that value. Then look if there is a central point above the first playfield line (where would the line be that has tiles which would be zero pixels wide) and take that for c_lines. Then the field should move right.

For the wrapping just look at how wide the tiles are at the bottom and wrap with that number of pixels. Just put a fixed value instead of #c_lines*2 for the wrapping routines.

 

I hope that helps a bit.

  • Like 1

Share this post


Link to post
Share on other sites

yeah helped... haven't completed analysis of your code in terms of maths...

 

but it is good that it is not out optimised :D so it remains readable and maintainable...

 

here my attempt with Dimension X... it was more tricky and trial and error with the wrapping pixel

 

as 1 grid should be 34 pixel but

 

c_line=94

and wrapping pixel value = 48

 

as slope is 0.5 (2 pixels down, 1 to the side instead of 1 pixel down, 2 to side)

 

BBgrid02_dx2.zip

Edited by Heaven/TQA
  • Like 1

Share this post


Link to post
Share on other sites

Nice! If I only knew how to solve this 'combing' problem...

 

Maybe scroll every other line instead of every line.

Share this post


Link to post
Share on other sites

Nice! If I only knew how to solve this 'combing' problem...

Add another buffered line with the correct graphics ;)

Share this post


Link to post
Share on other sites

@Martin

 

don't worry... I suspect rounding errors... so count that as "dithered realtime" ;)

 

i am sure its because grid vs formulars vs heaven hacking

Share this post


Link to post
Share on other sites

@Martin

 

don't worry... I suspect rounding errors... so count that as "dithered realtime" ;)

 

i am sure its because grid vs formulars vs heaven hacking

the weird "interleave" reminds me of a lot C64 demos.

Share this post


Link to post
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...