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

Author
Message
MadBit
Valued Member
9
Years of Service
User Offline
Joined: 25th Jun 2009
Location: Germany
Posted: 13th Jan 2019 07:48
Ok. New Version released.
Download from my site.

-FIX Memory leak when receiving strings from AppGameKit (reported by Chmava)

Maybe it's the memory leak that makes the application hang at the end.
Share your knowledge. It\'s a way to achieve immortality. (Tenzin Gyatso)
Chmava
5
Years of Service
Recently Online
Joined: 20th Jun 2013
Location:
Posted: 13th Jan 2019 08:45 Edited at: 13th Jan 2019 09:04


Will you post here to tell me if you have released the fix for the WriteString and writestring2?
Appreciate it!

EDIT: NVM, was on page 6...
EDIT: Just tested it, it seems fine now, ram never goes pass 420mb even after 30 minutes. Keep up the good work! Now, if only it work for max, android, ios?
Chmava
5
Years of Service
Recently Online
Joined: 20th Jun 2013
Location:
Posted: 13th Jan 2019 10:30 Edited at: 13th Jan 2019 10:44
Here is another interesting problem...

If you have a directory string variable that end with /.
And if you use Agk.MakeFolder("C:/Something/");

The folder will be made, by an error happen.

Error:" App Terminated!

Invalid path "C:/Something//", folder names must have at least one character.

Is the c# 64bit version missing a "Did string end with a '/' so lets not add an extra one to the end?" check?

In the end, the app run fine and continue as per normal.
This did not happen in the 32bit template and only in the 64 bit version.

On that note, could you have a template that allow both 32 and 64 bit to build without having to copy, paste, reconfigure each other?
Once again, clicking the X does not seem to terminate some kind of service that prevent the .exe from being deleted or pasted over.
Attached is the picture.
I'm quite new, how do you get the .exe to not use AGKSharp_template to appear in task manager?

Attachments

Login to view attachments
Ortu
DBPro Master
11
Years of Service
User Offline
Joined: 21st Nov 2007
Location: Austin, TX
Posted: 13th Jan 2019 15:53
You can set the name in the project properties
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
5
Years of Service
Recently Online
Joined: 20th Jun 2013
Location:
Posted: 14th Jan 2019 04:37
I did, in task manager, it still appear as AgkSharp_Template
MadBit
Valued Member
9
Years of Service
User Offline
Joined: 25th Jun 2009
Location: Germany
Posted: 14th Jan 2019 06:24
The C# wrapper uses the same sources for 32bit and 64bit. I can't say why the behavior is different there. I do not change the string and pass it unchanged to AGK.

I looked at the C code of MakeFolder. The way I see it it doesn't check if there is a slash at the end of the string or not. In any case one will be added. Therefore it should come in the 32 bit as well as in the 64 bit version to this error.
Unfortunately the documentation of AppGameKit does not point out that there should be no slash at the end of the string.

Change the project name:
You will need to edit the assembly information.
Right click on Project -> Properties -> Application -> Assembly Information ...
In the field -> Title, you can enter your project name.
Share your knowledge. It\'s a way to achieve immortality. (Tenzin Gyatso)
Chmava
5
Years of Service
Recently Online
Joined: 20th Jun 2013
Location:
Posted: 14th Jan 2019 08:41
AGK has always automatically handle it without giving an error, so this is new to me too.

Also, thank you, did not know that was a button...
Ortu
DBPro Master
11
Years of Service
User Offline
Joined: 21st Nov 2007
Location: Austin, TX
Posted: 15th Jan 2019 03:01
in basic agk, GetImageExists() returns int 1 or 0

for things like this in AgkSharp, Agk.GetImageExists() returns a uint to match this behavior, but would it be possible to return bool instead?

I get that there is an argument to be made for keeping the AppGameKit behavior, but I'm thinking in this case a bool would be more intuitive and straightforward for AgkSharp users.

What do you yall think?
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
Valued Member
9
Years of Service
User Offline
Joined: 25th Jun 2009
Location: Germany
Posted: 15th Jan 2019 04:08
I was thinking exactly the same thing. At the same time I wanted to stay as close as possible to the original. So I added new commands. All functions that return a boolean value start with Is... .

IsImageExists.

I hope this helps.
Share your knowledge. It\'s a way to achieve immortality. (Tenzin Gyatso)
Ortu
DBPro Master
11
Years of Service
User Offline
Joined: 21st Nov 2007
Location: Austin, TX
Posted: 15th Jan 2019 04:52
Oh I see, thanks. I hadn't noticed those commands
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
Valued Member
9
Years of Service
User Offline
Joined: 25th Jun 2009
Location: Germany
Posted: 15th Jan 2019 06:24
There are some more methods I have added. I also overwrote the methods that should get a boolean value.



I also have some enum's inserted.



The associated methods are also overwritten.



