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 / AgkSharp for Windows - General Questions And Feedback

Author
Message
MadBit
VIP Member
Gold Codemaster
14
Years of Service
User Offline
Joined: 25th Jun 2009
Location: Germany
Posted: 15th Feb 2021 13:15 Edited at: 15th Feb 2021 13:17
No, unfortunately not.
Just have some things to do (AgkSharp, FileExplorer and Nuklear Plugin).
Now I am at my work so can not test it.
When I get home, I will run a program overnight to see what happens.

Does it occur only in debug or also in release?
How is the program started from VS or directly via the exe?
Share your knowledge. It\'s a way to achieve immortality. (Tenzin Gyatso)
Chmava
10
Years of Service
User Offline
Joined: 20th Jun 2013
Location:
Posted: 15th Feb 2021 17:39 Edited at: 15th Feb 2021 18:02
in mode debug64 and release64.

If the app is left on for a while, the process did not fully terminate?
After a few seconds of hitting 'f5' to build and run the app, if you hit the 'x', it will terminate perfectly...
...But there is no way a game app or any app is meant to only run for a few seconds at a time.
Something is still running in the background, if task manager is not reporting the app...
It might be a sub thread somewhere...
There should be over 50?
Not necessary user created as there is none...

I will try a thread terminate loop before it truly hit application.exit...

UPDATE: even after you press 'x' and then press 'f5', it may still work, open and close a few of them, then wait a few minutes and all of a sudden, it will complain about how the app is lock by itself...

Does it need some time after closing to end up locking itself?

UPDATE 2: actually,it might be my fault... it could be SpeechSynthesizer.dispose() not being called on termination... let me test it for a day or two nd get back to this forum...
Ortu
DBPro Master
16
Years of Service
User Offline
Joined: 21st Nov 2007
Location: Austin, TX
Posted: 17th Feb 2021 01:27
To be fair, i removed/ replaced much of the default core.cs - i don't bother passing hardware input through to agk, i handle all of that in the c# layer
http://games.joshkirklin.com/sulium

A single player RPG featuring a branching, player driven storyline of meaningful choices and multiple endings alongside challenging active combat and intelligent AI.
MadBit
VIP Member
Gold Codemaster
14
Years of Service
User Offline
Joined: 25th Jun 2009
Location: Germany
Posted: 17th Feb 2021 10:56
Ok I have tested it so far could not find any such problems.
Neither in the task manager nor when overwriting the executable file, I could notice abnormalities.
Share your knowledge. It\'s a way to achieve immortality. (Tenzin Gyatso)
Chmava
10
Years of Service
User Offline
Joined: 20th Jun 2013
Location:
Posted: 17th Feb 2021 15:15 Edited at: 17th Feb 2021 15:42
I think it is indeed microsoft SpeechSynthesizer that is not cleaning up properly...

After adding:

SpeechSynthesizer.dispose();

to the end of the code, before Core.Cleanup();, it seem to end properly now...

using the following 2 line of code:

Environment.Exit(1);
System.Windows.Forms.Application.Exit();

does nothing to end it...
...or at least once in a blue moon it does not?
Any thread opened with the program should have been forcefully terminated on calling those 2 line...
But it did not... sometime?

Might be a .net or microsoft problem...

Anyway, Thank You and Sorry!

Also, Is those annoying Agk.writeSomething appending NULL at the end of every string and line, part of the dll?
It is mention in the document, so I end up creating my own namespace for read/write/exists and such...
MadBit
VIP Member
Gold Codemaster
14
Years of Service
User Offline
Joined: 25th Jun 2009
Location: Germany
Posted: 18th Feb 2021 17:37
Chmava wrote: "Also, Is those annoying Agk.writeSomething appending NULL at the end of every string and line, part of the dll?
It is mention in the document, so I end up creating my own namespace for read/write/exists and such...
"

The behaviour of the Agk.Write... functions is the same as in Agk-Basic.

