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 Chat / [STICKY] v2 Feature Requests

Author
Message
Bengismo
1
Years of Service
User Offline
Joined: 20th Nov 2017
Location: Yorkshire, England
Posted: 22nd May 2018 09:07
gerdich wrote: "
Memblocks will be calculated on CPU, I guess. Little devices don't offer enough performance."

You obviously havent tried it....as you can easily get over 60fps on a mobile device even by editing memblocks. It make little difference to speed as a sprite will always be 2 triangles and 4 vertices in either case.

gerdich wrote: "
The shader doesn't seem the best place to me. My requested feature is more about the vertices.
"

?? You can replace the sprite vertex shader. (The one that effects your vertices) The stock one is listed in the documentation so you can change it to make your 4 vertices be ANYWHERE you want.

But...ok....lets see if the generalised sprite creator gets made instead.
Kevin Cross
15
Years of Service
User Offline
Joined: 15th Nov 2003
Location: London, UK
Posted: 23rd May 2018 09:17
The ability to insert new elements to a type based array so that you don't need to define the array size when it's created I.e.



Otherwise when you use a fixed size array you need another variable keeping count of how many non blank elements are in the array. myArray.length will always return the maximum allowed space, even if you've only added data to 2 slots
Bengismo
1
Years of Service
User Offline
Joined: 20th Nov 2017
Location: Yorkshire, England
Posted: 23rd May 2018 10:36 Edited at: 23rd May 2018 10:38
Kevin Cross wrote: "The ability to insert new elements to a type based array so that you don't need to define the array size when it's created"


You can already do this.!...

The insert command needs an argument though...so you need to pass it a "myType" to add to the array

This works fine.... all empty arrays have a length of -1 and then with one item it becomes 0
Kevin Cross
15
Years of Service
User Offline
Joined: 15th Nov 2003
Location: London, UK
Posted: 23rd May 2018 10:52
@Bengismo, that's excellent news! There's been a few times where I wish I could just use insert. Thanks. I'll try it out.

TGC, can you update the array help file page to show this please?
MadTinkerer
8
Years of Service
User Offline
Joined: 21st Nov 2010
Location:
Posted: 23rd May 2018 18:49
2D tilemaps or at least PasteSprite / PasteImage so we could implement it ourselves. Both would be super useful.

Now I know why nobody uses AppGameKit to make roguelikes.
Bengismo
1
Years of Service
User Offline
Joined: 20th Nov 2017
Location: Yorkshire, England
Posted: 23rd May 2018 19:34 Edited at: 23rd May 2018 19:43
Quote: "2D tilemaps or at least PasteSprite / PasteImage so we could implement it ourselves. Both would be super useful.

Now I know why nobody uses AppGameKit to make roguelikes."


RTFM
DrawSprite()
https://www.appgamekit.com/documentation/Reference/Sprite/DrawSprite.htm

And there are a few tilemap libraries for AppGameKit making it easy to do this already....
https://forum.thegamecreators.com/thread/219035
https://forum.thegamecreators.com/thread/209341
https://forum.thegamecreators.com/thread/201373
http://www.zimnox.com/resources/agk/libraries/
xCept
16
Years of Service
User Offline
Joined: 15th Dec 2002
Location:
Posted: 23rd May 2018 22:31
Quote: "Now I know why nobody uses AppGameKit to make roguelikes."


The member IBOL has made a number of roguelike games with AppGameKit and has even published on Steam.

https://forum.thegamecreators.com/thread/218281
MadTinkerer
8
Years of Service
User Offline
Joined: 21st Nov 2010
Location:
Posted: 24th May 2018 23:59
Re Bengismo:

RTFM eh? How about THIS:


There's a bunch of drawbacks to doing it that way, most of which I'm willing to put up with, but it would be nice to have what's considered basic functionality in GameMaker Studio. And Dark Basic. And QBASIC. And RPG Maker 2000.

Anyway, thanks for the links.

Re xCept: Well if IBOL had bothered to mention the word "roguelike" in his post, I would have found it when I searched. The examples I did find seemed to all be text-based, so I assumed no one had tried to do a tile based roguelike in AGK.
adambiser
AGK Developer
3
Years of Service
User Offline
Joined: 16th Sep 2015
Location: US
Posted: 25th May 2018 00:55 Edited at: 25th May 2018 01:42
@MadTinkerer: 2D tilemaps... why not use an image atlas and a grid of sprites across your map area... set each sprite to the atlas subimage id. Better than doing a bunch of DrawSprites I would think. Does that do what you mean?

