About AgkSharp for Windows

With AGKSharp you have the chance to write AppGameKit programs in the language C# and in VisualBasic. Now you can write your programs in an object-oriented language. I also provide a template that allows you to develop AppGameKit applications with windows-forms.
These templates can simply be copied into the directory “?user?\Documents\Visual Studio 2017\Templates\ProjectTemplates\” and then copied into the “Visual C#” and “Visual Basic” directory. The corresponding template projects should be found when creating new Projects.

AgkSharp was developed with Visual Studio 2017. It has also been successfully tested with Visual Studio 2015 & 2013. The minimum version of .net is 2.0. I also tested it on Win7, Win8.1 and Windows 10 machines.
This project is in the trial phase. For the next 12 months it will be check whether this project is accepted and used by the community. AgkSharp has been compiled with AGK release 2017.12.12.

If you find AgkSharp helpful and you don’t own AppGameKit yet, please buy AppGameKit. Let TheGameCreators know if you like AgkSharp. For now AgkSharp is only for Windows available. I will look for a solution to make it available for Linux and MacOS.

What you Need?
– Download and install Visual Studio (recommended 2017).
– Download and install this Templates.
– Continue with this HowTo.
– If you are fair enough and like and use AgkSharp, then purchase AppGameKit. Without this, this project would never have been possible.

Support you can be found in the AppGameKit forum from TheGameCreators. Here is also a good AppGameKit-Documentation.

If you like this project and would like to support it I would be very happy about a donation.



Downloads

HowTo

How To Use The Templates!


Game Created with AgkSharp


Agreement
  • The user has the choice to create his games and applications with C# and/or Visual Basic. These can be distributed freely or commercially.
  • The user may not distribute the templates himself. The included library files AgkWrapper.dll and AgkSharp.dll can be distributed as a package together with the created program. These files may not be shared separately.

Copyright and License!
  • AppGameKit and the AppGameKit Logo are copyright The Game Creators Ltd.  All Rights Reserved.
  • This AgkSharp version of AppGameKit is officially licensed by The Game Creators Ltd to Marc Wollschläger.
  • AppGameKit is available for Windows, Linux and Mac. You can download it from here or,  if you have a Steam account you can download it via Steam. You have also the option to install a trial Version from AppGameKit.

How do the templates look like?

Here you can see the code from the template ‘AGKSharp-Template’

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
using System;
using AGKSharp;
using AGKCore;

namespace CSharp_TemplateSimple
{

    static class Program
    {
        /// <summary>
        /// Der Haupteinstiegspunkt für die Anwendung.
        /// </summary>
        [STAThread]
        static void Main()
        {
            Core.CreateWin32Window("AGK-Title", 640, 480, false);
            if (!Core.InitAGK())
                return;

            Agk.SetVirtualResolution(320, 480);

            // display a background
            Agk.CreateSprite(AGKSharp.Agk.LoadImage("media/background.jpg"));

            // create a sprite with ID that has no image
            Agk.CreateSprite(1, 0);
            Agk.SetSpritePosition(1, 130, 200);

            // add individual images into an animation list
            Agk.AddSpriteAnimationFrame(1, Agk.LoadImage("media/item0.png"));
            Agk.AddSpriteAnimationFrame(1, Agk.LoadImage("media/item1.png"));
            Agk.AddSpriteAnimationFrame(1, Agk.LoadImage("media/item2.png"));
            Agk.AddSpriteAnimationFrame(1, Agk.LoadImage("media/item3.png"));
            Agk.AddSpriteAnimationFrame(1, Agk.LoadImage("media/item4.png"));

            // play the sprite at 10 fps, looping, going from frame 1 to 5
            Agk.PlaySprite(1, 10, 1, 1, 5);

            while (Core.LoopAGK())
            {
                Agk.Sync();
            }

            Core.CleanUp();
        }
    }
}

 

And the same Thing in VB.NET

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
Imports AgkSharp

Module VB_Template

    Sub Main()
        Core.CreateWin32Window("AGK-Title", 640, 480, False)
        If Core.InitAGK() = False Then Exit Sub

        Agk.SetVirtualResolution(320, 480)

        ' display a background
        Agk.CreateSprite(AgkSharp.Agk.LoadImage("media/background.jpg"))

        ' create a sprite with ID that has no image
        Agk.CreateSprite(1, 0)
        Agk.SetSpritePosition(1, 130, 200)

        ' add individual images into an animation list
        Agk.AddSpriteAnimationFrame(1, Agk.LoadImage("media/item0.png"))
        Agk.AddSpriteAnimationFrame(1, Agk.LoadImage("media/item1.png"))
        Agk.AddSpriteAnimationFrame(1, Agk.LoadImage("media/item2.png"))
        Agk.AddSpriteAnimationFrame(1, Agk.LoadImage("media/item3.png"))
        Agk.AddSpriteAnimationFrame(1, Agk.LoadImage("media/item4.png"))

        ' play the sprite at 10 fps, looping, going from frame 1 to 5
        Agk.PlaySprite(1, 10, 1, 1, 5)

        While Core.LoopAGK() = True
            Agk.Sync()
        End While

        Core.CleanUp()
    End Sub

End Module