However, I recommend using the IO methods of C#. You have to get used to them, but they are more flexible.
Share your knowledge. It\'s a way to achieve immortality. (Tenzin Gyatso)
Ortu
DBPro Master
16
Years of Service
User Offline
Joined: 21st Nov 2007
Location: Austin, TX
Posted: 19th Feb 2021 01:18
Agreed, use the benefits c# provides for anything that doesn't directly involve the AppGameKit unique features like graphics or physics etc.
http://games.joshkirklin.com/sulium

A single player RPG featuring a branching, player driven storyline of meaningful choices and multiple endings alongside challenging active combat and intelligent AI.
Chmava
10
Years of Service
User Offline
Joined: 20th Jun 2013
Location:
Posted: 19th Feb 2021 12:28 Edited at: 19th Feb 2021 12:29
I did... I have to end up creating my own class and namespace...
Even the graphic and elements of agk required some... 'optimization'... to get over 60 fps...
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 4th Mar 2021 15:12
Hi MadBit, I am having problems with sprites and I have no idea why.
I am running through a list of sprites, checking if they exist and if they do I am getting their X, Y and angle.
Stepping through the code I notice that I am getting a 1 for Agk.GetSpriteExists(spr);
Then for:
var x = Agk.GetSpriteXByOffset(spr);
var y = Agk.GetSpriteYByOffset(spr);
...and:
var ang = Agk.GetSpriteAngle(spr);

I get "NaN" or not a number...
Any clues?
Using AppGameKit V2 Tier 1
MadBit
VIP Member
Gold Codemaster
14
Years of Service
User Offline
Joined: 25th Jun 2009
Location: Germany
Posted: 4th Mar 2021 19:14
No idea. I have not yet been able to reproduce this error.
I will try the following.
I will randomly generate 5000 sprites in the range of 1 and 7000.
Then read them out as you described.
Let's see what happens.
Share your knowledge. It\'s a way to achieve immortality. (Tenzin Gyatso)
MadBit
VIP Member
Gold Codemaster
14
Years of Service
User Offline
Joined: 25th Jun 2009
Location: Germany
Posted: 5th Mar 2021 08:37
So, I have now tested it but could not find anything.
This is the code I tested with.


To help further, I need more details.
Share your knowledge. It\'s a way to achieve immortality. (Tenzin Gyatso)
MadBit
VIP Member
Gold Codemaster
14
Years of Service
User Offline
Joined: 25th Jun 2009
Location: Germany
Posted: 6th Mar 2021 06:46
@all: New version to match AppGameKit 2021.02.10 is available.

Equal to AppGameKit Classic Version 2021.02.10
ADD - Agk.Assign(String zipfile) and Agk.Assign(String zipfile, String password) assign a zip file to the search paths for media. you can load media directly out of a zip file.
ADD - Agk.Unassign(String zipfile) remove a zip file from the search path list.
ADD - Agk.ClearAssign() to clear the assign list.

Download here


Description:
Additional functions for media encryption.

int AssignZip(string zipfilename);
Adds a zip archive to the search path for files. For example, if the file 'my.zip' is added with AssignZip("my.zip").
Then all commands that load assets first search for the assets in the directories provided by AGK. If nothing is
found there, the corresponding asset is searched for in the zip file. That is, if LoadImage(1, "my_image.png") does
not find anything in the usual directories. The Zip file is searched for 'my_image.png'.

There can also be a directory structure in the zip file.So that files are also loaded in this way
LoadImage(1, "images/my_image.png").

zipfilename -> The path to the zip file to assign.



int AssignZip(string zipfilename, string password);
Adds a zip archive to the search path for files. For example, if the file 'my.zip' is added with AssignZip("my.zip").
Then all commands that load assets first search for the assets in the directories provided by AGK. If nothing is
found there, the corresponding asset is searched for in the zip file. That is, if LoadImage(1, "my_image.png") does
not find anything in the usual directories. The Zip file is searched for 'my_image.png'.

There can also be a directory structure in the zip file.So that files are also loaded in this way
LoadImage(1, "images/my_image.png").