EDIT:
What I did for Boot Hill Blaster and Toxic Terror was to create the sprite grid and set all sprites in the grid to the same tile atlas image (don't worry about subimages.txt). Call SetSpriteAnimation to set up animation frames for the sprite and use SetSpriteFrame to set each sprite to its tile code (1-based). SetSpriteFrame can accept a single frame of the animation When the tile code is 0, set SetSpriteVisible = false. Use SetViewOffset for scrolling the map sprites around the screen as the player moves.
MadTinkerer
8
Years of Service
User Offline
Joined: 21st Nov 2010
Location:
Posted: 25th May 2018 04:10
@adambiser: That is a pretty neat idea. I might try that eventually.

For now, though, I'm really trying to follow along with the Python Roguelike tutorial because there's no AppGameKit RL tutorial. So I'm just going to manually draw everything, because that's how it's being done in that tutorial.
adambiser
AGK Developer
3
Years of Service
User Offline
Joined: 16th Sep 2015
Location: US
Posted: 25th May 2018 06:25
@MadTinkerer: I think you'll find it slower to manually draw stuff rather than setting up a lot of sprites to do the job for you.

Side note: PlaySprite is also an alternative to using SetSpriteFrame, especially if you want some tile codes to actually animate.
Bengismo
1
Years of Service
User Offline
Joined: 20th Nov 2017
Location: Yorkshire, England
Posted: 25th May 2018 10:36 Edited at: 25th May 2018 10:38
Using DrawSprite works ok and it is not really slow or anything (similar speed to drawing a sprite) but it doesnt fit well in the rendering pipeline as it writes directly to the backbuffer so using 3d or sprites in your game with the manually drawn (DrawSprite()) map becomes awkward. I suggested it only as the command PasteImage or PasteSprite was being asked for....when its already there...

Id say Adam is completely right .... The easiest way of doing a tilemap is simply to create an array of sprites (tiles) and use a single atlas image for them. Its quick to set up and you can still move the view with SetViewOffset etc... Each tile can be animated if wanted or deleted or its colour controlled...Its really all that is needed. The libraries made by others do this really well and using TILED (the program) is great to lay out your map then load it into AppGameKit for your game.

I actually used a 3d mesh object (an array of triangle/quads) to do tilemapping so that isometric tiling was really easy and 3d animated characters can be used on top of it. The result looked 2d but was using 3d. Its a little harder to set up but its also very quick to render as its one draw call of one object. Lighting then works really well so you can carry torches in your map etc...Plus the tilemap can be top down or isometric, 2.5D ....whatever you want and it works. Walls correctly work, you can go behind infront of houses etc...

The point is... AppGameKit can do it.
IronManhood
4
Years of Service
User Offline
Joined: 6th Feb 2015
Location: US
Posted: 25th May 2018 23:53
I don't know if there is a way to get this but it would be great if there was GetPhysicsGravityX() and GetPhysicsGravityY().
Cybermind
16
Years of Service
User Offline
Joined: 28th Nov 2002
Location: Searching for The Dark Tower, I hope it is in Denmark, near
Posted: 29th May 2018 14:33
The new Atari VCS is running a version of Ubuntu with Linux kernel 4.10, has 4GB ram and what appears to be an x86 CPU and a Radeon R7 GPU. It will use a classic joystick and a modern gamepad. I would like to release my games for the Atari VCS when it comes out. I think the biggest obstacles are getting AppGameKit to support the controller and joystick, and installing the needed packages on the Atari VCS to get an AppGameKit app to run on Linux. I might be wrong.
13/0
nonom
1
Years of Service
User Offline
Joined: 12th Nov 2017
Playing: AGK2
Posted: 1st Jun 2018 14:47 Edited at: 1st Jun 2018 14:50
Is there something like this into the AppGameKit Core?

SetTextBoxSize(textId as integer, width as float, height as float, scroll as integer)

Found from @baxslash https://forum.thegamecreators.com/thread/198943
http://www.nyan.cat/pirate
Bengismo
1
Years of Service
User Offline
Joined: 20th Nov 2017
Location: Yorkshire, England
Posted: 1st Jun 2018 15:13 Edited at: 1st Jun 2018 15:13
Check out the Editbox commands:
https://www.appgamekit.com/documentation/Reference/Input.htm

Specifically these two commands
SetEditBoxSize()
SetEditBoxWrapMode()

They do what your after ....i think
nonom
1
Years of Service
User Offline
Joined: 12th Nov 2017
Playing: AGK2
Posted: 2nd Jun 2018 11:07 Edited at: 2nd Jun 2018 11:11
Thanks Bengismo!

I would suggest a command to fit a text created with CreateText() to a box. Much like the Input control does.

At the moment the @baxslash CreateTextBox() function is what I was looking for https://forum.thegamecreators.com/thread/198943
http://www.nyan.cat/pirate
Dolmari
1
Years of Service
User Offline
Joined: 19th Sep 2017
Location:
Posted: 6th Jun 2018 14:00

Recently I came to the conclusion that a wider use of the compound color values in standard API functions would be very convenient. Currently, RGB encoded into single integer are used only in drawing functions: DrawBox, DrawEllipse, DrawLine. Palettes of such colors can be easily defined as simple constants set in ABGR format, for example:



As for now, SetColor functions of elements such as Sprite, Text, Object, etc. accept only parameters passed as a list of separate components R, G, B, A, so compounds colors can not be used directly.

We need to use:

SetTextColor( text, GetColorRed(color_MediumVioletRed), GetColorGreen(color_MediumVioletRed), GetColorBlue(color_MediumVioletRed), alpha )

instead just:

SetTextColor( text, color_MediumVioletRed, alpha )

I think it would be very handy to add overloaded variants of the functions (in addition to the existing ones) that accepts directly compound color value, like those:



In addition, it would be practical if we could use the oldest bits of compound color for the alpha value (the alpha component could simply be ignored by functions that only use RGB, or those in which the alpha is specified separately), i.e. we need the functions:



All the above proposed changes are not really important or nescessary (they can be easily written in Basic), but if they were added to API, it would improve the slightly "quality of life" parameter

adambiser
AGK Developer
3
Years of Service
User Offline
Joined: 16th Sep 2015
Location: US
Posted: 6th Jun 2018 14:31
@Dolmari: I don't see your post on here yet (maybe it has to be approved, I don't know), but I received an email notification about it and wanted to reply while I had it on my mind.

