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 / Can we get line-drawing and paste image/sprite support for T1?

Author
Message
Charles
19
Years of Service
User Offline
Joined: 11th Jul 2004
Location: Phoenix, AZ USA
Posted: 15th Sep 2011 15:55
I noticed that there were a few graphics commands that seem to be missing:
1) Line Drawing.
2) GetImage() and PasteImage().
3) PasteSprite().

Any chance that these commands will be added?
Bursar
15
Years of Service
User Offline
Joined: 17th Sep 2008
Location:
Posted: 15th Sep 2011 16:31
Bugs and feature requests should be added here: http://code.google.com/p/agk/issues/list

Line drawing has been requested by several people, so we're hopeful it will added in the not too distant future.

GetImage could be useful, and I think it's been requested before.

I can't see the benefit of PasteImage or PasteSprite though. What would you do with those commands that you can't do with the current sprite commands?
Cliff Mellangard 3DEGS
Developer
18
Years of Service
User Offline
Joined: 20th Feb 2006
Location: Sweden
Posted: 15th Sep 2011 19:50
Quote: "I noticed that there were a few graphics commands that seem to be missing:
1) Line Drawing.
2) GetImage() and PasteImage().
3) PasteSprite().

Any chance that these commands will be added? "


The main reason is that open gl is not true 2d!

Its 3d with an camera view that makes it look like 2d.

Why do you want paste sprite?

The only reason to use it in dbp whas for speed issues.

You draw lines very simple with stretched sprites that is faster!
Impetus73
12
Years of Service
User Offline
Joined: 28th Aug 2011
Location: Volda, Norway
Posted: 15th Sep 2011 20:03
Hi Charles, look at this forum thread for the discussion on the drawing commands:

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.
Charles
19
Years of Service
User Offline
Joined: 11th Jul 2004
Location: Phoenix, AZ USA
Posted: 15th Sep 2011 22:45
Ok.

Bursar, The paste commands can be used in building a map that can be traversed (like Ultima 1, and others). The map files can be made very small while being able to build it on the fly.

Impetus73, that looks like an awful lot of work for some simple line-drawing commands. It might even slow the cell phone down a bit.
Bursar
15
Years of Service
User Offline
Joined: 17th Sep 2008
Location:
Posted: 15th Sep 2011 23:03
Sorry Charles, I still don't follow you with regards to the pasting.

Are you talking about tilemaps? Just make them with sprites and build them in an array. All pasting does is put images on screen. AppGameKit uses sprites for this.
Charles
19
Years of Service
User Offline
Joined: 11th Jul 2004
Location: Phoenix, AZ USA
Posted: 16th Sep 2011 05:36
Ok... Imagine loading numerous images and then pasting them onto the screen to create the game terrain. The terrain can be saved as a text file with each character representing a terrain image number. This can be used to reconstruct the terrain. It also has the advantage of being able to scroll through the terrain. This should economize on the bitmap memory as well.
Impetus73
12
Years of Service
User Offline
Joined: 28th Aug 2011
Location: Volda, Norway
Posted: 16th Sep 2011 20:17
Charles, I will not use the line drawing routines for phones, it was just a tech demo to see if it could somehow be done on a powerful PC The sprite lines will be good on a phone though.

Charles, the AppGameKit does not seem to have a default "Bitmap" where you print and draw stuff on like a piece of paper, just a dark void with text and picture "sprites" floating around. It's OpenGL based. So you can make a text string telling wich sprite's to appear where, you can have over 16000 sprites on the screen at the same time, so don't worry about sprites being ineffective compared to pasting on a bitmap, I think they might be way faster.

----------------
AGK user - novice
Did Amiga / AMOS programming in the 90's, just started programming again with AGK.
Bursar
15
Years of Service
User Offline
Joined: 17th Sep 2008
Location:
Posted: 16th Sep 2011 22:50
You can still do all of that.

Untested code follows (and I can't remember the complete syntax for everything, so some of it is psuedo code):

This is some basic code to create a 10x10 map using two randomly chosen map tiles.


Next comes the bit to save the map


When loading the map, you mix the saving code with the creation code so that as you read the file, you loop through the array receating the spriteID, xPos and yPos elements.

Being able to scroll the map has nothing to do with how anything is displayed on screen.
Charles
19
Years of Service
User Offline
Joined: 11th Jul 2004
Location: Phoenix, AZ USA
Posted: 17th Sep 2011 00:48
Yes... I see that, now. I just wanted to do some line-drawing just to create a "Growbox" for whatever buttons get pressed. Nothing major. I guess I could use a box sprite for that and just scale it to make it grow around the selected button.

As for the map stuff, I'll just use a series of sprites like Bursar suggested. Thanks for the great ideas, guys.

Login to post a reply

Server time is: 2024-04-16 20:48:30
Your offset time is: 2024-04-16 20:48:30