If you have encrypted your archive with a password, it is necessary to pass your password in the password parameter.It is
not recommended to pass the password directly as a parameter.Instead, it is good to store the password in a secure string and pass
it later.It is even better if the password string is composed of several chars or maybe you use an algorithm.

zipfilename -> The path to the zip file to assign.
password -> The password that was used to create the zip file.


void UnassignZip(string zipfilename);
This function removes an entry from the assignment list.The name must be the same as
the name used to assign it to the list.

zipfilename -- The name of the zip file to be removed from the list.



void ClearAssignList();
This resets the entire assignment list. All entries in the list are deleted.

Recommended workflow:
All media files you use should be located in the media folder during the development of the app.
When the app is finally published, the entire contents of the media folder can be zipped.
The directory structure created during development should be retained in the zip file.
But be careful when using the SetCurrentFolder/SetFolder command. It does not work inside a zip-file.
And you cannot write to the zip file.
Finally, this zip-file must be included with one of the Assign commands. Further changes to the code should not be necessary.

Hint:
Several zip files can also be assigned. These are then searched one after the other for the files to be loaded.
Share your knowledge. It\'s a way to achieve immortality. (Tenzin Gyatso)
Ortu
DBPro Master
16
Years of Service
User Offline
Joined: 21st Nov 2007
Location: Austin, TX
Posted: 7th Mar 2021 18:31
Wow, nice!
http://games.joshkirklin.com/sulium

A single player RPG featuring a branching, player driven storyline of meaningful choices and multiple endings alongside challenging active combat and intelligent AI.
Chmava
10
Years of Service
User Offline
Joined: 20th Jun 2013
Location:
Posted: 10th Mar 2021 06:02 Edited at: 10th Mar 2021 06:11
Hi,

How do you get the app to use more than ~5 - 8% of the cpu?
initially in the beginning, without any code, It was over 3000 fps, but still using about 5% - 15%...
Now it is about 60 fps at... around 5% - 8 %...

FPS is set to 'unlimited' using '0'!
and accurate is set to false...

Is there something I am missing?


UPDATE: It seems that is a problem with the forum.. it claim 'Unknow Error' or something, and it cause many duplicated post to happen! I can't remove them probably due to permission or or rank!
Chmava
10
Years of Service
User Offline
Joined: 20th Jun 2013
Location:
Posted: 10th Mar 2021 06:02 Edited at: 10th Mar 2021 06:11
Hi,

How do you get the app to use more than ~5 - 8% of the cpu?
initially in the beginning, without any code, It was over 3000 fps, but still using about 5% - 15%...
Now it is about 60 fps at... around 5% - 8 %...

FPS is set to 'unlimited' using '0'!
and accurate is set to false...

Is there something I am missing?


UPDATE: It seems that is a problem with the forum.. it claim 'Unknow Error' or something, and it cause many duplicated post to happen! I can't remove them probably due to permission or or rank!
Chmava
10
Years of Service
User Offline
Joined: 20th Jun 2013
Location:
Posted: 10th Mar 2021 06:02 Edited at: 10th Mar 2021 06:12
Hi,

How do you get the app to use more than ~5 - 8% of the cpu?
initially in the beginning, without any code, It was over 3000 fps, but still using about 5% - 15%...
Now it is about 60 fps at... around 5% - 8 %...

FPS is set to 'unlimited' using '0'!
and accurate is set to false...

Is there something I am missing?


UPDATE: It seems that is a problem with the forum.. it claim 'Unknow Error' or something, and it cause many duplicated post to happen! I can't remove them probably due to permission or or rank!
Chmava
10
Years of Service
User Offline
Joined: 20th Jun 2013
Location:
Posted: 10th Mar 2021 06:02 Edited at: 10th Mar 2021 06:12
Hi,

How do you get the app to use more than ~5 - 8% of the cpu?
initially in the beginning, without any code, It was over 3000 fps, but still using about 5% - 15%...
Now it is about 60 fps at... around 5% - 8 %...

FPS is set to 'unlimited' using '0'!
and accurate is set to false...

Is there something I am missing?


