1
AGI Development Tools / Re: WinAGI 1.1 BETA available for download
« on: May 19, 2017, 03:16:25 AM »
Nice! Will definitely check it out.
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Yeah, a macbook air, surface pro 4, ipad 3, and a couple of phones (both of which were older models not being used anymore). That's what we know about at the moment. It must have been a quick fill a bag and run I think. Larger items left alone.
That looks really good. I can still see a few pixels here and there that aren't quite right.
What are you using for your line drawing algorithm? The exact algorithm used by Sierra in AGI is pretty simple, and uses only integers. If you implement that algorithm, you'll get lines that come out exactly as Sierra drew them.
Here's a pseudo-code example of the Sierra line algorithm:Code: [Select]void drawline(int X1, int Y1, int X2, int Y2)
{
//assumes X1 != X2 and Y1 != Y2
//assumes pset knows correct color to set
int xPos, yPos, DX, DY, vDir, hDir;
int XC, YC, MaxDelta, i;
//determine delta x/delta y and direction
DY = Y2 - Y1; vDir = (DY<0? -1, 1);
DX = X2 - X1; hDir = (DX<0? -1, 1);
//set starting pixel
pset(X1,Y1);
xPos = X1; yPos = Y1;
//invert DX and DY if they are negative
if(DX < 0) DX *= -1;
if(DY < 0) DY *= -1;
//set up the loop, depending on which direction is largest
if(DX >= DY) {
MaxDelta = DX;
YC = DX / 2;
XC = 0;
}
else {
MaxDelta = DY;
XC = DY / 2;
YC = 0;
}
//draw line
for(i == 1; i == MaxDelta; i++) {
YC += DY;
if(YC >= MaxDelta) {
YC -= MaxDelta;
yPos += vDir;
}
XC += DX;
if(XC >= MaxDelta) {
XC -= MaxDelta;
xPos += hDir;
}
pset(xpos, ypos);
}
}
For plotting, there's good information in the WinAGI help file that explains how to code that, including brush sizes and shapes. For splatter plotting, the actual algorithm that Sierra used is a lot simpler than the bit array in the AGI specifications that has been used for years. Here's the actual Sierra algorithm:Code: [Select]//read starting pattern from picture data stream
pattern = pattern | 1
//set starting pixel to first pixel on top row of desired pen shape
do {
newPatt = pattern >> 2
if ((pattern & 1) == 1) {
newPatt = newPatt ^ 0xB8
}
pattern = newPatt
if ((pattern & 3) == 2) {
//draw this pixel
}
}
//move to next pixel, in left-to-right, top-to-bottom order
while !done //loop until all pixels in desired pen shape are tested
If you haven't already done it, make sure your fill algorithm handles cases where the visual and priority pens are set/not set; if only visual pen is set, fill will use boundary lines it finds in the visual picture; if only priority pen is set, fill will use boundary lines it finds on the priority screen; if both pens are set, fill will set pixels in both images, but will only use the visual screen boundaries it finds.
If you have any questions about AGI resources, take a look at the WinAGI help file - it's got a ton of information. Or you can message me/post here.
So aside from working out what I want to do, I started poking around with python/SDL2 two nights ago, and made some babysteps on a reader of the Picture format. Not sure why I'm doing it, other than to stretch some old mental muscles, but it's.. alright? Top is the original, and bottom is what the prototype can do.
Most of what it does is create a list of draw commands (as a class) and populates the details of each command. Only the regular lines are drawn currently, which was to verify I had the right structure. In this case the draw is multiplying coordinates rather than mapping to 160x200 and doubling up from there.
It's not much, but it's kinda on this level.
A couple of months back I discovered that The Ruby Cast demo was on archive.org as well. Amazing what turns up on there, and great to know now that The Ruby Cast is preserved in that form.
Well I guess you are "back" whenever you post a message on here. That's kind of how I view it. I got lost in a bit of VIC 20 nostalgia at the start of last year. I spent literally 6 months staring at a microscopic photo of the silicon layers of the video chip used in the VIC 20 and was trying to reverse engineer the schematic. Made quite a bit of progress while I was at it, perhaps covering about a sixth of the surface. I guess I was away from the AGI community over that time but made another return in the second half of last year.
The Ruby Cast is certainly unfinished business for me. I will eventually focus enough to continue working on that.
SMF 2.0.19 |
SMF © 2021, Simple Machines
Simple Audio Video Embedder
Page created in 0.036 seconds with 20 queries.