#constant can behave a bit like a C++ #define, so the following is currently possible:

Not disagreeing with your suggestion, but wanted to point that out.
Dolmari
1
Years of Service
User Offline
Joined: 19th Sep 2017
Location:
Posted: 6th Jun 2018 14:47
@adambiser:
Thank you, I didn't know that. This really simplifies the writing of a code related to colors, at least in the case of constants. However, my proposal would simplify the use of such compound colors also for variables.
Green7
13
Years of Service
User Offline
Joined: 23rd Nov 2005
Location: Switzerland
Posted: 26th Jun 2018 10:58 Edited at: 26th Jun 2018 10:59
Load 3D animations, add them to preload models and play them by name . Clearly, the anim and the bones of the preloaded model must fit in numbers and names. This would allow us to add new animations faster and individually, instead of merging them by a 3d software. As it is at the moment, it is a rigid system, and it does not support stock anims / models for non modellers if those are not merged in one file. It does not support for example mixamo, where you can get only simgle anims, not stacked ones.
Jack
14
Years of Service
User Offline
Joined: 4th Oct 2004
Location: [Germany]
Posted: 2nd Jul 2018 22:17
- Being able to merge two 3d object animations and modify bone offset while in animation

[/url]
JohnStabler
AGK Bronze Backer
5
Years of Service
Recently Online
Joined: 16th Aug 2013
Location: Cardiff, Wales, UK
Posted: 4th Jul 2018 11:03
PLEASE PLEASE PLEASE can we have the ability to overload our functions? Some AppGameKit functions have overloads, and it would be great if user functions could do the same.
psychoanima
User Offline
Joined: 19th Jun 2018
Location:
Posted: 9th Jul 2018 14:01
I am really surprised that (touch) swipe controls is not integrated in AGK. I found some codes trying to solve this but still they are very limited since there is no way to calculate the exact angle.


AGK needs something called point_direction(x1, y1, x2, y2) that returns the direction, in degrees, where:

x1 The x coordinate of the first component of the vector (in this case it would be X for start touch)
y1 The y coordinate of the first component of the vector (in this case it would be Y for start touch)
x2 The x coordinate of the second component of the vector (in this case it would be X for end touch)
y2 The y coordinate of the second component of the vector (in this case it would be Y for end touch)


