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.

Newcomers AppGameKit Corner / [STICKY] The Useful Community Functions Project

Author
Message
MikeMax
AGK Academic Backer
7
Years of Service
User Offline
Joined: 13th Dec 2011
Location: Paris
Posted: 23rd Feb 2012 15:38 Edited at: 23rd Feb 2012 22:35
The problem is that AppGameKit doesn't start at 1 to create Sprites. (it starts at 10000 for me sometimes)... therefore the GetFreeSprite() function is good to "control" the range of Sprite IDs (particularly if you want to create an array with its index based on the Sprite's IDs).

I think it's a good habit to control Sprite IDs
bitJericho
16
Years of Service
User Offline
Joined: 9th Oct 2002
Location: United States
Posted: 23rd Feb 2012 17:13 Edited at: 23rd Feb 2012 17:19
Quote: "I think it's a good habit to control Sprite IDs"


I think it would just clutter up the code. If you're retrieving sprite IDs automatically, you should never ever call upon those sprites by manually referencing their IDs (they may change in unexpected ways in the future). When you get a sprite automatically you should call on it only by referencing the variable containing the sprite ID.

Further, your function can still end up fragmenting a group of sprites, so it doesn't offer the benefit your describing (except that it lowers the ID value, which isn't really any benefit).

Keeping track of arbitrary addresses (sprite IDs) is in-line with lower level languages that require you maintain the pointer's location, so it's pretty well expected in other languages that the ID is seemingly arbitrary and random, and there's no confusion because you would never call on a sprite's index manually.

So I would say doing such a thing with your sprites just makes everything more convoluted for no real benefit.

MikeMax
AGK Academic Backer
7
Years of Service
User Offline
Joined: 13th Dec 2011
Location: Paris
Posted: 23rd Feb 2012 18:08 Edited at: 23rd Feb 2012 18:10
I don't want to control a specific ID number. I just want to be able to link a Sprite ID with an array .. without looping on array index (+ the check inside the loop) to find the good entry (for sprite custom properties for example) !

Otherwise you will need to do a DIM [10000+MyNumberOfSprite] due to "random" ID allocations which starts at 10000 in my case... but i don't want to DIM with this high value ... i just want what i need

But if you have any other solution to link a sprite ID directly with an Array ... i'm interested (very useful with a large number of sprites)


Just imagine the following code :



Other solution for doing the same thing with automatic allocation ?
baxslash
Valued Member
Bronze Codemaster
12
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 23rd Feb 2012 18:11 Edited at: 23rd Feb 2012 18:12
Quote: "Otherwise you will need to do a DIM [10000+MyNumberOfSprite] due to "random" ID allocations which starts at 10000 in my case... but i don't want to DIM with this high value ... i just want what i need"

No, you could do something like this.


Edited my oops...

MikeMax
AGK Academic Backer
7
Years of Service
User Offline
Joined: 13th Dec 2011
Location: Paris
Posted: 23rd Feb 2012 18:19 Edited at: 23rd Feb 2012 18:32
Yes but doesn't resolve the fact that variable "i" (the index of the array) is different of the Sprite ID So i can't have direct access to another array without looping on your array[] to check the correct Sprite ID and get its index i (and it adds a unuseful reference table no ?).

(it's late .. maybe i'm wrong lol)
MikeMax
AGK Academic Backer
7
Years of Service
User Offline
Joined: 13th Dec 2011
Location: Paris
Posted: 23rd Feb 2012 18:44 Edited at: 23rd Feb 2012 18:47
Maybe a "Tag" property (Integer or String) should be good in the Core. For example a function SetSpriteTag(spriteID,12) (if we know that we have properties of the sprite at index 12 in a known array). With a read function GetSpriteTag(spriteID) (which will return "12" in this case).

The idea is to have an optional external reference attached to the sprite which will prevent loops in a lot of cases.
baxslash
Valued Member
Bronze Codemaster
12
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 23rd Feb 2012 20:47
I'm not sure I understand your problem. Could you provide an example in code of something that could not be created using an automatically generated sprite ID? Then I'll try to give you an example how to do it...

