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/AppGameKit Studio Showcase / .NET Framework for AppGameKit ToolMakers

Author
Message
BatVink
Moderator
16
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 9th May 2015 13:08 Edited at: 9th May 2015 14:46
Available for download here is a suite of code to allow you to make .NET tools that integrate with AppGameKit. The source is free to use as you wish. But I would urge you to share your creations in the same way this framework has been shared.

Credit goes to Baxslash and Grayvyn for the code they have shared with me to make this work.
I could have done more, but it is better to share it now than leave it on my hard drive for another 3 months.

Watch the video to understand how it works! Bear in mind that you only need to know how 5% of the framework works, do not be intimidated by the masses of networking code, you don't need to know what it is doing.

Then, have fun and bring back your creations to the forum.

Please post any questions here and I will try to answer them. I hope that by sharing, we can create a useful library of tools.



Quidquid latine dictum sit, altum sonatur
TutCity is being rebuilt

Attachments

Login to view attachments
baxslash
Valued Member
Bronze Codemaster
12
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 10th May 2015 01:20
Great job Steve! I'm going to do a couple of tests then integrate this properly into my level editor

Using AppGameKit V2 Tier 1
Seppuku Arts
Moderator
15
Years of Service
User Offline
Joined: 18th Aug 2004
Location: Cambridgeshire, England
Posted: 13th May 2015 18:00
That's pretty cool. Might make me tempted to create an App using AppGameKit now, I love C#. I was thinking of developing an App once I've got my current project out of the way, with the intention to use C#, so this makes me happy.

To clarify, is this version 1 or 2 (or both)?

BatVink
Moderator
16
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 13th May 2015 18:24
I think the only V2 feature is the AppGameKit array commands used to store the messages, but this could be easily replaced with standard arrays.

Quidquid latine dictum sit, altum sonatur
TutCity is being rebuilt
baxslash
Valued Member
Bronze Codemaster
12
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 13th May 2015 20:10
It would be possible to use V1 with a cut down version of the AppGameKit code. The C# side would work with either for sure.

Using AppGameKit V2 Tier 1
BatVink
Moderator
16
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 13th May 2015 23:58
I just ran a few tests and found that an average of 50 messages a second is the safe level. Beyond this, AppGameKit starts to lose messages - about 30% of messages lost at 100 messages / second.

Even with an uncontrolled Sync Rate of 1100 FPS, I got the message loss.

However, 50 messages a second should be more than enough for any app. If there are more messages than that, something is wrong with the design!

Even if you were reloading a scene of 100 entities with data from .NET, it can achieve it in 2 seconds.

Quidquid latine dictum sit, altum sonatur
TutCity is being rebuilt
fog
15
Years of Service
User Offline
Joined: 5th Oct 2003
Location: Newcastle, England
Posted: 14th May 2015 01:31
Excellent work Sir.

My game engine uses various hand written scripts ATM and I quite fancied writing editors to create a few of them so this could come in very handy.

BatVink
Moderator
16
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 22nd May 2015 12:26
A couple of updates. These are intertwined with my full editor, so I can't release the improvements individually, I will upload the editor and source shortly.

Limited the number of messages sent between the 2 apps to improve performance and allow a faster throughput of essential messages. Example:

When changing a sprite position using a numeric UpDown control, you might generate 60 or more changes per second. When controls like this are in use, a 0.1 second timer is activated and the updates sent every tick instead of every change. This allows realtime updates without flooding the message queue.

Likewise on the AppGameKit side, when interactively moving a sprite around, the messages to update the.NET UI are sent every 0.1 seconds instead of every pixel change.

Both of these are invisible to the user, everything looks perfectly smooth. But messages are reduced by up to 80%.

I'm also adding context-sensitive controls. So you only see what is relevant for the entity selected.

Quidquid latine dictum sit, altum sonatur
TutCity is being rebuilt
baxslash
Valued Member
Bronze Codemaster
12
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 22nd May 2015 12:45
Quote: "When changing a sprite position using a numeric UpDown control, you might generate 60 or more changes per second. When controls like this are in use, a 0.1 second timer is activated and the updates sent every tick instead of every change. This allows realtime updates without flooding the message queue."

I had to add the same thing but I'm getting away with slightly less. Did you try less than 0.1 and have problems?

Quote: "These are intertwined with my full editor, so I can't release the improvements individually, I will upload the editor and source shortly."

You making a level editor too bats?

Using AppGameKit V2 Tier 1
BatVink
Moderator
16
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 22nd May 2015 13:36
Quote: " Did you try less than 0.1 and have problems?"