UPDATE: It seems that is a problem with the forum.. it claim 'Unknow Error' or something, and it cause many duplicated post to happen! I can't remove them probably due to permission or or rank!
MadBit
VIP Member
Gold Codemaster
14
Years of Service
User Offline
Joined: 25th Jun 2009
Location: Germany
Posted: 10th Mar 2021 18:57 Edited at: 10th Mar 2021 18:59
Try using Agk.SetSyncRate instead of Agk.SetVSync.

In full screen mode, you must check your driver settings. VSync must also be switched off.
Share your knowledge. It\'s a way to achieve immortality. (Tenzin Gyatso)
Ortu
DBPro Master
16
Years of Service
User Offline
Joined: 21st Nov 2007
Location: Austin, TX
Posted: 11th Mar 2021 00:49
Agk is single threaded, it can only use 1 core.

On a 4 core processor that would cap out at 25%, 8 core at 13% and realistically less because your not likely to get the entire core to yourself

You can do some multithreading in an agksharp app on the c# side as long as you only handle agk data like images, objects, rendering, physics, etc on the main thread
http://games.joshkirklin.com/sulium

A single player RPG featuring a branching, player driven storyline of meaningful choices and multiple endings alongside challenging active combat and intelligent AI.
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 11th Mar 2021 00:58
Keep in mind that AppGameKit uses multi-threading for 3D physics
Chmava
10
Years of Service
User Offline
Joined: 20th Jun 2013
Location:
Posted: 11th Mar 2021 04:54 Edited at: 11th Mar 2021 05:08
Hi,

vsync is not use...

Also... not a single thread, with the program running, despite spiking over 80%... due to some clean up, i think?
Ever use more than 10 or 15% of a single thread!
There is 4 thread spiking...

hench I am asking...

The gpu is not using pass 15% either...

Also, in AppGameKit basic, that main thread is indeed a constant 70%+ usage at over 300 fps!
...and that is basic code...
On default 'new project' code, it is over 5000 fps instead of just over 3000 fps...

Hench I am confuse...
I have attached a picture to prove not a single thread is being use pass 50% by default...



Edit: is the program switching between thread... is this a OS or backend code problem?
Virtual Nomad
Moderator
18
Years of Service
User Offline
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 9th Jun 2021 21:55
unlocked
[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]
Dark Raven
9
Years of Service
User Offline
Joined: 27th Jul 2014
Location: United States
Posted: 4th Jul 2021 22:06
Were the templates for windows removed from the downloaded zip file or am I missing something. I decided to take a look at this again and downloaded what ever to most recent downloadable version from the site and I see c# code for the linux folder but in the windows folder all there is the binary dlls. There is no csharp files or vb files just the bin folder contains dlls.
MadBit
VIP Member
Gold Codemaster
14
Years of Service
User Offline
Joined: 25th Jun 2009
Location: Germany
Posted: 5th Jul 2021 11:44
This one should be right.

All templates are also available there.
Share your knowledge. It\'s a way to achieve immortality. (Tenzin Gyatso)
Dark Raven
9
Years of Service
User Offline
Joined: 27th Jul 2014
Location: United States
Posted: 6th Jul 2021 06:20
yeah that was the version I downloaded and tried again and getting the same problem; no source for the templates just the dll for the windows templates. I downloaded the package from may of last year and was able to get the source so I'm using the core.cs file from it with the dlls from this years download. Hopefully nothing changed in the core.cs but all seems to be working.
MadBit
VIP Member
Gold Codemaster
14
Years of Service
User Offline
Joined: 25th Jun 2009
Location: Germany
Posted: 6th Jul 2021 13:57
Sorry, Raven. You are right. I don't know why they are not included.
But nothing has changed in the source code.
So it should work fine.
Share your knowledge. It\'s a way to achieve immortality. (Tenzin Gyatso)
MadBit
VIP Member
Gold Codemaster
14
Years of Service
User Offline
Joined: 25th Jun 2009
Location: Germany
Posted: 18th Jul 2022 19:43
After a long time there is now again an update.
Besides the update of the AppGameKit there are other small changes.
You can see them below in the changelog.
My project page is now moved to itch.io.
You can find the latest download and information there.
There should be fewer download problems now.