MikeMax
AGK Academic Backer
7
Years of Service
User Offline
Joined: 13th Dec 2011
Location: Paris
Posted: 23rd Feb 2012 21:45 Edited at: 23rd Feb 2012 21:47
I have an array "SpriteParameters[] " of a type "SpriteParametersType" which contains extra sprite's parameters.

i define them as following :





I only want to display the "SpriteDisplayName" of the sprite (configured in the SpriteParameters[]) without any loop when i touch it (look at the question marks in the main loop) :




So the problem is : how to link the sprite to the array without any loop and without specifying Sprites IDs ?

any solution ? it's the headlock of the day =)
baxslash
Valued Member
Bronze Codemaster
12
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 23rd Feb 2012 23:24 Edited at: 23rd Feb 2012 23:28
Here ya go:


Quote: "So the problem is : how to link the sprite to the array without any loop and without specifying Sprites IDs ?"

Answer: This is not possible. If you want to check whether a sprite ID that is clicked on is in your array (or a background array) then you HAVE to loop through every valid entry in the array to check. Even if this was in the background the same check would have to be done.

MikeMax
AGK Academic Backer
7
Years of Service
User Offline
Joined: 13th Dec 2011
Location: Paris
Posted: 23rd Feb 2012 23:48 Edited at: 24th Feb 2012 00:03
It's possible if you define the range. So ... Defining Sprites IDs makes sense making them to be in a known range (and link them to an array as i've shown before). Imagine the code you provide with a lot of sprites ... That's what i wanted to demonstrate

So the "GetFreeSprite" function is useful

"less iterations you have, better it is"
bitJericho
16
Years of Service
User Offline
Joined: 9th Oct 2002
Location: United States
Posted: 24th Feb 2012 00:15
That makes perfect sense... however, your function doesn't actually make sure a set of sprites are in a range

What'd be more beneficial is if we could attach arbitrary data to a sprite (eg, a variable containing an integer that we can use to reference the array id).

The way I would solve your problem is to check each sprite to see if it's touched, but yeah, that's kind of an icky solution too.

So I support your idea if you rewrite it to guarantee a group of sprites is available, not that I have any say in what's included or not, but I offer no objection

baxslash
Valued Member
Bronze Codemaster
12
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 24th Feb 2012 00:42
Don't get me wrong I use a findFreeSprite() function in my own code but I use it to expand a dynamic array and return the next available slot in the array, I just don't see how a hard coded range is any more flexible (or any less definable) than a dynamic system.

Couldn't you just add a "group" setting in your UDT? That way your range of sprites could be anything from 2 sprites to 2000 sprites!

IE:
TYPE SpriteParametersType
SpriteID as integer
Group as integer
SpriteDisplayName as string
SpriteParameter1 as integer
SpriteParameter2 as string
ENDTYPE

MikeMax
AGK Academic Backer
7
Years of Service
User Offline
Joined: 13th Dec 2011
Location: Paris
Posted: 24th Feb 2012 01:15
What i said before (which can be useful) :
Quote: "
Maybe a "Tag" property (Integer or String) should be good in the Core. For example a function SetSpriteTag(spriteID,12) (if we know that we have properties of the sprite at index 12 in a known array). With a read function GetSpriteTag(spriteID) (which will return "12" in this case).

The idea is to have an optional external reference attached to the sprite which will prevent loops in a lot of cases.
"


For myself, i don't really need to group sprites IDs. I only need (and i'm already doing it) to reference Sprites in an array with an acceptable range and with a know ID (because automatic IDs start at 10000) to have a direct access. I can obviously add others variables like this :



it doesn't matter if some array slots/indexes are empty (like a fixed background for example that i won't declare in my array because i know that i will never interact with it). But it's better that assigning 10000 empty indexes and AFTER assigning at the number 10001 And knowing the IDs and reference it with the same ID as the Sprite one permits to have a direct access. That the only thing i say And for my game i MUST use this technique to keep a good framerate on low-end devices that's all

But the question is : why automatic ID's start at 10000 ?
baxslash
Valued Member
Bronze Codemaster
12
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 29th Feb 2012 10:05
Here is my string to float function. I called it floatVal() because valFloat() will be in the next update to AGK. Not sure if someone has already posted a version of this already but I couldn't find it.



