ID:275496
 
:( Im mad and glads not going to help. I spend a whole study halls time making the code bellow.

icon/proc/DrawRealCircle(rgb,center_x,center_y,radius)
var/degrees = 0
var/x=0
var/y=0
while(degrees<360)
{
x = cos(degrees) * radius
y = sin(degrees) * radius
x = round(x)
y = round(y)
DrawBox(rgb,center_x+x,center_y+y,,)
degrees++
}

And what do u know v. 338 comes out with a circle type ovals drawing function. :( could some one next time give me a heads up of whats too come in the next version of a byond program.

PS. this is the second time I have spent time making somthing and then byond to come out with a new version to make it easy to create.
On the bright side you now know a lot more about drawing circles =P
On a side note I'm angry at v.338 because the instalation file won't work >:o. Whenever I try to install the files to my Byond folder I recieve an error:

Can't create output file: C:\ProgramFiles\BYOND\bin\dreammaker.exe

What should I do?
In response to Xangelicirex
Close down Dream Maker before attempting to update =P
Basically a computer can't safely over-write a file while it is being used.
For what it's worth, the change in 338 was just a correction of the oval drawing function in the icon editor of Dream Maker. See [link]. If you want to draw circles at runtime, then your proc is still needed.
In response to DarkView
Well, the procedure would break down at large scales, and would be rather inefficient on a smaller scale. It would be better to convert the polar equation to a rectangular system, then go pixel-by-pixel along the X or Y axis, and fill in the remaining variable, then draw a line to it from the last point.
Actually there's still nothing built-in for that. 338 only changes Dream Maker's circle drawing. Still, I'll be making a library for some basic drawing operations.

Lummox JR
Green Lime wrote:
PS. this is the second time I have spent time making somthing and then byond to come out with a new version to make it easy to create.

I imagine that all the programmers who wrote games in assembly during the early 80's were pissed when these upstart "Dantom" fellows made this program that did all that work itself--why heavens, this thing would let practically anybody make a game! Clearly that just won't do.
In response to Leftley
Leftley wrote:
Green Lime wrote:
PS. this is the second time I have spent time making somthing and then byond to come out with a new version to make it easy to create.

I imagine that all the programmers who wrote games in assembly during the early 80's were pissed when these upstart "Dantom" fellows made this program that did all that work itself--why heavens, this thing would let practically anybody make a game! Clearly that just won't do.

They were, more or less. An old computer magazine called Byte once published a letter from a programmer decrying this new high-level language that obscured what was really happening underneath, making it impossible for a real programmer to know what was going on.

At the end of the letter they revealed that it was actually a letter they had received 10 years earlier, and the programmer was complaining about the advent of assembly language.
In response to Deadron
Heh. I couldn't even imagine directly writing things in machine code.
In response to Garthor
Garthor wrote:
Well, the procedure would break down at large scales, and would be rather inefficient on a smaller scale. It would be better to convert the polar equation to a rectangular system, then go pixel-by-pixel along the X or Y axis, and fill in the remaining variable, then draw a line to it from the last point.

Like My wurst subject at school is math so could u please do some code of what you just talked about. Rectangular system or somthin.
In response to Spuzzum
*Shudder*
In response to Green Lime
Green Lime wrote:
Like My wurst subject at school is math so could u please do some code of what you just talked about. Rectangular system or somthin.

Don't sell yourself too short there; you made something that will draw a broken circle (it'll break down at large radii because it just plots 360 points), and that's an excellent first step. For someone who says he's bad at math, you used sine and cosine well enough.

Lummox JR
In response to Spuzzum
Spuzzum wrote:
Heh. I couldn't even imagine directly writing things in machine code.

Back in junior high school, we used to program on the apple II+ in hex code. That was pretty nasty:

0001: F2 AB 3C 21 D7
0002: 45 9A E2 76 A2
etc.
.
.
.


(And no, I don't have any idea what that means, or even if it's entirely valid. However, the structure is pretty close to what we were doing :)

I think we spent a week or so learning how to draw rotating circles, and wireframe cubes. That was a few weeks after they showed us how to use punchcards ;) No, we didn't have to use punchcards to program, but the fact that we still could is a bit scary.
In response to Flick
Why hexcode? What was the matter with the machine's basic interpreter? :P
Besides, it shouldn't have been too hard to find an assembler for it.