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 / Drawline(100,100,100,100) doesn't draw a dot

Author
Message
Timshark
17
Years of Service
User Offline
Joined: 30th Jun 2007
Location: Oslo, Norway
Posted: 11th May 2013 18:29 Edited at: 11th May 2013 18:30
Hi
I don't know if I'm right but drawline(100,100,100,100,255,255,255) doesn't seem to draw a dot. am I right?

It should

I never want what I know.
Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 11th May 2013 19:22 Edited at: 11th May 2013 19:23
its roundet and out of screen or vector lenght between the points
are to small.
you can also paint/plot with a sprite setspritepositionbyoffset,setspritecolor,drawsprite


drawline(100-0.25,100-0.25,100,100-0.25,255,0,0)
Timshark
17
Years of Service
User Offline
Joined: 30th Jun 2007
Location: Oslo, Norway
Posted: 11th May 2013 19:29
Quote: "its roundet and out of screen or vector lenght between the points are to small."


So that's whats happening. Alright then.

Yes, drawing with sprites is a well known concept to me by now. This was just something I checked in line with the simple drawing commands thread:
http://forum.thegamecreators.com/?m=forum_view&t=205338&b=41

Should have posted it there...

Thanks for the help

I never want what I know.
Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 11th May 2013 20:22
the virtual resolution is not really made for paintings.
a other way for pixel perfect painting is making a memblock from backbuffer , paintings , make a image from it
and paint it on the screen with a full size sprite.
Timshark
17
Years of Service
User Offline
Joined: 30th Jun 2007
Location: Oslo, Norway
Posted: 11th May 2013 20:26
Quote: "the virtual resolution is not really made for paintings."

Yes, I have noticed that
The drawing functions in the thread i linked to gets weird in different resolutions

I never want what I know.
Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 11th May 2013 20:48 Edited at: 12th May 2013 09:08
jo, i saw this thread.
its useful for people that want just paint a little bit.
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 11th May 2013 23:32
Why would you think it'd draw a dot?

x = 100 - 100 = 0
y = 100 - 100 = 0

So what's left to draw? You need to make the end point at least 1 pixel away.

"You're all wrong. You're all idiots." ~Fluffy Rabbit
Timshark
17
Years of Service
User Offline
Joined: 30th Jun 2007
Location: Oslo, Norway
Posted: 11th May 2013 23:52 Edited at: 11th May 2013 23:55
@Phaelax

Oh ok. I just thought It would draw an extra dot at the same point. So 100,100,101,100 draws one point?

I never want what I know.
Kevin Picone
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Australia
Posted: 12th May 2013 02:48
Lines generally use an inclusive -> inclusive fill conversion, meaning it would draw a single got when the start/end coordinates intersect.

MarcoBruti
13
Years of Service
User Offline
Joined: 20th Nov 2011
Location: Caput Mundi
Posted: 12th May 2013 18:15
Quote: "Lines generally use an inclusive -> inclusive fill conversion, meaning it would draw a single got when the start/end coordinates intersect."

You're right. Many years ago I have written a graphics library for Borland Turbo C 1.0 (that came up without any graphics function). At that times there was the (in)famous CGA adapter for PC, capable of 320x200 in 4 colors and 640x400 in 2 colors
The line command was a loop cycle, in which at least 1 iteration was executed. So at least 1 point was written. I did not use sin and cos, but an algoritm based on integer math. I would be interesting to know what algorithm has used Paul. In any case 1 point should be displayed.
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 12th May 2013 21:38
Quote: "At that times there was the (in)famous CGA adapter for PC, capable of 320x200 in 4 colors and 640x400 in 2 colors"


I remember when I first discovered screen mode 13 in QB. I was like 256 colors?! Yay!

