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 / 2D Drawing Commands?

Author
Message
Noob Programmer
12
Years of Service
User Offline
Joined: 22nd Sep 2011
Location:
Posted: 22nd Sep 2011 17:35
Hello all

I am new to the forum. I have try out the APP Game Kit and I was wondering does it have 2D Drawing commands?

Rich Dersheimer
AGK Developer
14
Years of Service
User Offline
Joined: 1st Jul 2009
Location: Inside the box
Posted: 22nd Sep 2011 18:27 Edited at: 22nd Sep 2011 18:29
It doesn't have any drawing commands right now, but I think TGC may add some in the future. You can add your voice to calling for this feature at the bug/request board here.

Noob Programmer
12
Years of Service
User Offline
Joined: 22nd Sep 2011
Location:
Posted: 23rd Sep 2011 04:13
Thanks rich...

It is possible to make own 2D Drawing Commands?
DVader
20
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 23rd Sep 2011 06:33
Only by using sprites to fake it. You could have an entire screen of tiny sprites gridded to fit and then show hide the ones you mouse over for instance. Or scale a sprite along an axis to draw a line etc. Theres plenty of room for improvising.

baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 23rd Sep 2011 10:55
Quote: "You could have an entire screen of tiny sprites gridded to fit and then show hide the ones you mouse over for instance."

Nice simple idea but surely quite slow? If not that's a great solution.

I'm using stretched sprites for boxes and lines from a white 1x1 pixel image. That way if you use "setSpriteColor" you can edit everything including the alpha of the sprite. I store all my sprites in an array and delete them when I don't need them any more... it's pretty neat really but some basic commands would be great.

Impetus73
12
Years of Service
User Offline
Joined: 28th Aug 2011
Location: Volda, Norway
Posted: 23rd Sep 2011 13:59 Edited at: 23rd Sep 2011 14:00
Hi Noob, check out this thread:

http://forum.thegamecreators.com/?m=forum_view&t=189234&b=41



----------------
AGK user - novice
Did Amiga / AMOS programming in the 90's, just started programming again with AGK.
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 23rd Sep 2011 14:13
That's pretty darned amazing Impetus73! Nice...

Shows what you can do without line commands for sure, my only worry is that you may have shown TGC we don't really need the 2D commands if we think about it...

Impetus73
12
Years of Service
User Offline
Joined: 28th Aug 2011
Location: Volda, Norway
Posted: 23rd Sep 2011 15:55
Haha baxslash, we DO need them, this manual way of doing it is a hassle, and Lee had some ideas for how to make a drawing instruction set, by using predefined sprites at high res, he were babbeling about a "module" to AppGameKit that would deal with it.

----------------
AGK user - novice
Did Amiga / AMOS programming in the 90's, just started programming again with AGK.
DVader
20
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 23rd Sep 2011 22:41
@baxslash, I haven't tried it but I did do a stress test with agk in the first few days. I got over 26,000 sprites on screen before the FPS dropped below 60. Perhaps I should post it to see what other get So I think it is fairly capable in that area. You wouldn't be able to go high res, but a semi low res screen should work. But yeah, not the most efficient way, just a quick example really to give an idea of other ways to fake drawing commands.

Noob Programmer
12
Years of Service
User Offline
Joined: 22nd Sep 2011
Location:
Posted: 24th Sep 2011 02:00
Thanks Impetus73 and I will check that
Impetus73
12
Years of Service
User Offline
Joined: 28th Aug 2011
Location: Volda, Norway
Posted: 24th Sep 2011 12:14
26000 sprites? I don't think so, I have found that any sprites above 16384 will not physically show, even if you can define them, and run commands on them. only 16384 individual sprites will show on screen at the same time, the rest is invisible. try make alot of sprites at the size of 1x1 pixel, put them on the screen, and see that it stops after 16384.

----------------
AGK user - novice
Did Amiga / AMOS programming in the 90's, just started programming again with AGK.
Noob Programmer
12
Years of Service
User Offline
Joined: 22nd Sep 2011
Location:
Posted: 24th Sep 2011 20:21
I doing Twister Demo but cant get two Twister on the screen...

does anyone know why?



It work so well with other programming language and I want to make work on AppGameKit
DVader
20
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 25th Sep 2011 06:54
I have tested that out impetus73, I hadn't noticed it on my stress test as I just left it to run until it fell below speed. It still however continued to make sprites until it had slowed down below 60fps, even if it wasn't displaying them. But yes indeed you are correct, 1 pixel sprites do seem to stop at just over 16000.

Impetus73
12
Years of Service
User Offline
Joined: 28th Aug 2011
Location: Volda, Norway
Posted: 25th Sep 2011 10:08 Edited at: 25th Sep 2011 10:13
Noob, I have not tested it yet, but I think your problem is that you are not using floats! add an # after every variable, and I think it would work better.

EDIT: ups! Your trying to add 107341 sprites on the screen at the same time, the max is 16384.

You shold rather try your demo using my other line drawing function, the one that uses stretched sprites instead of a pixel bitmap emulation like this one. Max practical resolution with this one is 160*100 pixels. The sprite stretch has no practical limitation on resolution as I know of.

----------------
AGK user - novice
Did Amiga / AMOS programming in the 90's, just started programming again with AGK.
Impetus73
12
Years of Service
User Offline
Joined: 28th Aug 2011
Location: Volda, Norway
Posted: 25th Sep 2011 10:27
ok, here is the converted version, it has some error you will have to figure out, since I'm not sure how the ressults were gonna be.



----------------
AGK user - novice
Did Amiga / AMOS programming in the 90's, just started programming again with AGK.
Impetus73
12
Years of Service
User Offline
Joined: 28th Aug 2011
Location: Volda, Norway
Posted: 25th Sep 2011 13:18 Edited at: 25th Sep 2011 13:21
I simplified and modified the code abit, was it something like this you wanted to do?





----------------
AGK user - novice
Did Amiga / AMOS programming in the 90's, just started programming again with AGK.

Login to post a reply

Server time is: 2024-04-24 23:34:10
Your offset time is: 2024-04-24 23:34:10