With this information, based on angles, we can determine which direction of swiping is happening on the screen. AppGameKit is meant to make our mobile coding easier, please TheGameCreators - make it happen
Bengismo
1
Years of Service
User Offline
Joined: 20th Nov 2017
Location: Yorkshire, England
Posted: 9th Jul 2018 14:18 Edited at: 9th Jul 2018 14:19
You just work out the difference between the points and use Atan2()

This returns the angle between the two sets of points

Function point_direction(x1, y1, x2, y2)
endfunction Atan2 (y2-y1,x2-x1)


Thats why there no function .....as its ludicrously easy to do
TomToad
1
Years of Service
User Offline
Joined: 6th Jan 2018
Location:
Posted: 9th Jul 2018 14:45 Edited at: 9th Jul 2018 14:51
I would like to see Array.Insert(Value,Index) behave the same as Array.Insert(Value) in cases where Index = Array.Length + 1. Trying to add values sorted into an array and get an error when the value to be added is the largest value. For example
Array as Integer[2] = [5,9,12]

Want to add 7, so
Index = GetPosition(7) //GetPosition calculates the proper insert point to keep array sorted. Index = 1
Array.Insert(7,Index) // now [5,7,9,12]

Want to add 15, but
Index = GetPosition(15) //Index = 4
Array.Insert(15,Index) //error, index out of bounds

I need to do a check for both cases
Index = GetPosition(15)
If Index = Array.Length + 1 //Check if at end of array
Array.Insert(15)
Else
Array.Insert(15,Index)
EndIf

This seems a rather sloppy way of doing it.

I know that there is Array.Sort command, but there are two problems with that. Performance will suffer with large arrays if you need to keep the array sorted after every insert, and arrays of user defined types can't be sorted with the array.Sort() method. It is much better to insert the values in the proper place to begin with.

Another idea would have Array.insert(Value,Index) behave like Array.Length = Index; Array[Index] = Value whenever Index > Array.Length. This would solve the problem above as well as allow something like this:
Array as Integer[2] = [1,2,3]
Array.Insert(10,6) //now equals [1,2,3,0,0,0,10]


Edit: Ok, there is an InsertSorted command that will work. And user defined types can be used as long as the sort key is the first variable in the type. Still would like to see this done.
SFSW
16
Years of Service
User Offline
Joined: 9th Oct 2002
Location:
Posted: 12th Jul 2018 22:46
I'd like to restate what Zigi mentioned 3 months ago in this thread, what I mentioned in the AppGameKit vs DBPro thread months ago (and again years ago in AGK1 days), and what many others have requested over the years. AppGameKit needs some form of -internal- asset protection. 3rd party options do not address all potential issues of lacking an internal protection mechanism (largely because of how resources are separated and executed in AGK).

This is necessary for both for operational integrity (especially for commercial games/apps with code-signed authority) as well as using licensed assets, protecting against assets being stolen, and protecting against asset replacement. It's a basic fundamental option that should be included within AppGameKit directly like Zigi described. That is, we can use the \media folder for development and testing with an option to encrypt and consolidate into a protected data file of some kind when compiling for distribution (ie APK). The byte file and all media files in the \media folder should be included and accessed as needed at runtime and it should be bound to the player in some protected way to inhibit the chance of injection, interception, and replacement.
adambiser
AGK Developer
3
Years of Service
User Offline
Joined: 16th Sep 2015
Location: US
Posted: 16th Jul 2018 02:15 Edited at: 16th Jul 2018 13:43
Not sure whether this has been mentioned before, but the ability to play sounds in stereo (differing left/right volumes) would be a very nice addition. See SetSoundInstanceBalance.

* 3D sound emitters that adjust their playback volume based upon their distance to the camera and the camera rotation would be really great.

Edit: Added SetSoundInstanceBalance link.
Bengismo
1
Years of Service
User Offline
Joined: 20th Nov 2017
Location: Yorkshire, England
Posted: 16th Jul 2018 09:18 Edited at: 16th Jul 2018 09:43
You can play sounds with different right and left volumes....You use SetSoundInstanceBalance( iID, balance ) and so the sound itself can be fully left channel or right channel etc... You can also use SetSoundInstanceVolume()

This allows you to do a very rudamentary 3d sound system in AppGameKit by working out where the sound emitter is relative to the camera and then setting the left right balance accordingly and the volume based on the distance away squared. I wrapped this into a single function where you call PlaySound3D() and it will set left/right and volume appropriately. I'm pretty sure someone also did a 3D sound library which worked by doing this ^^

