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 / Quality of life functions

Author
Message
PartTimeCoder
AGK Tool Maker
9
Years of Service
User Offline
Joined: 9th Mar 2015
Location: London UK
Posted: 31st Jul 2021 11:59
I made my first commit to the core, just added a few (every project should have) quality of life functions

If this gets accepted and merged I will add a bunch more

https://github.com/TheGameCreators/AGKTier2/pull/18

What quality of life functions, or function sets would you like to see added to the core?

No stupid functions, lets keep this inline with the current function set, if we work together we can give both Tier 1&2 some handy updates.
Open Source plugins
Cl - DnD Plugin
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 1st Aug 2021 18:08
Can you describe what these do?

MoveSpriteLocalX ( iSpriteIndex, fAmount );
MoveSpriteLocalY( iSpriteIndex, fAmount );
TurnSpriteToPosition( iSpriteIndex, fX, fY, fAmount );
FixSpriteToSprite( iSpriteIndex, iParentID );
Tiled TMX Importer V.2
XML Parser V.2
Base64 Encoder/Decoder
Purple Token - Free online hi-score database
Legend of Zelda

"I like offending people, because I think people who get offended should be offended." - Linus Torvalds
Virtual Nomad
Moderator
18
Years of Service
User Offline
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 1st Aug 2021 18:58 Edited at: 1st Aug 2021 19:12
Quote: "Can you describe what these do?"

the demo is visually tough to follow but i expect:
MoveSpriteLocalX = Strafe (relative to Sprite Angle)
MoveSpriteLocalY = Move Forward/Backward (" ")
TurnSpriteToPosition = PointSprite
FixSpriteToSprite = Maintain a sprite's relative position/angle to its "parent"

many of us have made similar with variations as i'm sure you have. ie, i sometimes do MoveSprite(Spr,fx, fy) as a single command or combine MoveSprite with PointSprite to MoveSprite "In/Out" (toward or away from a point) with Rotate/Circle around the point vs Strafe.

we may as well add things like FixSpriteToObject while we're at it

not to diminish this as i think MoveSprite and PointSprite, for example(s), should have been included out of the box but i'd personally like to see work done on fixing issues, adding new functionality or expanding existing commands vs combining existing functions.
[My Itch.io Home] [Community Apps on Itch.io]
[AGK Resource Directory] [TGC @ GitHub]
[CODE lang=agk] YOUR CODE HERE [/CODE]
[VIDEO=youtube] VIDEO ID [/VIDEO]
[AGK Showcase][Google Forum Search]
Pfaber1
6
Years of Service
User Offline
Joined: 7th Jan 2018
Location: England
Posted: 1st Aug 2021 21:25 Edited at: 1st Aug 2021 21:39
I think we should be able to have our cake and eat it, fix what needs fixing plus make an awesome GUI , although Nuklear is good it is not supported in Vulkan. ( I think). They could even charge a bit for the GUI and have it as an extra (plugin) or something . I feel it would take AppGameKit to a new level and make it an excellent business and game package . This would attract more programmers to AppGameKit .
PartTimeCoder
AGK Tool Maker
9
Years of Service
User Offline
Joined: 9th Mar 2015
Location: London UK
Posted: 1st Aug 2021 22:38
Quote: "Can you describe what these do?"


Really!?

MoveSpriteLocalX - Moves a sprite in its local x direction taking into account its current angle
MoveSpriteLocalY - Moves a sprite in its local y direction taking into account its current angle
TurnSpriteToPosition - Turns a sprite to face the x,y, position by the given factor
FixSpriteToSprite - Fixes a sprite to another sprite to inherit its location and angle (like FixObjectToObject ETC)

Quote: "i'd personally like to see work done on fixing issues, adding new functionality or expanding existing commands vs combining existing functions."


The whole GitHub thing takes a little bit of setting up this first one was more of a test on how the system works while adding IMO some very handy functions that new users would appreciate, I have some ideas but I wont waist my time if TGC wont implement them, also things like FixSpriteToSprite, yes it can be done in basic but its very easy dealt with on the backend, no need for updates functions and wrappers

This


V's This


FixSpriteToObject ... of coures, 2d healthbars, infoboxes and such attached to a 3d object ...


There are lots of things I have wanted in Basic for a long time like XML support, path finding and a big long list of others, yes I know it can and has been done in basic, my POV is, this is a game making language, so lets make it the best dam game making language out there, not with complex 3d math and physics functions (although they are very handy) but functions that allow new users to move a sprite along an axis with a single function call, save some data to XML without having to first write a parser, path finding out the box .... you know .... like every other game making system out there bar the odd one!

Open Source plugins
Cl - DnD Plugin
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 2nd Aug 2021 03:15 Edited at: 2nd Aug 2021 03:17
Quote: "TurnSpriteToPosition - Turns a sprite to face the x,y, position by the given factor"


So basically its like point sprite but with a step value? Will a negative value make it rotate opposite direction or does it just take the shortest way?
Tiled TMX Importer V.2
XML Parser V.2
Base64 Encoder/Decoder
Purple Token - Free online hi-score database
Legend of Zelda

"I like offending people, because I think people who get offended should be offended." - Linus Torvalds
PartTimeCoder
AGK Tool Maker
9
Years of Service
User Offline
Joined: 9th Mar 2015
Location: London UK
Posted: 2nd Aug 2021 05:10
Quote: "So basically its like point sprite but with a step value?"


Yes, kind of like a Lerp

Quote: "Will a negative value make it rotate opposite direction or does it just take the shortest way?"


Yes shortest way round and No, for that we need the RotateSprite(sprite_id, amount) but I figured SetSpriteAngle(sprite_id, GetSpriteAngle(sprite_id)+amount) is not to painful to type out anyway so not much point in adding it?

Its to easy to go overboard and add in loads of unneeded functions, 102 flavours of CreateSprite and 19 angle functions are just not needed, I thought those 4 functions would save some headaches for the noobs and my make my own life a little easier.

Make the sprite follow the mouse:


And the full C++ test code for the 4 functions, it creates 2 parent sprites and attaches a bunch of child sprites to each parent with FixSpriteToSprite, one will follow the mouse on the x axis on left button, the other will follow the mouse on the y axis on the right button, 1 parent is setup to use sprite offset the other is not, this was for testing the internal code.






Open Source plugins
Cl - DnD Plugin

Login to post a reply

Server time is: 2024-04-20 04:39:58
Your offset time is: 2024-04-20 04:39:58