Project page and download

Have fun and happy programming

Changelog:
[2022-07-17]
Equal to AppGameKit Classic Version 2022-06-27
ADD - Template for .NET 5.0
ADD - Binaries .Net Standard 2.0 for usage with .NET 5.0
ADD - Agk.GetTextPtr(uint TextID)
ADD - Constructor AgkText(IntPtr pText)
FIX - Agk.GetTextAllignmentEnum delete useless second parameter.
Share your knowledge. It\'s a way to achieve immortality. (Tenzin Gyatso)
Ortu
DBPro Master
16
Years of Service
User Offline
Joined: 21st Nov 2007
Location: Austin, TX
Posted: 31st Jul 2022 06:17
I really appreciate your work here Madbit, c# has long been my language of choice and it's hard to express how grateful I am that I can combine c# with agk. Do you have a donation page or something?
http://games.joshkirklin.com/sulium

A single player RPG featuring a branching, player driven storyline of meaningful choices and multiple endings alongside challenging active combat and intelligent AI.
Zaxxan
AGK Developer
3
Years of Service
User Offline
Joined: 17th Nov 2020
Location: England
Posted: 31st Jul 2022 07:25
You can make a donation via the itch.io page
Zaxxan
AGK Developer
3
Years of Service
User Offline
Joined: 17th Nov 2020
Location: England
Posted: 3rd Aug 2022 16:50 Edited at: 3rd Aug 2022 23:41
@MadBit,

I've been trying the .net version today and I really like it, within a few minutes I had sprites tweening! I followed the guide about putting the templates into the user directory but they still don't show up when creating a new project. Not a big issue as I can just start a new project by clicking the project file in the templates folder. Out of interest when a new update is released by TGC does it take you long to update your agksharp.dll and wrapper?
MadBit
VIP Member
Gold Codemaster
14
Years of Service
User Offline
Joined: 25th Jun 2009
Location: Germany
Posted: 4th Aug 2022 20:27
Ok, sorry. I've been on vacation in Spain for the last two weeks.

@Ortu - as Zaxxan suggested, you can donate through itch.io's new project page. (On this occasion - thanks to Zaxxan for your donation) You can also donate directly via paypal if you don't want to donate via itch. Here is the link.. (By the way, I also updated the first post).

@Zaxxan - I usually only do the updates if the changes also affect the desktop area. If that's the case, then you can expect about a week for the update.
I assume you are trying the way described from the old page to save a template as a project template. I had given up on that because the maintenance effort was too high.
But you can try the following. Open one of the templates you want to have as a default project template. Then go to PROJECT / Export Template which should export the current project to your templates folder when you work through the wizard.
Share your knowledge. It\'s a way to achieve immortality. (Tenzin Gyatso)
Zaxxan
AGK Developer
3
Years of Service
User Offline
Joined: 17th Nov 2020
Location: England
Posted: 7th Aug 2022 15:15
@MadBit, yes I was trying the old way. I'll try as you suggest, hopefully it will work ok.
snaidamast
5
Years of Service
User Offline
Joined: 16th Oct 2018
Location:
Posted: 18th Sep 2022 17:37
Hello All...

Can anyone tell me if there is a complete guide that can be downloaded for all the Namespaces\Classes in AGKSharp?

I saw that The Game Creators no longer offer their books any longer...
MadBit
VIP Member
Gold Codemaster
14
Years of Service
User Offline
Joined: 25th Jun 2009
Location: Germany
Posted: 18th Sep 2022 20:45
Sorry, but there are no books or guides for AgkSharp.
A description of the functions is available online here https://www.appgamekit.com/documentation/home.html
The functions in AgkSharp are named the same as in Tier1 and Tier2 except that they are always prefixed with 'Agk.' .
If you want to use these classes which are also available in Tier2, they are also called like in Tier2.
AgkSprite
AgkText
AgkImage
AgkFont
AgkMesh
AgkNode
AgkObject3D
AgkShader