All this being said:
I too would like to see a geniune 3D sound functionality with HeadRelatedTransferFunction so the sound really does appear like its coming from behind or above you etc... Filtering is necessary (to mimic what our ears do to sound) This adds to the realism.
Cybermind
16
Years of Service
User Offline
Joined: 28th Nov 2002
Location: Searching for The Dark Tower, I hope it is in Denmark, near
Posted: 16th Jul 2018 09:44
I have asked for some of these before, but here it goes in a list (not in any order of priority) ( =

-Atari VCS support, when it comes out (got well funded, runs a version of Ubuntu).
-DS3 and DS4 controllers support with button configuration as close as possible to the current one with Xbox controllers. (Playstation controllers).
-Nat punch through. (I just need to know which port the router assigned to the app connection, I have a 24/7 lobby server running that can convey port numbers between clients).

13/0
Richard_6
2
Years of Service
User Offline
Joined: 3rd Feb 2017
Location:
Posted: 16th Jul 2018 12:44 Edited at: 16th Jul 2018 12:45
Atari VCS support sounds very interesting indeed, Cybermind. Maybe the current Linux exporter will work though.

Quote: "as long as the games are compatible with Linux, developers can use whatever engine they would like."
adambiser
AGK Developer
3
Years of Service
User Offline
Joined: 16th Sep 2015
Location: US
Posted: 16th Jul 2018 13:41
@Bengismo: Thanks for pointing out SetSoundInstanceBalance. I didn't see that. I was looking for a play command that included it.
Zigi
9
Years of Service
User Offline
Joined: 5th Jul 2009
Location:
Posted: 18th Jul 2018 16:48 Edited at: 18th Jul 2018 16:57
Short description in the IDE what each command does and what parameters required

In the past few weeks I've been using VisualStudio and MonoDevelop for the first time really, I had no reason to use them in the past and one thing I'm really liked about them is that as I was typing my code, it did tell me what each class and method does

Also when I was hover the mouse over it does show me the description again and also what parameters I can pass to the method


Suggestions for fixing errors

An other thing I'm really liked about VS and MD is that, in case I have an error, instead of just telling me a generic error message it does tell me clearly and loudly what the problem is

and even offer ways how to fix it

And if you click it, it actually does it for you and fix the code.

Since I am learning a new language (C#) I did find this extremely useful and help me a lot in order to figure out what I just missed without need to browse and read a long and boring documentation. Something like this would be extremely useful and frankly, after using such an advanced IDE for a few weeks, coming back to Tier1 feels a little outdated both the IDE and the language actually.
Something like this would be definitely useful for both beginners and advanced users of AppGameKit Tier1.

Thanks

Attachments

Login to view attachments
Zen Jones
1
Years of Service
User Offline
Joined: 1st Jul 2017
Location:
Posted: 19th Jul 2018 03:29
integer GetObjectType(ID)

I understand that asking for this item is asking the creators of AppGameKit to rewrite some base code. This function could never work correctly with the way AppGameKit seems to currently work. AppGameKit appears to sort by type, and then ID, and therefore has an internal storage count for each object type. This permits a text object, a sprite, a box, a sphere, a mesh, a plane, an anything else to all have the ID of '1', and somehow AppGameKit keeps all these things separate. This is why GetObjectType(ID) will never function correctly. In order to have this function... AppGameKit would have to say first object in is object 0, next object in is object 1, next object in is object 2...

The main thing is, whether it's text, a sprite, a plane, a box, a sphere, a mesh, an anything, For all intents and porpoises, they are all objects. So Object 0 could be a plane, and object 1 could be a text, and object 2 could be a sphere. Implementing this would break previous versions of AppGameKit projects, however, I'm thinking that a big problem with SaveObject(ID, location) not being implemented yet is because every type has it's own ID counter. How do you specify WHICH TYPE ID you want to save? Realistically you can't, unless you rework how AppGameKit deals with objects entirely. Is there any reason why AppGameKit can't store all objects in it's own internal array as ID, TYPE, Parameters? Other than breaking any existing code where objects share the same ID number, I can't see a good reason why it wasn't designed this way already. Lets look at a current function: obj = GetObjectRayCastHitID(i). Let's say I was going to use this to replace a struck object with a puff of smoke, but there's one problem. I've got six different types of objects all with the same ID. That box is only one of them, and they all have the same ID. I write the code, and a text box vanishes in a wisp of smoke whenever I shoot a certain block. This is just one example of why the existing system with duplicate ID's based on type should be an absolute nightmare.

This change in itself would permit a majority of the Create() functions to be replaced. CreateText(), CreateSprite(), CreateObjectTYPE(), These and other create functions could become depreciated and no longer used, to be replaced by a single function called CreateObject(). Everything is an object. The New function would be ID = CreateObject(TYPE, Params), or CreateObject(ID,TYPE,Params) where Params is one or more parameters that must be defined dependent on object TYPE. Ideally the most efficient use of this function would be 'CreateObject(TYPE,Params)' which would permit AppGameKit to automatically assign the next available object ID number. This also means that all Object TYPES become reserved words with numerical values. For example, AD, BOX, CAPSULE, CONE, CYLINDER, SPHERE, SPRITE, TEXT, ETC = 0,1,2,3,4,5,6,7,8,9,ETC. and the function could return -1 if the ID is undefined or non-existent. It would be up to AppGameKit how they want to arrange and define object Types, but there's a lot of 'objects' AppGameKit can make, and by collecting them all under a single create function, where the type declared determines the additional parameters required for the creation of the object it would make the program be much more efficient overall.

I hope my explanation was succinct.
Cybermind
16
Years of Service
User Offline
Joined: 28th Nov 2002
Location: Searching for The Dark Tower, I hope it is in Denmark, near
Posted: 19th Jul 2018 08:46 Edited at: 19th Jul 2018 08:54
Quote on quote
Quote: "Quote: "as long as the games are compatible with Linux, developers can use whatever engine they would like.""

Awesome! Didn't know that ( = Well, it should be way easier then (= Then we just need support for the retro joystick and the gamepad on Atari VCS (=
13/0
Richard_6
2
Years of Service
User Offline
Joined: 3rd Feb 2017
Location:
Posted: 20th Jul 2018 12:41
Agreed, Cybermind. Atari VCS and AppGameKit seem a perfect fit!
Zigi
9
Years of Service
User Offline
Joined: 5th Jul 2009
Location:
Posted: 27th Jul 2018 11:55 Edited at: 27th Jul 2018 12:04
Tiled support
https://www.mapeditor.org/

The Visual Editor does not integrate with AppGameKit too well even though it meant to be used with AppGameKit, and also the developer has been not active on the forum lately. I was really hoping this project moving forward but in case it did hit a wall, either financial or technical would be nice to see Tiled support in AGK. Like officially. I know there are community made libs but official support would be nice. Tiled can work and integrate really well with any engines and support any kind of maps. Also offer object layer to add objects the player can interact with and also add properties for objects that we can set and get in the engine if the engine has the support for it.
In my opinion it is pretty much the best and also very complete 3rd party level editor out there, also actively developed which is very important.

An other benefit, if someone has been using Tiled to design levels in an other engine can easily bring the same levels over to AppGameKit and don't need to start from scratch or, can move from AppGameKit to other engines if that's the case. I know some developers prefer to use engines that works with Tiled for the same reason. If the engine not good enough, can still move all the levels over to any other engines. In my opinion it would actually make people use other engines and frameworks with Tiled to come to AGK.

Thanks.
Jugival
User Offline
Joined: 28th Feb 2018
Location:
Posted: 27th Jul 2018 14:31
Some Tier 1 language suggestions:
1) References of a kind. Accessing types stored in arrays can get quite verbose. Would love to be able to define a new variable as a reference of other variable or type.
2) More flexible declaration / definition of a type which would allow such sentence: value as MyType = GetMyType()
3) Array slicing. Arrays are the only containers in Tier 1 so having more options for their manipulations would be great.
Richard_6
2
Years of Service
User Offline
Joined: 3rd Feb 2017
Location:
Posted: 28th Jul 2018 10:50
Jugival, not sure if I totally understood your item 2, but if that means returning a type from a function, this is currently possible.
psychoanima
User Offline
Joined: 19th Jun 2018
Location:
Posted: 30th Jul 2018 11:53 Edited at: 30th Jul 2018 11:54
Please update Placement editor