"You're all wrong. You're all idiots." ~Fluffy Rabbit
MarcoBruti
13
Years of Service
User Offline
Joined: 20th Nov 2011
Location: Caput Mundi
Posted: 12th May 2013 22:22
You are younger than me. Mode 13 was for VGA. When I started with PC world (in 1987, I was 18), there was no VGA, but CGA and its evolution EGA. The latter one offered a 640x350 resolution at 16 colours, if I remember correctly. Generally my first games used 320x200 at 4 colours (that was the most used mode by commercial games,. My first games (in QuickBasic) used text mode 80x25 or 40x25 (16 colors) or graphics mode 320x200 at 4 colours (with 2 different palette). Then I bought Turbo C and I discovered that no graphic lib has been implemented. So I had to implement draw commands by myself. A lot of years ago. It is strange to see that after many years, the problems always are the same.
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 12th May 2013 22:38
Quote: "(in 1987, I was 18)"

You're close to half a century now!

I never did turbo C, but Turbo pascal in the 90s. Though I do kind of miss the early computer scene.

"You're all wrong. You're all idiots." ~Fluffy Rabbit
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 12th May 2013 22:53
My first PC only had CGA. But we got a Plantronics Colorplus display card that gave me 16 colors in CGA resolution.

And we paid a pretty penny for it.

Sadly, not many programs took advantage of it and EGA came out and made it obsolete.

Turbo Pascal let me do some nice programs for my early IBM PC and some XT and XT compatibles after that.

The early PC scene was fun.

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master
JimHawkins
15
Years of Service
User Offline
Joined: 26th Jul 2009
Location: Hull - UK
Posted: 13th May 2013 00:27
The early Amiga scene was even more fun! 4096 colours!

-- Jim DO IT FASTER, EASIER AND BETTER WITH AppGameKit FOR PASCAL
MarcoBruti
13
Years of Service
User Offline
Joined: 20th Nov 2011
Location: Caput Mundi
Posted: 13th May 2013 00:42
Quote: "You're close to half a century now!"

Dont't exaggerate! I am only near to 44! Luckily for you, I am not a woman, try to say the same to your wife or girlfriend...

Quote: "I never did turbo C, but Turbo pascal in the 90s."

Turbo C was one of the first C compilers for IBM PC, when C started to stand over other languages. And now all serious languages (Objective C, C++, Java and Perl above all) are based on C (and Basic, of course).
I used Turbo Pascal during the first years of my engineering studies at the university (89-90), the first version of Turbo Pascal generated .COM files of maximum 64K, using dynamic loading in order to overcome the memory limit. Next version of Turbo Pascal generated standard relocatable EXE files, so superseding that limitation. Borland is always in my mind

Quote: "my first PC only had CGA. But we got a Plantronics Colorplus display card that gave me 16 colors in CGA resolution."


My first PC was an IBM PC AT compatible with 512K, assembled in Italy, not a real IBM PC coming from Greenock, UK (where PCs for European market were assembled before IBM sold the PC business to Lenovo). In 1989 I upgraded the CGA to EGA, making my father spend a lot of money but, as you wrote, EGA was not really very used by games, and it was soon superseded by VGA. So they had been money thrown out of the window. A beautiful commercial game that ran well on CGA, was California Games from Epyx. The beauty of CGA 4 colors was that you could grab the 16K of video memory and save to disk/load from disk, creating easily splash screens.
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 13th May 2013 00:51
My first PC was a name brand IBM PC which had the maximum possible 64K on the motherboard. We had to add an expansion card to get it up to 640K.

I have truly enjoyed watching the growth of computers available to people.

My first computer access was, of course, at university using punch cards to send a program to a computer a couple of hundred miles away.

Yup, I like a real keyboard with usable backspace.

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master
JimHawkins
15
Years of Service
User Offline
Joined: 26th Jul 2009
Location: Hull - UK
Posted: 13th May 2013 01:40
Quote: "And now all serious languages (Objective C, C++, Java and Perl above all) are based on C (and Basic, of course)."


Marco - that's a very selective list! Lisp, for example, is widely used in the Artificial Intelligence community. Skype used Delphi for its front-end.

Yes, C dominates with approximately 18% of programmers using it. But there are other "serious" languages used in specialist areas.

Interestingly, Lua now ranks 20th in the usage list.

-- Jim DO IT FASTER, EASIER AND BETTER WITH AppGameKit FOR PASCAL
Timshark
17
Years of Service
User Offline
Joined: 30th Jun 2007
Location: Oslo, Norway
Posted: 13th May 2013 05:36 Edited at: 13th May 2013 06:13
So the conclusion is it should draw a dot. Then it has to be the percentage system that's having fun with me. I've ditched the drawline command It's too unreliabale for my needs right now. I've gone back to spritedrawing even if it needs more commands it seems solid.

And Phaelax, next time you could tone down the patronizing attitude in your response. It seems my "thinking" wasn't that bad.

EDIT: My first computer was the zx spectrum - I was twelve and it was in 1982. Drawing lines, sinewaves and circles was the first thing I did - now forgotten. Have a lot of catching up. But I'm getting there.

I never want what I know.
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 13th May 2013 06:47
Quote: "And Phaelax, next time you could tone down the patronizing attitude in your response. It seems my "thinking" wasn't that bad."

There was no attitude, so get over it.

"You're all wrong. You're all idiots." ~Fluffy Rabbit
Timshark
17
Years of Service
User Offline
Joined: 30th Jun 2007
Location: Oslo, Norway
Posted: 13th May 2013 06:55
Quote: "There was no attitude, so get over it."

I am.

I never want what I know.
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 13th May 2013 16:40
When I was making a decision about my first AppGameKit WIP, I figured out that the virtual resolution system gave much more control than percentage one. And it wouldn't mess with the appearance of the graphics at all.

Regarding first computers, I take back my first claim, my first computer was an Atari 400. We swapped the membrane keyboard for a full key one and purchased the external floppy drive as soon as it was out.

I had fun programming in Basic and assembly language. I created games from my son and produced the birth announcements for my daughter (using an Epson 8-pin dot matrix printer).

The PC was bought for business purposes. The Atari was just for fun. It was great finally getting "The Pharoah's Curse" to start after waiting about 20 minutes for the tape to load. And that assumes that it was cued to the correct spot when the load was started.

Yup, I like computers.

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 13th May 2013 18:28
Quote: " It was great finally getting "The Pharoah's Curse" to start after waiting about 20 minutes for the tape to load"

I think I remember having that on amiga. And was your dot matrix as loud as ours? You could hear that thing running through the entire house.

"You're all wrong. You're all idiots." ~Fluffy Rabbit
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 13th May 2013 19:14
Quote: "And was your dot matrix as loud as ours?"

Definitely!

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master
Marl
13
Years of Service
User Offline
Joined: 19th Nov 2011
Location: Bradford, UK
Posted: 13th May 2013 19:34
Quote: "It was great finally getting "The Pharoah's Curse" to start after waiting about 20 minutes for the tape to load."

Unless someone coughed too close to the tape deck then you got;
BOOT ERROR
BOOT ERROR
BOOT ERROR

We used to leave the room to ensure the thing loaded.

Unlike the commodore Vic20 - My first, you could swing the tape deck around your head while loading - it didn't care.

Still took 20 minutes though
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 13th May 2013 19:57
Quote: "Still took 20 minutes though"

But once it started (assuming no interrupted it), it was great to play.

Sadly, no one appears to have made a version for current platforms.

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master
Timshark
17
Years of Service
User Offline
Joined: 30th Jun 2007
Location: Oslo, Norway
Posted: 13th May 2013 22:30 Edited at: 13th May 2013 22:41
Quote: "When I was making a decision about my first AppGameKit WIP, I figured out that the virtual resolution system gave much more control than percentage one."

Actually I am using virtual resolution. And My initial resolution in setup.agc is set to the same 800x600 virtual res. I have done just like you. I decided that trying to build something for every platform was too much to handle as a first WIP project. So actually it can't be the percentage system that's messing with me.

This:

Gives me nothing.

But this:

Gives me dots.
But I'm not sure if they are double dots or not. I think not

I never want what I know.
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 13th May 2013 22:47
I suspect that the process that does the line may use something like:
for (x=startx;x<endx;x++)

Since your start and ending values are the same, the condition 'x<endx' fails and the contents of the for loop are not executed.

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master
Timshark
17
Years of Service
User Offline
Joined: 30th Jun 2007
Location: Oslo, Norway
Posted: 13th May 2013 22:58 Edited at: 13th May 2013 23:01
That's alright. I just had the impression from the answers that it should....ahhh
forget it

I'm not using it anymore anyway.

This:


Gives me a perfect and reliable circle anyway.

I never want what I know.
Marl
13
Years of Service
User Offline
Joined: 19th Nov 2011
Location: Bradford, UK
Posted: 14th May 2013 00:37
@Timshark,

You can do the same with a 90 degree turn, something to do with squares being - well square

And as a bonus, this will make you an image of a circle of a specified diameter;
Timshark
17
Years of Service
User Offline
Joined: 30th Jun 2007
Location: Oslo, Norway
Posted: 14th May 2013 02:19
@Marl
Ha. Yes of course. 90 is enough. Thanks.
And thank you for the code! That will come in handy.

I never want what I know.

Login to post a reply

Server time is: 2024-11-24 14:49:09
Your offset time is: 2024-11-24 14:49:09