Jump to content
IGNORED

Secrets of Speed


Recommended Posts

Yep, really it needs to use self-modifying code and be called often enough to justify the use.

Common cases there being DLIs (savings can be had by simply storing registers straight to load immediate instructions rather than normal stack handling) and sound playback by Timer IRQ where every cycle saved becomes critical.

 

A process like this might be candidate if the savings can be had - but developing stuff as self-modifying code from the onset can be a pain.

Link to comment
Share on other sites

Hi again!

 

I updated my code to use text data in the scroll, attached is the resulting .xex and the source code in ca65 format.

 

It probably can be optimized further, and using DLI the colors could be changed to attenuate the top parts.

 

Wow - that's really nice. Thanks for the source.

Link to comment
Share on other sites

Hi again!

 

I updated my code to use text data in the scroll, attached is the resulting .xex and the source code in ca65 format.

 

It probably can be optimized further, and using DLI the colors could be changed to attenuate the top parts.

 

 

I'm speechless!

 

unfortunately I don't use CA65, can I port the source to ATASM or some other assembler?

Also, the xex wont run on a real atari, DOS2.5 gives me an error 136..

Edited by bugbiter
Link to comment
Share on other sites

Hi,

 

 

I'm speechless!

 

unfortunately I don't use CA65, can I port the source to ATASM or some other assembler?

Also, the xex wont run on a real atari, DOS2.5 gives me an error 136..

 

Thanks, and yes, you can do anything with the code, just respect that I originally write it. I prefer CA65

as it is possible to write relocatable code, so multiple routines can allocate ZP and RAM any way.

 

Also, you are right, it wont run on DOS2.5 but runs in MyDOS :-(

 

This is the fixed source and XEX.

 

scroll.zip

scroll-source.zip

  • Like 1
Link to comment
Share on other sites

  • 2 weeks later...

Good old misdirection also works, although not technically optimisation you can just draw attention away from the real framerate.

 

For example, Imagine a spinning cube bouncing around the screen. You have translation (the movement around the screen) and rotation (the actual spinning). If you were to do the movement by moving the screen scrolling or the sprites that the cube is rendered to in the vsync interrupt then that happens at 50/60fps. The main loop will just be redrawing the spinning as fast as it can, which may be every 2-3 frames, but the eye will be tricked by the smooth movement and it'll appear faster than it actually is.

 

Framerate isn't as important as consistency - people are far more adept at noticing a changing framerate. if you keep bouncing around between 40-50fps just lock it at 30 and it'll seem far smoother and buy you some more time.

Edited by sack-c0s
  • Like 2
Link to comment
Share on other sites

Sack... that's exactly what I am doing right now in my latest production.... ;) and while study Lucasfilm games... look esp. RoF how they "distract" peoples attention to hide their short cuts... ;) (by sound and visuals).

 

the game engine itself runs at 50/60 fps... (joystick, movement, game world updates) while gfx engine not.

  • Like 3
Link to comment
Share on other sites

  • 3 years later...

Hi,

 

 

Thanks, and yes, you can do anything with the code, just respect that I originally write it. I prefer CA65

as it is possible to write relocatable code, so multiple routines can allocate ZP and RAM any way.

 

Also, you are right, it wont run on DOS2.5 but runs in MyDOS :-(

 

This is the fixed source and XEX.

 

FastBasic version please!

:-D

Link to comment
Share on other sites

  • 4 years later...

After eight years I started to meddle with my Star Wars crawl a bit and I made some alterations.

 

It now uses wide screen mode and the source graphics is now a 256 pixel wide bitmap which allows more detailed text so I made an almost screen accurate lettering with a font similar to the movie.

And I finally got rid of the ugly jagged graphics- for 30 years now (I started that thing around 1990) I thought it was lack of precision of the scanning routine, but I just missed to align each line correctly with the right scan width.. vertical lines are now smooth as they should be.

 

No changes on the speed here - the framerate is as slow as it always was - but in Altirra with warp speed mode on it looks quite nice 🙂

CRAWL 2022.atr

  • Like 7
Link to comment
Share on other sites

On 11/11/2022 at 3:35 PM, bugbiter said:

After eight years I started to meddle with my Star Wars crawl a bit and I made some alterations.

Just noticed this thread, a fun problem indeed!

 

You mentioned doing the proper (aliased) zooming method. That is indeed the right way but for starwars type of scrollers you may be able to get away with an incremental one.

 

The demo group Sanity on Amiga were amazing at this, they were the first to show off 4bitplane fullscreen real time zooms but it didn't look that great probably because it was using the incremental method ?

 

 

However I'm guessing their Starwars scroller from the same demo also uses that method, yet looks better:

 

 

 

Or you could do it the old atari ST way:

 

 

...Preshift all the font sizes !

 

 

  • Like 1
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...