When is UCF being updated? I noticed a few of my functions have not been added yet...

Joshua A
7
Years of Service
User Offline
Joined: 19th Feb 2012
Location:
Posted: 29th Feb 2012 19:57
Short and sweet.
Incredibly helpful in many situations.

just use
wait ( <time> ) // where as time is how long you want to wait

this command allows you to easily manage how much time is between the calling of two events, commands , actions, and etc.


function wait ( length as float )
//length tells the function how long to wait
length = (length) * 60
//TimeO is how long the aplication has been running
TimeO = Timer()
//TimeG sets how long you want the function to wait for
TimeG = (TimeO + length)
//As long as TimeO is less than TimeG continue waiting
for i = TimeO to TimeG step 1
sync()
next i
//exit the functing
exitfunction
endfunction
baxslash
Valued Member
Bronze Codemaster
12
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 29th Feb 2012 21:46
The "sleep()" command does this already. Also if you use the "Sync()" command on its own then the physics simulation (and animated sprites) will continue to be updated.

Joshua A
7
Years of Service
User Offline
Joined: 19th Feb 2012
Location:
Posted: 29th Feb 2012 22:21
This function makes it more of a one step process when adding sprites to your game/application

Quote: "
Function BetterSprite ( id , imageFile$ x , y , sx , sy , visable , rotation )
// Creats a Sprite with id of <id>, a image of <imageFile$>
// x pos of <x>, y pos of <y>, x-axis size of <sx>, y-axis size of <sy>
// Sets visability <1 or 0>
LoadImage ( id , imageFile$ )
CreateSprite ( id , id )
SetSpritePosition ( id , x , y)
SetSpriteSize ( id , sx , sy )
SetSpriteVisible ( id , visable )
SetSpriteVisible ( id , visable )
SetSpriteAngle ( id , rotation )

endfunction

Function DeleteBetterSprite ( id )
//deleates Spride and Image
DeleteImage ( id )
DeleteSprite ( id )
endfunction
"
JimHawkins
9
Years of Service
User Offline
Joined: 26th Jul 2009
Location: Hull - UK
Posted: 1st Mar 2012 00:34
Might be an idea to check the result of LoadImage()?

Small point - it's visible not visable

-- Jim
baxslash
Valued Member
Bronze Codemaster
12
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 1st Mar 2012 00:40
What if you need lots of sprites that need the same image? Then you would be loading the same image into memory lots of times. Not ideal.

Sorry to be the nay-sayer all the time...

Also you use the setSpriteVisible() command twice?

Joshua A
7
Years of Service
User Offline
Joined: 19th Feb 2012
Location:
Posted: 1st Mar 2012 01:06
I got to stop putting all my trust in spell check, lol
Hodgey
9
Years of Service
User Offline
Joined: 10th Oct 2009
Location: Australia
Posted: 1st Mar 2012 07:43
@ Joshua: You also forgot a comma inbetween the imagefile$ and x parameters. Easily fixed though.

Marl
7
Years of Service
User Offline
Joined: 19th Nov 2011
Location: Bradford, UK
Posted: 1st Mar 2012 17:34 Edited at: 1st Mar 2012 17:40
Speaking of loading images...

I imaging most people do this already, but just in case...

Safe image loading.

Avoids the run-time error if an image file is missing by checking first if the file is there.



Very simple, but one of my most re-used functions. The return can be used to create a blank sprite as a fall back.



Obviously the same can be applied to other file types.

Attachments

Login to view attachments
bjadams
AGK Backer
11
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 1st Mar 2012 22:23
Marl that msg pops only in T1.
Never noticed it in T2. I just get the Missing.png red cross if i mistype a filename
Marl
7
Years of Service
User Offline
Joined: 19th Nov 2011
Location: Bradford, UK
Posted: 2nd Mar 2012 01:01
Wierd!