https://forum.thegamecreators.com/thread/222693
Jambo B
9
Years of Service
User Offline
Joined: 17th Sep 2009
Location: The Pit
Posted: 30th Jul 2018 14:36
+1 for pointers to variables or items in an array. Items removed from the array would not change the item to which the pointer, er, pointed.

Something like:

VarA as integer
pVarA as ref

VarA = 10
pVarA = ref VarA

pVarA = 15 // Changes VarA directly


James
Phaelax
DBPro Master
15
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 31st Jul 2018 16:38
Quote: "Expand advanced maths to vector4 and matrix3/4. Improve Vector2/3 library.
It's already done in Tier2, you have just to add it to the T1 command set"


I don't think it would be overly complicated to write. I know I did a vector library in the early days of AppGameKit, I could probably add matrices to it

Quote: "Its possible with your 3 solutions. But the best would be a general sprite creator which allows the definition of four separat corners."

Are you talking about being able to move the 4 corners of a sprite, thus reshaping the sprite itself? Cause I would find that useful.

Quote: "You can replace the sprite vertex shader. (The one that effects your vertices) The stock one is listed in the documentation so you can change it to make your 4 vertices be ANYWHERE you want."

Can you elaborate on that? I'm not sure what you mean.

Quote: "2D tilemaps or at least PasteSprite / PasteImage so we could implement it ourselves. Both would be super useful."

