Gamestudio Links
Zorro Links
Newest Posts
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
M1 Oversampling
by 11honza11. 04/30/24 08:16
Trading Journey
by howardR. 04/28/24 09:55
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (7th_zorro, AndrewAMD), 911 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
C# Libraries for Gamestudio / general use #390042
12/21/11 20:45
12/21/11 20:45
Joined: Nov 2007
Posts: 2,568
Germany, BW, Stuttgart
MasterQ32 Offline OP
Expert
MasterQ32  Offline OP
Expert

Joined: Nov 2007
Posts: 2,568
Germany, BW, Stuttgart
Hey Guys!

I'm developing some cool new libraries for .NET framework, especially for C#.
Maybe some of you also use the great AcknexWrapper from Matthias Auer, so i thought i ask if someone need some special library for GS development.

I'm writing on my own C# framework with cool stuff like easy networking a la WCF and also on multitouch stuff.

A simple sample of my networking library:
Click to reveal..
serverside code:
Code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using Queissner.Framework.QNet;

namespace TestServer
{
	public class Server
	{
		[QNetMethod]
		public void WriteLine(string line)
		{
			Console.WriteLine(line);
		}

		[QNetMethod(UseThread=true)]
		public int Add5(int i)
		{
			Console.WriteLine("Adding 5 to " + i + " = " + (i + 5));
			return i + 5;
		}

		[QNetMethod]
		public int Divide(int a, int b)
		{
			Console.WriteLine("Divide " + a + " / " + b);
			return a / b;
		}

		static void Main(string[] args)
		{
			Server srv = new Server();
			QNetServer<Server> server = new QNetServer<Server>(1234, srv);
			server.CallThreadSafe = true;
			server.ClientConnected += new ConnectionDelegate(server_ClientConnected);
			server.Start(2);
			while (server.Connected)
			{
				server.DoEvents();
				Thread.Sleep(10);
			}
		}

		static void server_ClientConnected(object sender)
		{
			Console.WriteLine("Client connected!");
		}
	}
}


clientside code:
Code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using Queissner.Framework.QNet;

namespace TestClient
{
	public class Client
	{
		[QNetMethod]
		public void Add5Callback(int iResult)
		{
			Console.WriteLine("Add5 returned " + iResult);
		}

		[QNetMethod]
		public void DivideCallback(int iResult)
		{
			Console.WriteLine("Divide returned " + iResult);
		}

		static void Main(string[] args)
		{
			Client client = new Client();

			QNetClient<Client> qnet = new QNetClient<Client>(client);
			qnet.CallThreadSafe = false;
			qnet.ExceptionThrown += new ExceptionThrownDelegate(qnet_ExceptionThrown);
			qnet.Start("localhost", 1234);
			qnet.WaitForConnection();

			Console.WriteLine("WriteLine(\"Hello World!\");");
			qnet.Invoke("WriteLine", "Hello World!");

			Thread.Sleep(250);

			Console.WriteLine("Add5(37);");
			qnet.Invoke("Add5", 37);

			Console.WriteLine("Divide(5,0);");
			qnet.Invoke("Divide", 5, 0);

			Console.ReadLine();
			qnet.Stop();
		}

		static void qnet_ExceptionThrown(object sender, Exception exception)
		{
			Console.WriteLine(exception);
		}
	}
}


As you can see you can call any function with any parameter as far as the parameter is marked as "Serializable".

Planned features of QNet:
- Compression
- Securing network data
- Async and Sync method calls (non-blocking / blocking)
- Sending of "raw" data

I'm starting now with the multitouch library. Planned features of QTouch are:
- Extension of default System.Windows.Form with multitouch events
- Custom event listener on any other form (eg. the Gamestudio Window)
- Gestures
- Tracking of touch points

Other libraries i have mind:
- Simple database access without knowing the database structure (Simply read and write classes into the database)
- UDP stuff (image transfer, server/client, ...)

If you want to test a library of my little framework, you can send me pm.
Then i'm sending you a demo version of the framework.

Please give me some feedback, your opinion and maybe some other stuff you want to see in such a framework.

Greetz Felix Queißner


Visit my site: www.masterq32.de
Re: C# Libraries for Gamestudio / general use [Re: MasterQ32] #397674
03/22/12 04:13
03/22/12 04:13
Joined: Aug 2003
Posts: 902
Van Buren, Ar
Gordon Offline
User
Gordon  Offline
User

Joined: Aug 2003
Posts: 902
Van Buren, Ar
With your library how easy is it to synchronize threads? And for that matter start threads... I have developed a large library of light C routines and I use wait a lot shocked But I also miss a real debugger and real macros... I want to move my library to probably c for various reasons. but if your library is open source then I could learn from it :-) and maybe offer a few suggestions :-)

gordon


Our new web site:Westmarch Studios

Moderated by  TWO 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1