Keep in mind that if you use these, the objects will not be managed by AppGameKit and you will have to take care of rendering the objects yourself.

Additionally you can use AGKVector2,AGKVector3,AGKVector4,AGKQuaternion and AGKMatrix. Which contain some simple vector mathematics.

A special functionality has the Assign command.
With AssignZip(zip_file) and AssignZip(zip_file, password) a zip file is added to the search path of Agk and so it is possible to load media data directly from the zip file.
With UnassignZip(zip_file) a zipfile is deleted from the path.
ClearAssign deletes all added zipfiles from the search path.

I hope this helps.
Share your knowledge. It\'s a way to achieve immortality. (Tenzin Gyatso)

Donations are always welcome.
snaidamast
5
Years of Service
User Offline
Joined: 16th Oct 2018
Location:
Posted: 21st Sep 2022 14:57
Thank you, MadBit...

I have reviewed the link that you posted and had been hoping that the original volumes for Dark Basic had been updated for AppGameKit Classic.

In any event, the link should be good enough. I just prefer printed texts...

Thank you, again...
MadBit
VIP Member
Gold Codemaster
14
Years of Service
User Offline
Joined: 25th Jun 2009
Location: Germany
Posted: 23rd Nov 2022 20:49
Hello,
Here is an update for AgkSharp to the current version of AppGameKit.
Apart from that, no other new features.

And thankyou all for your support.

AgkSharp on itch.io
Share your knowledge. It\'s a way to achieve immortality. (Tenzin Gyatso)

Donations are always welcome.
MadBit
VIP Member
Gold Codemaster
14
Years of Service
User Offline
Joined: 25th Jun 2009
Location: Germany
Posted: 10th Sep 2023 16:49 Edited at: 10th Sep 2023 16:53
Now after a long time an update from AgkSharp. The update interval of TGC is somewhat tough. I thought I can create my own update. In this update I brought a new 2d render object with over 50 new commands.

This new render object is called Shape. Not to be confused with the collision shapes in the sprites. It is a freely definable shape. It resembles a sprite in a way. A sprite is usually rendered only as a quad. A quad usually consists of four vertieces and corresponding UV coordinates, which are usually also squared on an image.
This is where the shape differs from the sprite.

The shape can have several vertices.
The UV coordinates can be placed freely on an image.
Each vertex has its own color information.
The positioning of the shape is always the shape origin.
The vertices are built around this origin.

These are the main differences. Most of the commands are similar to Sprite. You also have the possibility to create prefabricated shapes. When you create a prefabricated shape, the corresponding UV coordinates are automatically created.

In the ZIP there is a new folder Doc. There you will find the documentation of the new commands.​

You can download it from Itch.io. By the way, if you plan to give a small donation. Please give it directly through PayPal. Itch.io has too high deductions. Please use the donate button in my signatur.

I have also uploaded the documentation here in the forum.
Share your knowledge. It\'s a way to achieve immortality. (Tenzin Gyatso)

Donations are always welcome.

Attachments

Login to view attachments
qweQua
1
Years of Service
User Offline
Joined: 24th Oct 2022
Playing:
Posted: 10th Sep 2023 17:39
Wow! Very cool! Any chance this will be added to agk basic and tier 2? Looks like it could be very useful and i would love to be able to use it in c++.
Also, there is a page in the itch.io settings where you can tweak the revenue share if you like, the default is 10% but it can be set to 0 i believe.
Virtual Nomad
Moderator
18
Years of Service
User Offline
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 10th Sep 2023 17:46 Edited at: 10th Sep 2023 17:47
nice update, madbit

qweQua wrote: "there is a page in the itch.io settings"

itch still charges fees beyond revenue share; ie, Adjustments and Payment Processor Fees.
snaidamast
5
Years of Service
User Offline
Joined: 16th Oct 2018
Location:
Posted: 12th Sep 2023 15:50
And MadBit is back!!!

Glad to see you again, MadBit!

I just downloaded your previous update to AgkSharp but I am looking forward to reviewing this new update as well...

