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 > rotating chessboard
2010-10-14 07:43
LHS

Registered: Dec 2002
Posts: 66
rotating chessboard

Hello, how to code a "simple" monochrome rotating (+zooming) chessboard, like the part after intro in Deus Ex Machina?

I'm thinking on line rutines for filled vector (when x' = x+1). Just draw on screen a few lines, then a few lines rotated 90dgrs, it gives a "chessboard net". But then the EOR filling doesn't fill corectly, because the first (upper) line isn't prepared. This first line is filled only by end-points of vector lines. Is this a right thought? How to prepare the upper line?
2010-10-14 08:15
Cruzer

Registered: Dec 2001
Posts: 1048
Guess you could check whether the upper left corner is filled or not based on its position, then draw some lines between the chessboard lines' intersection with the upper line.
2010-10-14 08:41
LHS

Registered: Dec 2002
Posts: 66
I was thinking on similar procedure - additionally fill the upperline between the intersections. But I wasn't sure, if is this usable (or if doesn't exist a better hint). Thanks.
2010-10-14 10:47
WVL

Registered: Mar 2002
Posts: 886
If you really want to do it this way, then determining the first pixel and then EOR-filling-from-left-to-right in the first line is all you need to do.

After that, you can eor-fill from top-to-bottom.

But this is really not how the rotator in DeM or Dawnfall works. The rotators in PfP and Mekanix use a different technique also (completely unlike DeM and Dawnfall).

If you insist on programming it like this, then prepare for it to be really really slow, like really.
2010-10-14 11:01
chatGPZ

Registered: Dec 2001
Posts: 11108
haha i coded one like this.... and i think wvl is underestimating the fact that it'll be like really really slow =D
2010-10-14 11:11
WVL

Registered: Mar 2002
Posts: 886
OK, so how slow was it? :D Still measurable in frames per second, or did you need seconds per frame? ;)

Depending on the size, i'd guess a 16x16 char area would become like 10fps or so.
2010-10-14 11:31
chatGPZ

Registered: Dec 2001
Posts: 11108
well my version was fullscreen und used a rather non optimized multicolor line drawer and even worse filler =) might have been a frame per second or.... maybe less =)
2010-10-14 11:35
JackAsser

Registered: Jun 2002
Posts: 1989
Quote: If you really want to do it this way, then determining the first pixel and then EOR-filling-from-left-to-right in the first line is all you need to do.

After that, you can eor-fill from top-to-bottom.

But this is really not how the rotator in DeM or Dawnfall works. The rotators in PfP and Mekanix use a different technique also (completely unlike DeM and Dawnfall).

If you insist on programming it like this, then prepare for it to be really really slow, like really.


But those in PfP and Mekanix do not have rotation and zooming separated.... The one I did in Andropolis have those properties separated though but ofcourse have silly visual bugs (which I nowadays know how to remove thanx to the intro rotator in Mekanix).

All those rotators other than simple EOR-fillers are quite hard to explain actually and will take forever to elaborate here without pen and paper, honestly. All 50 FPS ones uses char mode though with predefined charsets and tricky methods for determining what charset and what char to display at each point.
2010-10-14 11:38
WVL

Registered: Mar 2002
Posts: 886
Anyway, I'd suggest one using 3 buffers :

1 for drawing only lines in, and 2 for the final eored-picture.

This way, you only have to clear the lines in the first buffer when drawing a new frame, and not the whole eorred picture (saves a lot of cycles).

So :

1) draw lines in buffer 1
2) eor into buffer 2

3) clear lines in buffer 1
4) draw lines in buffer 1
5) eor into buffer 3
6) clear lines in buffer 1
7) draw lines in buffer 1
8) eor into buffer 2

repeat

Oh, and LOL at one second per frame :D

Oh, and also I'm willing to explain in detail how the charset bases rotators work, if anyone is interested.
2010-10-14 12:51
Mace

Registered: May 2002
Posts: 1799
@WVL: I'm interested as long as it doesn't mean that I have to make one afterwards ;-)
2010-10-14 12:58
chatGPZ

Registered: Dec 2001
Posts: 11108
hihi
 
... 19 posts hidden. Click here to view all posts....
 
Previous - 1 | 2 | 3 - 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
Martin Piper
Freeze/Blazon
Vent
Jope/Extend
Guests online: 122
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 Bromance  (9.6)
10 Memento Mori  (9.6)
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 Rainbow Connection  (9.5)
6 TRSAC, Gabber & Pebe..  (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 Fullscreen Graphicians
1 Carrion  (9.8)
2 Joe  (9.8)
3 Duce  (9.8)
4 Mirage  (9.7)
5 Facet  (9.7)

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