I never though about it until you mentioned it, but it does seem odd having and image called missing.png, when a missing file throws an error and ends the app.
Daniel TGC
Retired Moderator
12
Years of Service
User Offline
Joined: 19th Feb 2007
Location: TGC
Posted: 2nd Mar 2012 19:19
I apologise for not updating this project's official and unofficial releases sooner, once I heard about the Blackberry Playbook offer I've been working on my own submission. I just sent that in today, so there's nothing else for me to do but wait. I've started compiling the fresh functions submitted, and will release an undocumented collection sometime tomorrow or sunday. After that I'll start documenting the new commands and evaluating some of the updates people have sent in for the old commands.
Duffer
16
Years of Service
User Offline
Joined: 9th Feb 2003
Location: chair
Posted: 3rd Mar 2012 14:28
@ MikeMax,

You've gone and changed my view of #contants - is what you say also true of DBPro?

Could you also show some example AppGameKit code utilising your colour constants?

a long time dabbler with DBC and DBPro with no actual talent but lots of enthusiasm...
Duffer
16
Years of Service
User Offline
Joined: 9th Feb 2003
Location: chair
Posted: 3rd Mar 2012 14:31
@ Daniel & Baxslash -

Please tell me you're storing all these useful functions somewhere - is there someplace in Codebase? Or some place on the site specific to AppGameKit?

a long time dabbler with DBC and DBPro with no actual talent but lots of enthusiasm...
baxslash
Valued Member
Bronze Codemaster
12
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 3rd Mar 2012 14:45
They're in the first post which is updated with the latest set of functions in various formats.

Duffer
16
Years of Service
User Offline
Joined: 9th Feb 2003
Location: chair
Posted: 3rd Mar 2012 15:26
@ Daniel,

Not sure if they disqualify for some reason? but could you put the colour contants and the other commands re sprites - particularly the ones which point sprites towards something - and the randomise and font init, reg commands in the download?

a long time dabbler with DBC and DBPro with no actual talent but lots of enthusiasm...
Daniel TGC
Retired Moderator
12
Years of Service
User Offline
Joined: 19th Feb 2007
Location: TGC
Posted: 3rd Mar 2012 17:38
I'm working on it now.
Duffer
16
Years of Service
User Offline
Joined: 9th Feb 2003
Location: chair
Posted: 3rd Mar 2012 17:54
@ Daniel,

Great stuff. All so v useful.

a long time dabbler with DBC and DBPro with no actual talent but lots of enthusiasm...
Daniel TGC
Retired Moderator
12
Years of Service
User Offline
Joined: 19th Feb 2007
Location: TGC
Posted: 3rd Mar 2012 18:55 Edited at: 3rd Mar 2012 18:59
This is the undocumented release, version 0.0.1.1 this has been updated with all the latest functions added.

The total function count is now 96

Notes

CenterText disabled - Array 'T_Red' used without being declared at line 963 inside UCF.agc

Multiple ufp functions removed due to various errors, and several were renamed. I'm not sure these were ever test compiled by the author before submission.

Constant Red renamed to _Red in colours due to clash with rainbow text function, this has been repeated for Blue and Green as they are common names.

I'm not debugging this time around just ensuring they compile. I'll start debugging next cycle. However this version does compile without error messages

DOWNLOAD
Hodgey
9
Years of Service
User Offline
Joined: 10th Oct 2009
Location: Australia
Posted: 3rd Mar 2012 23:26
Quote: "CenterText disabled - Array 'T_Red' used without being declared at line 963 inside UCF.agc"

Daniel, I believe this function (as well as my Text(x, y, string$) function) need the Ink(red, green, blue, alpha) function to be compiled in order for those to work. If the need for the Ink() command isn't appropriate I can adjust them or create an InitText() function. Just let me know.

Duffer
16
Years of Service
User Offline
Joined: 9th Feb 2003
Location: chair
Posted: 4th Mar 2012 18:50 Edited at: 4th Mar 2012 18:50
On basis, no rems or comments, and don't want to enter competition (but may be of use), on basis it's 4000+ lines of code (so open with caution) and on basis coding is a bit rubbish and some serious repetition on commands, but on basis some of it may be of some use to someone (!):- (sorry, code snippet too long so attach as a txt file)

a long time dabbler with DBC and DBPro with no actual talent but lots of enthusiasm...

Attachments

Login to view attachments
Daniel TGC
Retired Moderator
12
Years of Service
User Offline
Joined: 19th Feb 2007
Location: TGC
Posted: 4th Mar 2012 20:19 Edited at: 4th Mar 2012 20:23
@Hodgey