Why would you need a paste sprite to do tilemaps? Tilemaps are very plausible right now.

Quote: "Call SetSpriteAnimation to set up animation frames for the sprite and use SetSpriteFrame to set each sprite to its tile code"

That's what I've done as well. I'll have one base sprite and all the tiles are clones.


Quote: "I think it would be very handy to add overloaded variants of the functions (in addition to the existing ones) that accepts directly compound color value, like those:"

I agree. Two other things I'd like in relation to this is the ability to overload my own functions, and also an overloaded function of drawbox where it takes only a single color and not 4!

[/quote]Tiled support[quote=]
Do the current libraries not meet your needs? Mine supports most of the Tiled features, even properties (i think).
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
Bengismo
1
Years of Service
User Offline
Joined: 20th Nov 2017
Location: Yorkshire, England
Posted: 1st Aug 2018 09:51
Phaelax wrote: "I don't think it would be overly complicated to write. I know I did a vector library in the early days of AppGameKit, I could probably add matrices to it"


Theres already an extended maths library that includes vectors, matrices and quaternions. (Jack wrote it and its pretty good)
https://forum.thegamecreators.com/thread/217064#msg2582798

Phaelax wrote: "Tilemaps are very plausible right now."

They certainly are! I dont think people know how easy it is to import from Tiled using your library. Its a great library you wrote!
Its suprisingly easy to load up a tilemap and create a side platformer or a top down tile based game using this.
I wrote my own lib to use the JSON format and make 3D object layers from Tiled as I wanted that functionality too as well as a tiling shader so each Tiled layer is just one sprite.

Phaelax wrote: ""use SetSpriteFrame to set each sprite to its tile code" ->That's what I've done as well. I'll have one base sprite and all the tiles are clones."

Its one way to do it and it works ok, but it doesnt allow for spacing between tiles. I prefer to set the UV values so I can add spacing and borders between tiles which are supported in Tiled.

Phaelax wrote: "Can you elaborate on that? I'm not sure what you mean."

If someone wants a non rectangular sprite then there are a few options to achieve this rather than requiring any new commands
1) Simply use transparency and update the collision shape - a sprite can be any shape you like both visually and with its collision shape
2) Use a shader that controls where the 4 corners are. (you would need to update a collision shape if using that too otherwise that will remain a rectangle)
3) Use multiple sprites to build an elaborate shaped object
4) Use a 3D object - create a memblock with just 2 triangles and place the vertices where you want. Assign a copy of the sprite shader to this object...then call drawobject and you have a sprite where you can control where the 4 vertices are. Theres no collision detection for this option though....So you can create a dummy sprite which has collision to work as its collision detector.
Phaelax
DBPro Master
15
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 1st Aug 2018 13:02
Quote: ". I prefer to set the UV values so I can add spacing and borders between tiles which are supported in Tiled."

I thought the spacing just offset the tiles. If that's how it's doing it, then I may have implemented that feature incorrectly.

Quote: "1) Simply use transparency and update the collision shape"

I don't think this method would work for me. I'd want to move the corners around dynamically, so a shader may be my best bet. Also, collision isn't needed for my task, it's strictly visual effect.

Quote: "4) Use a 3D object - create a memblock with just 2 triangles and place the vertices where you want. Assign a copy of the sprite shader to this object...then call drawobject "