Steve Naidamast
Sr. Software Engineer
janbo
15
Years of Service
User Offline
Joined: 10th Nov 2008
Location: Germany
Posted: 13th Sep 2023 16:16
Reading about the new shape object i emediately thought of my very first post on this forum 2D Shadow Problem where i created 2D shadows but had to use draw line to create polygons wich isn't really performant.
Can the 2D Physic commands generate a physics shape automatically for your new shape object ?
MadBit
VIP Member
Gold Codemaster
14
Years of Service
User Offline
Joined: 25th Jun 2009
Location: Germany
Posted: 13th Sep 2023 19:50 Edited at: 13th Sep 2023 19:59
Thank you all, for the interest in this project.

qweQua wrote: "Any chance this will be added to agk basic and tier 2? Looks like it could be very useful and i would love to be able to use it in c++. "

I would not like to support that too.
But you can have a look at this post where the c++ version is uploaded.
Most if not all functions are included there.
Remember to also download the wrapper.h file with the example.

janbo wrote: "Can the 2D Physic commands generate a physics shape automatically for your new shape object ?"

So fully automatic not.
But you can query the SpriteShape vertices one by one, store them in a float array and form a shape from it.
GetSpriteShapeNumVertices
GetSpriteShapeVertexX
GetSpriteShapeVertexY
Add the arrays for the uv coordinates and vertice colors and it should work.
Share your knowledge. It\'s a way to achieve immortality. (Tenzin Gyatso)

Donations are always welcome.
Zigi
14
Years of Service
User Offline
Joined: 5th Jul 2009
Location:
Posted: 15th Sep 2023 18:46
@MadBit
Nice to see you add your own features and release your own updates.
So do you still have permission from TGC to continue redistribute this project and collect donations even?

I thought originally you got permission only for 1 year and not to make profit. After you stopped the updates, figured it is over.

What do you mean by itch.io has too high deduction? Last time I checked it was possible to set revenue share to 0 and it was also possible to make it so it is payout directly to PayPal.
MadBit
VIP Member
Gold Codemaster
14
Years of Service
User Offline
Joined: 25th Jun 2009
Location: Germany
Posted: 17th Sep 2023 14:21
Quote: "So do you still have permission from TGC to continue redistribute this project and collect donations even?

I thought originally you got permission only for 1 year and not to make profit. After you stopped the updates, figured it is over.
"

After the expiration of the first year, I had asked how it is now. Rick had given me so far the permission to make further updates.
He had even reminded me once to make an update. When I had forgotten one.
Since it is up to everyone to give a donation, it was also okay for TGC.
Should TGC change their mind, they just have to let me know. Then I would take it off the net.


Share your knowledge. It\'s a way to achieve immortality. (Tenzin Gyatso)

Donations are always welcome.
Zigi
14
Years of Service
User Offline
Joined: 5th Jul 2009
Location:
Posted: 17th Sep 2023 20:14
Quote: "Should TGC change their mind, they just have to let me know. Then I would take it off the net."

Oh, it is not very reassuring then. Have you ever considered to use a different backend?
There are tons of free and open-source C++ frameworks you can use instead. Or you are not that motivated to use a different one and make it an independent product?
MadBit
VIP Member
Gold Codemaster
14
Years of Service
User Offline
Joined: 25th Jun 2009
Location: Germany
Posted: 17th Sep 2023 21:02
I like the community here.
That's why I'm sticking with AppGameKit.
If I ever have to give up AgkSharp, I would probably switch to Raylib to build a similar product.
Share your knowledge. It\'s a way to achieve immortality. (Tenzin Gyatso)

Donations are always welcome.
snaidamast
5
Years of Service
User Offline
Joined: 16th Oct 2018
Location:
Posted: 18th Sep 2023 16:46
Hi MadBit...

I just took a look at RayLib. It looks like a very interesting project.

It also has bindings for 50+ languages, including C#, which you could also use VB.NET against. See the CSharp binding here... https://github.com/ChrisDill/Raylib-cs

I hope TGC keeps your interface as I would hate to have to switch everything mid-stream...