If you want to get an enum as return value then you just have to set enum at the end of the method.



Here is the complete list of added methods.



I'm sure I overlooked one method or another. So if you miss a method, please let me know.
Share your knowledge. It\'s a way to achieve immortality. (Tenzin Gyatso)
Ortu
DBPro Master
11
Years of Service
User Offline
Joined: 21st Nov 2007
Location: Austin, TX
Posted: 15th Jan 2019 14:49
That's great MadBit, thanks!
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
5
Years of Service
Recently Online
Joined: 20th Jun 2013
Location:
Posted: 16th Jan 2019 05:29
Could you program something similar to SetSpriteActive() as SetObjectActive()?
100,000 object with 12 polygon each drop the framerate under 60fps while a single object with 1.2 million polygon does not...

Any idea what kind of processing is AppGameKit doing with object and how to prevent it?

Function that flip bool to prevent those additional processing?
MadBit
Valued Member
9
Years of Service
User Offline
Joined: 25th Jun 2009
Location: Germany
Posted: 16th Jan 2019 05:45 Edited at: 16th Jan 2019 05:50
Have you ever tried SetObjectVisible? It doesn't prevent the geometric calculation but the drawing of the object.

EDIT:
The same to hide parts of an object would be SetMeshVisible.
Share your knowledge. It\'s a way to achieve immortality. (Tenzin Gyatso)
Chmava
5
Years of Service
Recently Online
Joined: 20th Jun 2013
Location:
Posted: 16th Jan 2019 06:25 Edited at: 16th Jan 2019 06:53
Even if no polygon is drawn on screen, it still run at under 30fps...
So I assume it has something to do with AppGameKit looping to process object...

Hence the request to turn off the object all together like turning off sprite processing as mention in the document.

This could help with scene loading, why did paul not add this in in the beginning?

When a player ender a door, rather then unload the scene, why not just set it to non active.
If the player happen to return to the scene immediately, they would not be caught in an unloading scene and reloading scene event.

If it does not have this, 99.999% of games could not be made with AppGameKit, making it a useless engine!
MadBit
Valued Member
9
Years of Service
User Offline
Joined: 25th Jun 2009
Location: Germany
Posted: 16th Jan 2019 06:56
Sorry, I can't answer that question. You should ask Paul that question.
I can only assume that it is not intended to end any object animation and object physics simulation.
Share your knowledge. It\'s a way to achieve immortality. (Tenzin Gyatso)
Chmava
5
Years of Service
Recently Online
Joined: 20th Jun 2013
Location:
Posted: 16th Jan 2019 07:35
Not much of an engine if the developer could not control that aspect of their game...

Like a 3d plane portal is not a physic object, it just look cool with animation and appear in the world for player at the time, to step into.
So turn off physic for that object.
But that only save 3 fps at best.
Chmava
5
Years of Service
Recently Online
Joined: 20th Jun 2013
Location:
Posted: 16th Jan 2019 11:32 Edited at: 16th Jan 2019 11:54
Agk.CreateMemblockFromObjectMesh give another memory access violation...
On main threads

EDIT: tested in tier 1, the same code work fine...
MadBit
Valued Member
9
Years of Service
User Offline
Joined: 25th Jun 2009
Location: Germany
Posted: 16th Jan 2019 12:16
Can you describe it a bit more detailed I did a quick test and ran everything without any problems.


Relating to the previous topic.
I have taken a closer look at the render/update process. If an object is set to not visible and no RidgetBody and Skeleton is present. Then the objects are not drawn and no physics or animation update is done.
The only thing that is time consuming is that all objects are run through and checked - does it have a skeleton? does it have a RidgedBody? is the object visible?
Theoretically it should be possible to remove an object from the RenderList if the object is set to not visible and relink it if it is set to visible (of course under consideration of the skeleton and RidgetBody). I have no idea what effect this would have on the performance or the stability of the engine. But this should be done by Paul.

It's just a thought.

Share your knowledge. It\'s a way to achieve immortality. (Tenzin Gyatso)
Ortu
DBPro Master
11
Years of Service
User Offline
Joined: 21st Nov 2007
Location: Austin, TX
Posted: 16th Jan 2019 12:48
Any engine is going to struggle with 100k full objects. Have you tried using instancing?
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
5
Years of Service
Recently Online
Joined: 20th Jun 2013
Location:
Posted: 16th Jan 2019 12:58 Edited at: 16th Jan 2019 13:13
NVM, not sure what I did, but it is fix now... Sorry!

As for instancing... Agk function are not threads safe?
...But it still work, just object popping into existence right before you eyes!
...and falling out of the world when it is not loaded...

It was fun...

Also, there is too many object, a table full of stuff for example, the game will lag for like half a seconds.

Attachments

Login to view attachments

Login to post a reply

Server time is: 2019-01-16 13:24:41
Your offset time is: 2019-01-16 13:24:41