Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / Drawing commands vs color parameters

Author
Message
Rich Dersheimer
AGK Developer
15
Years of Service
User Offline
Joined: 1st Jul 2009
Location: Inside the box
Posted: 15th Oct 2012 22:26 Edited at: 15th Oct 2012 22:28
I was thinking about if/when AppGameKit gets drawing commands, like DrawLine() or DrawBox(), and the way that colors are specified in AGK.

Are AppGameKit commands limited to 9 parameters? It seems like at least one of them (SetSpriteShapePolygon?) can use more than 9 parameters.

Since AppGameKit uses 4 integers (RGBA) for colors, a box drawn with a different color at each corner would need an awful lot of parameters.

Maybe something like a SetDrawColor(iColorID, iRed, iGreen, iBlue, iAlpha) could be used to set up colors for drawing primitives.

That would give us

DrawBox(x, y, w, h, c1, c2, c3, c4)

or maybe

DrawBox(x1, y1, x2, y2, c1, c2, c3, c4)

Anyway, I was just giving it some thought.

Impetus73
13
Years of Service
User Offline
Joined: 28th Aug 2011
Location: Volda, Norway
Posted: 16th Oct 2012 11:07
The 9 limit, is on user made functions, i think. and it's annoying.

----------------
AGK programmer
Did Amiga / AMOS programming in the 90's.
nz0
AGK Developer
17
Years of Service
User Offline
Joined: 13th Jun 2007
Location: Cheshire,UK
Posted: 16th Oct 2012 15:52
once you have drawline() then drawbox would be within the realms of most programmers
also, you would have much more flexibility over how you wanted to draw your box.

someone already posted a very usable drawline() function some time ago and being a sprite, also has some benefit for collision testing.

any new drawline() , drawbox() etc, would almost certainly be missing these benefits.

Impetus73
13
Years of Service
User Offline
Joined: 28th Aug 2011
Location: Volda, Norway
Posted: 16th Oct 2012 20:08
I suspect the drawing commands, will be sprites, unless you draw them on a surface only. You can always make your own draw routines, for spritebased lines.

----------------
AGK programmer
Did Amiga / AMOS programming in the 90's.

Login to post a reply

Server time is: 2024-11-24 00:06:15
Your offset time is: 2024-11-24 00:06:15