What about the depth of the object? If I made a 200x200 square, I'd have to place it at a specific depth from the camera to make it appear 200px. And that depth changes with the resolution. Plus managing the draw order.
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
Bengismo
1
Years of Service
User Offline
Joined: 20th Nov 2017
Location: Yorkshire, England
Posted: 1st Aug 2018 13:28 Edited at: 1st Aug 2018 13:30
Phaelax wrote: "I thought the spacing just offset the tiles. If that's how it's doing it, then I may have implemented that feature incorrectly."


From the tiled docs
margin = the space to the first tile
spacing = Spacing between adjacent tiles in image (pixels)
If the spacing is always 0 then you wont have a problem.
I also like to move the UV's inwards by 0.5 pixels so that there are no seams

Phaelax wrote: "What about the depth of the object? If I made a 200x200 square, I'd have to place it at a specific depth from the camera to make it appear 200px. And that depth changes with the resolution. Plus managing the draw order."


No you wouldnt because if you copy the sprite shader to it...it internally uses agk_Ortho matrix to convert the coordinates onto the screen so the depth becomes irrelevant as does the resolution. Only 3D objects using standard 3D shaders actually scale with distance from the camera (Ie...perspective). The real issue is that the sprite commands wouldnt work with it. you would Position and rotate the object using the 3d commands. If you let AppGameKit draw it in the 3D render it will simply appear as a sprite at the depth specified by Set3DDepth(). Otherwise, you are right that you would have to manually control the draw order which would NOT be nice or easy.

A shader may be your best bet as you say
blink0k
AGK Developer
5
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 1st Aug 2018 21:07
array.sort(function_name)
where function_name is a function that takes two parameters (array elements) and returns -1 if p1 < p2, 0 if p1 = p2, 1 if p1 > p2
puzzler2018
1
Years of Service
Recently Online
Joined: 8th Oct 2017
Location:
Posted: 5th Aug 2018 20:51
Paul -- Is there a limit on doing function recursions see https://forum.thegamecreators.com/thread/222719 for more info

Thanks
Zigi
9
Years of Service
User Offline
Joined: 5th Jul 2009
Location:
Posted: 7th Aug 2018 14:40 Edited at: 7th Aug 2018 14:47
Dynamic 2D lights and shadow

Probably I'm not the first asking for this but wish if AppGameKit would have something like this out of the box, I would buy it as a separated DLC even:
https://vimeo.com/11982302

I've seen the community did shared some projects but they either doesn't compile or difficult to use, not commented not documented or not optimized and the FPS drop drastically. I did experimenting with lighting engines in other frameworks and the most simple solution was one that allowed me to create a light source, set the type of the light if it a point light, spot light and set properties like color, if it flickering or not, radius, length in case of spot light..etc
Then we can create a shadow cast object, in position of anything that we want to cast shadow and we can set the shape of this too if it circle, rectangle or we want the shape of the actual sprite to be used as a shadow caster (it is more heavy on resources but more detailed). Also set properties of the shadow like color, if it soft shadow, or hard shadow blur sprites on overlap or not..etc.
Also we can set ambiance light color and intensity which effecting the entire screen and all lights so we can easily create dark corners.

Would love to see something like this in AppGameKit one that also optimized for desktop and mobile. As I mentioned I would buy it as a DLC and would want it right now

Thanks.
Zigi
9
Years of Service
User Offline
Joined: 5th Jul 2009
Location:
Posted: 7th Aug 2018 15:02
Speech Synthesis

I have an idea for some games that I would like target kids and disabled people with on tablet and speech synthesis would have a key part, one that sounds natural.
For example I just tried Speech Synthesis in .NET which is using the system voice installed on Windows, and it was horrible, then I tried Speech Synthesis in HTML5 which is using an API built-in to the web browser and it sounded like a real human.
Would be nice if AppGameKit would have something that is independent from the system voice. I did try to find a free C++ API for this, but I had no luck. Did find some paid ones though that TGC could license, again I'm more than happy to buy it as a DLC if it cross platform and works on desktop and mobile. Especially on mobile.

Thanks.
Bengismo
1
Years of Service
User Offline
Joined: 20th Nov 2017
Location: Yorkshire, England
Posted: 8th Aug 2018 10:23
Can we have...

GetEditBoxDepth()

Login to post a reply

Server time is: 2019-02-17 17:09:59
Your offset time is: 2019-02-17 17:09:59