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 / clearscreen() and getimage() small problem

Author
Message
xsankyo
14
Years of Service
User Offline
Joined: 13th May 2010
Location: Italy
Posted: 1st Jan 2015 19:30
hello everyone.
I purchased agk2 and am trying to migrate my programs written with darkbasic but I found many differences of command syntax. Please help me.

With darkbasic to import my tileset I perform this simple routine to import individual tile of my map.




here translated into agk



I can not understand why the command ClearScreen () does not work and I still see the tileset "tilemg.png".

Why in the upper left me appears the sprite number 97 ?

Sorry for my bad English, and thanks for the help.

Attachments

Login to view attachments
smallg
Valued Member
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location: steam
Posted: 1st Jan 2015 19:37
use DeleteSprite(1000)

life's one big game
spec= 2.6ghz, 1gb ram, 512mb gpu, directx 9.0c, dbpro and classic
xsankyo
14
Years of Service
User Offline
Joined: 13th May 2010
Location: Italy
Posted: 1st Jan 2015 19:49
Thanks for the quick reply, but what is it to use the command ClearScreen () if I have to manually delete each sprite that I do not need?

If you look at the screen image I attached, I will continue displaying the sprite number 97 on the top left.

Attachments

Login to view attachments
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 2nd Jan 2015 02:17
Unless you set visibility on a sprite to zero (off) or it is positioned outside of the current view, it will display during each sync cycle.

ClearScreen() is one of the steps that occurs during the sync cycle.

If you are using sync() in your main loop (as your code shows), the calls to ClearScreen() and Render() don't really have any affect. the first call to syn() does both. The Render() command will display any sprites in the current view that aren't set to visibility zero.

Cheers,
Ancient Lady

Login to post a reply

Server time is: 2024-05-19 14:54:57
Your offset time is: 2024-05-19 14:54:57