Online games yet?

General discussion about LÖVE, Lua, game development, puns, and unicorns.
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Online games yet?

Post by bartbes »

Anyone creating online games yet? As we should have one epic Löve game and spread it over the entire world, creating Löve domination! :twisted:

Seriously though, we should create one game to let people know there is something like Löve. And online games tend to bring the world together...
User avatar
TsT
Party member
Posts: 161
Joined: Thu Sep 25, 2008 7:04 pm
Location: France
Contact:

Re: Online games yet?

Post by TsT »

Yes :D

I use love as network client (client only, not listening part) for our futur MMO game (nothing officially released yet, will be under free licence).
It will be played by turn (1 turn will equal between 1 and 10 minutes) then our game don't need hight network rate.
I'm interesting to share network experience with love, because we don't have tutorial about network support.
I will release my network code soon (i'm using luasocket as told here).

Regards,
My projects current projects : dragoon-framework (includes lua-newmodule, lua-provide, lovemodular, , classcommons2, and more ...)
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: Online games yet?

Post by bartbes »

Can't wait to play it :D

Anyway, I was thinking about creating a library myself (as I'm just too lazy to create a game myself :D), however I think I'll wait to see what your code is going to look like (I could already implement a host though).

Löve is really growing up!
User avatar
TsT
Party member
Posts: 161
Joined: Thu Sep 25, 2008 7:04 pm
Location: France
Contact:

Re: Online games yet?

Post by TsT »

You must... because my game is currently not playable at all !
I can provide a alpha screenshot previous if you want :D
But I'm currently working about rewriting lot of technical part (nothing visible on a screenshot)


About my network part ... For now,
I'm using only one socket always keep opened, open at start, close before quit.
I'm checking if new data was available on the socket every 5 seconds.
I was setup the socket timeout to 0.1s.
My projects current projects : dragoon-framework (includes lua-newmodule, lua-provide, lovemodular, , classcommons2, and more ...)
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: Online games yet?

Post by bartbes »

I'd like to know what the users expect from the lib, and especially what approach (e.g. send tables) and how to implement them (encode them to strings?). So if you (the reader) know something, just post, I'll try to use the best ideas.
I'm trying to create a Löve/lua only, and maybe implement things (like threading) in c++ in some later state, but only if that is really needed.


BTW My computer is needing serious repairs at the moment, I can access only half of my partitions, so I won't have full capabilities (Löve is on one of the readable partitions, don't worry).

EDIT: Fixed that
Last edited by bartbes on Wed Oct 22, 2008 9:07 am, edited 1 time in total.
User avatar
TsT
Party member
Posts: 161
Joined: Thu Sep 25, 2008 7:04 pm
Location: France
Contact:

Re: Online games yet?

Post by TsT »

At first a screenshot of actual client :
Image

At second, my begin of network "lib" (built yesterday) :
network.lua
j2h network lib v0.1.0 (r240)
(3.79 KiB) Downloaded 256 times
EDIT: newer version here

At third, a small smaple of code to illustrate how I use it

Code: Select all

function load()
	love.filesystem.require( "lib/network.lua" );
	config.host = "myhost.domain.com";
	config.port = 1234;

	socket = require("socket");
	network = Network:new("j2h-network");
	network:setup(config.host, config.port);
	network:enable()
	network:send();
end

function j2h_quit()
	network:disable();
	love.system.exit()
end


function update(dt)
	network:update(dt);
end

Last edited by TsT on Sun Oct 26, 2008 3:34 pm, edited 1 time in total.
My projects current projects : dragoon-framework (includes lua-newmodule, lua-provide, lovemodular, , classcommons2, and more ...)
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: Online games yet?

Post by bartbes »

I've been looking through your code and saw that you're using TCP, though it's easy, games normally use UDP, for the lack of having to be connected.
This makes coding the server (a tiny bit) harder, but greatly simplifies the server, as all it has to do is create a table, and loop through it, using just 1 connection.

And what about the tick? Is it a keep-alive, or a request for data?

However, it's still a great start!

I'll start working on my lib now, I'll post soon.

Please post suggestions!

EDIT:
Made this so far (~30 mins ;))
Client.lua
(2.34 KiB) Downloaded 244 times
Feedback!
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: Online games yet?

Post by bartbes »

I'll start a new topic in Projects.
User avatar
TsT
Party member
Posts: 161
Joined: Thu Sep 25, 2008 7:04 pm
Location: France
Contact:

Re: Online games yet?

Post by TsT »

Good idea, I will do too at first official release.
My projects current projects : dragoon-framework (includes lua-newmodule, lua-provide, lovemodular, , classcommons2, and more ...)
User avatar
Nexion
Prole
Posts: 46
Joined: Fri Sep 05, 2008 1:40 pm

Re: Online games yet?

Post by Nexion »

TsT, does your game support true server-client games, or is it only LAN?

(--Sidenote: 1000th post on the general forum!!!!)
Post Reply

Who is online

Users browsing this forum: No registered users and 39 guests