It's not really practical to force anyone to add the INK() command at the beginning of all their programs just so the UCF.agc file will compile correctly, epically as they may not want to use the text commands at all. If specific identifiers and arrays are needed, then they can be added to the UCFDependencies subroutine I've added into the latest build. Creating dim's and globals inside functions is a practice I feel I need to stop otherwise it's going to cause problems further down the line. In addition to this, having all identifiers, arrays and types easily identified within a specific subroutine means that anyone using the UCF library can quickly check to see if their own type/ identifier or string will clash with a pre-existing UCF one. I'm also considering implementing a UCF Prefix before any type, identifier or array to avoid any pre-formed variables clashing with the developers own program.

@everyone

Release 0.0.1.2

Function count: 280

Notes:

Duffers functions were added, these have yet to be reviewed. I spotted a few duplications of existing commands (in terms of function not specific code). Due to the number of these functions, lack of comments, description or documentation examples, these will remain in the Undocumented version of the project for the time being, I will add Duffys commands to the documented version as time allows. Without proper descriptions, or examples for each of these I'll basically need to write them myself. This will not slow down the addition of functions that other users have submitted in the correct fashion as these will be prioritised ahead because they will be quicker to write up.

Dependencies have been moved from the main program to a subroutine called UCFDependencies which resides at the beginning of the UCF.agc file. This will declutter users main.agc files. In addition to this in the next cycle I will attempt to rename all these types/ identifiers and arrays so that each has the _ucf prefix before them, I may also do this for local variables as many functions use common names that may clash with the users own names. For local identifiers I may use the prefix _ul instead of _ucf to further ensure identifiers don't clash can cause awkward results.

Attachments

Login to view attachments
Hodgey
9
Years of Service
User Offline
Joined: 10th Oct 2009
Location: Australia
Posted: 4th Mar 2012 21:29
Quote: "It's not really practical to force anyone to add the INK() command at the beginning of all their programs just so the UCF.agc file will compile correctly, epically as they may not want to use the text commands at all. If specific identifiers and arrays are needed, then they can be added to the UCFDependencies subroutine I've added into the latest build. "

That's fine Daniel, I'll adjust my functions and add a list of arrays that needs to be declared in the UCFDependencies.

Daniel TGC
Retired Moderator
12
Years of Service
User Offline
Joined: 19th Feb 2007
Location: TGC
Posted: 4th Mar 2012 22:19
Many thanks.
Clonkex
Forum Vice President
9
Years of Service
User Offline
Joined: 20th May 2010
Location: Northern Tablelands, NSW, Australia
Posted: 5th Mar 2012 01:20
Quote: "I'm also considering implementing a UCF Prefix before any type, identifier or array to avoid any pre-formed variables clashing with the developers own program."


Yes. Do this. I do it with all my external code files and it works brilliantly for preventing clashes.

Clonkex

P.S. 280 commands!! Cool!

Daniel TGC
Retired Moderator
12
Years of Service
User Offline
Joined: 19th Feb 2007
Location: TGC
Posted: 5th Mar 2012 18:20
Hi guys, quick update to the lottery happening at the end of this month. Rick Vanner has agreed to throw in a $50 TGC voucher, I will top that up with a $20 voucher so the winner of this months lottery will receive a total of $70 this month.
baxslash
Valued Member
Bronze Codemaster
12
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 7th Mar 2012 15:25
Since it's not possible to swap a sprite between physics types (static / dynamic / kinematic) I have this function to do it for me. Pretty simple but useful.


The Zoq2
9
Years of Service
User Offline
Joined: 4th Nov 2009
Location: Linköping, Sweden
Posted: 7th Mar 2012 15:44
I see no point in not posting my functions here

This is the intire functions.agc that I use in my main project

Hodgey
9
Years of Service
User Offline
Joined: 10th Oct 2009
Location: Australia
Posted: 9th Mar 2012 06:24 Edited at: 9th Mar 2012 06:27
Ok, I finally got around to updating my Text Functions Daniel.

Here's a list of the dependencies of my functions:


Here they are contained in an _InitText() function:

