Gamestudio Links
Zorro Links
Newest Posts
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
M1 Oversampling
by 11honza11. 04/30/24 08:16
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (AndrewAMD), 1,135 guests, and 2 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
Any Tutorial for HTTP Functions in Lite-C? Simple Web functions? #442873
07/05/14 10:01
07/05/14 10:01
Joined: Jun 2014
Posts: 97
Lagos, Nigeria
T
tolu619 Offline OP
Junior Member
tolu619  Offline OP
Junior Member
T

Joined: Jun 2014
Posts: 97
Lagos, Nigeria
I googled "http functions tutorial in lite-c" but didn't get anything useful. Tried yahoo and bing too. I've seen from the manual that lite-c has functions such as http_proxy and http_sendpost but I can't find any tutorials to show me how and how not to use them. My game has no online multiplayer but I need it to be able to communicate with my website to check for news, updates and allow the purchase of add-on content.

Re: Any Tutorial for HTTP Functions in Lite-C? Simple Web functions? [Re: tolu619] #442876
07/05/14 10:25
07/05/14 10:25
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline
Senior Expert
Superku  Offline
Senior Expert

Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
http://www.conitec.net/beta/http.htm

As you can see this is a "Pro" only feature. You will either need to upgrade to Pro or use/ buy some other multiplayer/ internet plug-in (ANet or whatever it is called, or GSTnet (?)).


"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Check out my new game: Pogostuck: Rage With Your Friends
Re: Any Tutorial for HTTP Functions in Lite-C? Simple Web functions? [Re: Superku] #442880
07/05/14 10:46
07/05/14 10:46
Joined: Jun 2014
Posts: 97
Lagos, Nigeria
T
tolu619 Offline OP
Junior Member
tolu619  Offline OP
Junior Member
T

Joined: Jun 2014
Posts: 97
Lagos, Nigeria
Wow. Ouch. My commercial editions still has limitations in such a major area?

Re: Any Tutorial for HTTP Functions in Lite-C? Simple Web functions? [Re: tolu619] #442883
07/05/14 10:55
07/05/14 10:55
Joined: Dec 2011
Posts: 1,823
Netherlands
Reconnoiter Offline
Serious User
Reconnoiter  Offline
Serious User

Joined: Dec 2011
Posts: 1,823
Netherlands
Sadly yes, they really should add those things to commercial edition. Since from the 'features list' by Conitec, it looks like commercial has everything for an average online mp game. But that is misleading, because as you said not the necessary functions to communicate with websites (for e.g. a server browser, a very important feature for mp games).

Last edited by Reconnoiter; 07/05/14 10:56.
Re: Any Tutorial for HTTP Functions in Lite-C? Simple Web functions? [Re: Reconnoiter] #442973
07/07/14 07:12
07/07/14 07:12
Joined: Nov 2012
Posts: 62
Istanbul
T
Talemon Offline
Junior Member
Talemon  Offline
Junior Member
T

Joined: Nov 2012
Posts: 62
Istanbul
I'm not sure what version has what limitations but you can easily integrate cURL into the engine. I just modified the libcurl source to include engine bindings and i call its functions using curl guides.
check it out at: http://curl.haxx.se/libcurl/

The engine also uses libcurl for its http functions anyway, acknet is built with it statically.

I can share the project if you need it when I have some time.

Re: Any Tutorial for HTTP Functions in Lite-C? Simple Web functions? [Re: Talemon] #442983
07/07/14 11:21
07/07/14 11:21
Joined: Dec 2011
Posts: 1,823
Netherlands
Reconnoiter Offline
Serious User
Reconnoiter  Offline
Serious User

Joined: Dec 2011
Posts: 1,823
Netherlands
Yeah great Talemon, I would be interested in that laugh.

Re: Any Tutorial for HTTP Functions in Lite-C? Simple Web functions? [Re: Talemon] #443106
07/09/14 13:45
07/09/14 13:45
Joined: Jun 2014
Posts: 97
Lagos, Nigeria
T
tolu619 Offline OP
Junior Member
tolu619  Offline OP
Junior Member
T

Joined: Jun 2014
Posts: 97
Lagos, Nigeria
Originally Posted By: Talemon
I'm not sure what version has what limitations but you can easily integrate cURL into the engine. I just modified the libcurl source to include engine bindings and i call its functions using curl guides.
check it out at: http://curl.haxx.se/libcurl/

The engine also uses libcurl for its http functions anyway, acknet is built with it statically.

I can share the project if you need it when I have some time.


Oh, please do. You'll make the world a better place!

Re: Any Tutorial for HTTP Functions in Lite-C? Simple Web functions? [Re: tolu619] #443146
07/10/14 06:45
07/10/14 06:45
Joined: Nov 2012
Posts: 62
Istanbul
T
Talemon Offline
Junior Member
Talemon  Offline
Junior Member
T

Joined: Nov 2012
Posts: 62
Istanbul
Hey guys, I'm not sure about the legality of distributing the libcurl project here so I'm just going to explain what you need to do:

1. Download libcurl source code( http://curl.haxx.se/download.html ) and extract it somewhere
2. Download CMake and use it to create an MS Visual Studio solution of libcurl
3. Copy and add these files from GStudio8\sdk_plugin folder to the libcurl project:
- adll.cpp
- adll.h
- afuncs.h
- atypes.h
- avars.h
- cmd.h
4. Copy adll.lib to somewhere accessible from the project and make the project link against it by adding it to the "Additional Dependencies" at Project Properties/Linker/Input
5. Add these two files to the project as well:

main.h
Code:
#include<Windows.h>
#define DLL_USE
#include "gstudio/adll.h" // depends on where you placed adll.h



main.c
Code:
#include "main.h"

BOOL APIENTRY DllMain( HANDLE hModule,	DWORD  ul_reason_for_call,	LPVOID lpReserved )
{
	switch (ul_reason_for_call)
	{
	case DLL_PROCESS_ATTACH:
	case DLL_THREAD_ATTACH:
	case DLL_THREAD_DETACH:
	case DLL_PROCESS_DETACH:
		break;
	}
	// make sure the library is linked
	engine_bind();
	return TRUE;
}



If everything goes well, you'll get a libcurl.dll you can plug into the engine! You'll need to define the functions you use in you game code and also you'll need to derive some of the #defines from the libcurl source code because they're defined via a macro.

Here is the header file I've prepared to use libcurl in our game code:
http://pastebin.com/n9m8mqag


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