I haven't tried less, I have found that 0.1 seconds is not perceptible to the user. My tests show that 0.06 seconds is a comfortable limit (~15 messages per second).
I simply throw all the messages onto a queue (List<>, and at sending time filter out changes that are duplicated for the same entity, sending only the last one.
This filter will also allow me to implement a simple undo system that doesn't get overloaded with data and become too cumbersome for the user.

Quote: "You making a level editor too bats?"

Yes and no. It is nothing like your editor. Feel free to take any of the ideas below and use them...

It will allow you to create/manage Sprites and Sounds, and eventually 3D and other things such as Tweens.
You can move anything around the screen - sprites and sounds too. So you could save a location of a sound and retrieve this data when you load it into a game. In you game you can do whatever you like with the data - change volume, balance etc.

You can create any kind of entity and decide how to manage it. It can be a virtual entity such as a marker position, and be represented by a sprite in the editor. Then you can attach parameters to it that can all be loaded into your game.

This is the reasoning behind the mail I sent a couple of weeks ago, about maybe having a community-wide standard for editor/game entity files. Imagine you have the ultimate visual editor with shaders, Spine integration etc. I have an entity management system that lets you manage sounds and non-visible data. If we can load each others files and ignore the bits our respective editors don't deal with, then the community can mix and match whatever tools they need.

The result is a big package of data - same format from all editors - and a loading script. It's then up to the end developer to decide how to implement the package of data and resources into a game.

Quidquid latine dictum sit, altum sonatur
TutCity is being rebuilt
Scraggle
Moderator
16
Years of Service
User Offline
Joined: 10th Jul 2003
Location: Yorkshire
Posted: 22nd May 2015 14:04
I've been meaning to have a play with this since you posted it but not had chance.
I will make time for it tomorrow!

To be honest, I didn't really understand your idea behind the "community-wide standard" model and reading your update above I'm still not sure I follow.
The idea of it sounds fantastic but I don't understand how you see it working.

AGK V2 user - Tier 1 (mostly)
BatVink
Moderator
16
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 22nd May 2015 14:13 Edited at: 22nd May 2015 14:14
A overly simple model might be:





When Baxslash reads in this file, he makes a tree and places it in the right place at the right size. He also applies the shader. But he doesn't care what a click does, so he "ignores" it in his editor. However, when the file is saved, he writes back the Click parameter also.

When you load it into your editor you also make a tree, position it and resize it. When the user clicks it, you trigger Tween_1. But you don't have the shader capability so you ignore this bit. When you write out the file, you include the Shader parameter that you didn't process in your editor.

The end user can take his scene, apply shaders in Baxslash's tool, interaction and Tween animations in yours, and use all the tools available in one solution.

Quidquid latine dictum sit, altum sonatur
TutCity is being rebuilt
Scraggle
Moderator
16
Years of Service
User Offline
Joined: 10th Jul 2003
Location: Yorkshire
Posted: 22nd May 2015 14:23
OK, I think I got it. It sounds like a perfect opportunity to implement my XML system

The problem though is that it relies on everyone that uses it to save all of the data and remember that the entity in question contains data that they themselves are not interested in.

It sounds great in theory but there does seem to be a large potential for failure.

AGK V2 user - Tier 1 (mostly)
CJB
Valued Member
15
Years of Service
User Offline
Joined: 10th Feb 2004
Location: Essex, UK
Posted: 22nd May 2015 15:47
@BatVink - Thank you SO much for this! I'm going to use it for an old-school 2d Morph editor once I have finished my current Phone-Tap project.

Also, thanks for the endorsement!

V2 T1 (Mostly)
Uzmadesign
CodeTrasher
7
Years of Service
User Offline
Joined: 18th Jul 2012
Location: Tampere, Finland
Posted: 23rd Jul 2015 11:21
That looks very, very nice! I'm going to take a closer look into this one. I've been thinking of writing some sort of level editor, also, and this seems to be very well suited for that.

If we can freely use this project and share back to community what we might achieve with this, would you allow me to push this on Github/Bitbucket (if not already there) with appropriate credits in the README file? That would allow people to fork this project, make their changes in the project as they wish and share back the work to the original project. Of course, this approach will require some branch management in order to keep the original project in a 'clean' state, but that shouldn't be a big task to do.

I'm asking this because I like to manage my projects and development via Github.

Again, you guys have done great work on this one. I was thinking a project like this and as you were able to already do this, I truly admire and appreciate your effort.

Mah machine: Intel Xeon E3-1231v3 4x3.40GHz | CM Hyper 212 Evo | ASRock H97 Pro4 | 240GB SanDisk SSD | Sapphire Radeon R9 270X Dual-X 2048MB | Seagate HDD 1000GB |
8GB Crucial Ballistix Sport DDR3-1600
BatVink
Moderator
16
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 23rd Jul 2015 14:39
Feel free to add it to Bitbucket. I don't have time to manage the project but you can add me as a participant (username batvink).

Quidquid latine dictum sit, altum sonatur
TutCity is being rebuilt
CodeTrasher
7
Years of Service
User Offline
Joined: 18th Jul 2012
Location: Tampere, Finland
Posted: 23rd Jul 2015 16:52
The repository is now there, and I added you, BatVink, as a participant. I tried to push the project but I had issues with my Git setup (SSH keys, I believe). So, there's not any code yet, but as soon as I get home from work I'll try again.

The repository can be found here.

Mah machine: Intel Xeon E3-1231v3 4x3.40GHz | CM Hyper 212 Evo | ASRock H97 Pro4 | 240GB SanDisk SSD | Sapphire Radeon R9 270X Dual-X 2048MB | Seagate HDD 1000GB |
8GB Crucial Ballistix Sport DDR3-1600
CodeTrasher
7
Years of Service
User Offline
Joined: 18th Jul 2012
Location: Tampere, Finland
Posted: 23rd Jul 2015 21:51
Ok, the framework is now available on my BitBucket. Feel free to fork it and use it as you please. But like BatVink said, remember to credit the original developers if you share it forward.

Mah machine: Intel Xeon E3-1231v3 4x3.40GHz | CM Hyper 212 Evo | ASRock H97 Pro4 | 240GB SanDisk SSD | Sapphire Radeon R9 270X Dual-X 2048MB | Seagate HDD 1000GB |
8GB Crucial Ballistix Sport DDR3-1600
BatVink
Moderator
16
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 23rd Jul 2015 23:36
I got the notification, thanks

Quidquid latine dictum sit, altum sonatur
TutCity is being rebuilt

Login to post a reply

Server time is: 2019-08-19 22:28:31
Your offset time is: 2019-08-19 22:28:31