The reason I've provided these in a function is because if we all declare our arrays inside the UCFDependencies subroutine then we actually might take up a large chunk of memory as the number of functions increase. This function means that the text arrays won't be created until it is called. I'm basically just providing different cards for you to choose from.

And here are the actual text functions:
Text()


CenterText()


Ink()


TextSize()


Quote: "Rick Vanner has agreed to throw in a $50 TGC voucher, I will top that up with a $20 voucher so the winner of this months lottery will receive a total of $70 this month. "

That's a generous move by TGC and you Daniel.

baxslash
Valued Member
Bronze Codemaster
12
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 9th Mar 2012 10:45
I have some draw commands. Not sure but I don't think anyone has added any of these yet. Currently it uses a temporary sprite drawing system which needs an initialisation and a single function after the sync() command in the loop to delete the temporary sprites but I'm hoping to update these functions once the "drawSprite" command is added in the next update.

Attached is a sample of the commands in use.

I may also add some further functionality to allow drawing to be done at a depth set by the user but for now these work OK:


Attachments

Login to view attachments
Daniel TGC
Retired Moderator
12
Years of Service
User Offline
Joined: 19th Feb 2007
Location: TGC
Posted: 10th Mar 2012 03:10 Edited at: 10th Mar 2012 03:12
GetSwipeRight and GetSwipeLeft allow the users to get left and right swipes gestures from the users finger as is common with touch screen interfaces. I recommend setting the time at 0.1 for a nice snappy response and the distance of 30 pixels at lower resolutions, more if the resolution is higher. This helps eliminate jarring, brushing palms along the edge, etc.

There may be updates to these functions I have yet to test them in T.A.B. so there may be problems I've not thought of yet. But as simple swipe left and swipe right functions they appear to work well.

Requirements


Function GetSwipeRight( time, distance )
Time as Float
Recommended setting is 0.1, this defines the delay between the functions start and end.
distance as Integer
This sets the minimum distance travelled before function outputs 1


Eample program
Daniel TGC
Retired Moderator
12
Years of Service
User Offline
Joined: 19th Feb 2007
Location: TGC
Posted: 10th Mar 2012 03:13
ohh, draw commands. I'll have fun trying those out
Duffer
16
Years of Service
User Offline
Joined: 9th Feb 2003
Location: chair
Posted: 15th Mar 2012 17:38
@ Daniel TGC,

Can you give some example code using your Colours() function (with all those constants)?

a long time dabbler with DBC and DBPro with no actual talent but lots of enthusiasm...
SoftMotion3D
AGK Developer
13
Years of Service
User Offline
Joined: 24th Aug 2005
Location: Calgary,Alberta
Posted: 19th Mar 2012 08:39
has anyone posted a sprite tile engine yet?

i have a realy good one i made that scrolls as smooth as you want to and as big of a map your memory can handle.

shall i post?

MikeMax
AGK Academic Backer
7
Years of Service
User Offline
Joined: 13th Dec 2011
Location: Paris
Posted: 19th Mar 2012 09:06
UCF is for "short" utilities functions. not for an entire engine (i guess) a version of a Tiled engine already exist (check The ShowCase forum)
Nokiaqd
9
Years of Service
User Offline
Joined: 31st Aug 2009
Location:
Posted: 19th Mar 2012 15:08
2MikeMaxwhere the engine has been published for T2.
2SMD_3D Interactive I think it will be easier to publish it in the same forum thread, the engines are not redundant =)

badablog.ru - bada developer
SoftMotion3D
AGK Developer
13
Years of Service
User Offline
Joined: 24th Aug 2005
Location: Calgary,Alberta
Posted: 20th Mar 2012 02:53
well i guess it wouldnt be a utility... but i can tell ya that my code for the sprite engine is short sweet and i think ill use it for all the projects i make that have scrolling tiled graphics.

Its in the form of 3 functions ....less then 20 lines of code all together i think....i will say that this is the best code i've put together in a while that works fast and looks good (smooth).

The only problem is that if i did post it id need to post an example atlas texture to showit in action so you could see how powerfull the small functions take care of tile operations.


Ok but ill skip i guess...if it doesnt count as a ucf

Login to post a reply

Server time is: 2019-06-19 23:11:46
Your offset time is: 2019-06-19 23:11:46