Steve Naidamast
blackfalconsoftware@outlook.com
snaidamast
5
Years of Service
User Offline
Joined: 16th Oct 2018
Location:
Posted: 5th Oct 2023 15:12
Hello...

Is there any way that a sprite can be loaded from a Byte Array using AgkSharp, which has been stored as a binary blob field in a database table?

I already tried one suggestion posted in the forums here but either the information was incomplete or the technique simply wouldn't work.

Thank you...

Steve Naidamast'
Sr. Software Engineer
MadBit
VIP Member
Gold Codemaster
14
Years of Service
User Offline
Joined: 25th Jun 2009
Location: Germany
Posted: 6th Oct 2023 17:14
You have two ways to do this.
The first is if you need "normal" managed sprites. So access via the id's.
Goes the way about the Memblocks.
That would also be how you would solve it in Tier1.

[*]Create Memblock of the size of the blob Agk.CreateMemblock(1,size_of_blob).
[*] Fill Memblock with data of the blob Loop to write in the Memblock Agk.SetMemblockByte(1,offset, blob[offset])
[*]Create image from the Memblock. Agk.CreateImageFromMemblock(1,1)
[*] create sprite from image. Agk.CreateSprite(1,1)

It is important in which form your blob data are present. CreateImageFromMemblock expects the first 8 bytes (2 integers) to describe the size of the image (width x height).
After that come the pixels in the format R,G,B,A.

If you prefer a sprite class, you can only do that in Tier2 or AgkSharp. Then you have the possibility to create an image directly from your blob array.
But the AgkImage expects the data as an integer array. That means if your blob is a byte array you have to copy it to an integer array first.
Then you can create an image from the array.
AgkImage image = new AgkImage(width, height, blob_array);
And from this a sprite.
AgkSprite sprite = new AgkSprite(image);

With this function AgkImage expects raw data, so without the size of the image at the beginning.
As already mentioned, this is the unmanged solution. This means for you that you are responsible if and how your sprite is drawn.
On the screen you bring the sprite then with
sprite.Draw();
Share your knowledge. It\'s a way to achieve immortality. (Tenzin Gyatso)

Donations are always welcome.
MadBit
VIP Member
Gold Codemaster
14
Years of Service
User Offline
Joined: 25th Jun 2009
Location: Germany
Posted: 2nd Dec 2023 22:00
Hi all,

I have decided to buy a Mac mini, so I now have the possibility to support this system. After a few setbacks trying to port AgkSharp to the Mac, I finally managed to create a decent template with the corresponding binaries. Since I'm a complete novice when it comes to Mac, please bear with me if there are a few mistakes here and there. So please report them to me so that I can fix them.

Another new feature is that there is an ImGui template for all three supported systems. These use the new AgkShape functions that were added with the last update. For Linux, however, this can only be used with Visual Studio Code. This is because the MonoDevelop IDE does not properly support the new .Net core (8.0).

You should install the modules >C# Dev Kit< and >C#< from Microsoft under VSCode. When installing >C# Dev Kit<, >C#< is also installed automatically.
For Linux, I have completely revised the templates and now only use .Net 8.0. This in turn means that MonoDeveop can no longer be used for development, only VisualStudioCode. With the previously mentioned plugins.

I have also reviewed the demo game Dust2Dust and it now runs on all three systems. Please note that there are three scripts in the bin folder (run_windows.cmd, run_macos.sh and run_linux.sh) which should be started to start the game.

Under Linux and MacOS you have to set the flag as runable for the scripts. It is possible that these flags were not taken over during packaging.

https://madbit.itch.io/agksharp

Here is the short list of updates.

Code review of all classes in AgkSharp.
ADD - MacOS support.
ADD - AgkShape class.
ADD - Added extended function LoadImageFromData in AgkImage class.
ADD - New Templates for Windows / Linux and MacOS working with ImGui

I wish you lots of fun developing.

MadBit
Share your knowledge. It\'s a way to achieve immortality. (Tenzin Gyatso)

Donations are always welcome.

Login to post a reply

Server time is: 2024-04-20 08:18:35
Your offset time is: 2024-04-20 08:18:35