Jump to content

Recommended Posts

@RazvanM I don't it actually creates another Lua state, since you can still access all the normal globals.

That is also true.

Well the main.lua script is running in the Game's lua engine, so any methods you call will be sent to that engine, however luanet is linked to lua51.dll, so I assume that any calls from luanet will go to the external engine.

require "luanet" -> Goes to the Game engine, it will search the paths, load luanet.dll ----(dependency)---> load lua51.dll

luanet.import_type-> goes to lua51.dll

I really do not know, more tests are required, however it does seem to work.

Anyway if we have socket support, one more very small step towards multiplayer support.

@RazvanM I don't it actually creates another Lua state, since you can still access all the normal globals.

That is also true.

Well the main.lua script is running in the Game's lua engine, so any methods you call will be sent to that engine, however luanet is linked to lua51.dll, so I assume that any calls from luanet will go to the external engine.

require "luanet" -> Goes to the Game engine, it will search the paths, load luanet.dll ----(dependency)---> load lua51.dll

luanet.import_type-> goes to lua51.dll

I really do not know, more tests are required, however it does seem to work.

Anyway if we have socket support, one more very small step towards multiplayer support.

Yup that is the question, what impact it has. Devs add socket support so we don't go around poking in the darkness :).

If using two lua instances does cause crashsI know another way that works but it is a little more complicated and does not use lua socket. Edited by no_signal

Yup that is the question, what impact it has. Devs add socket support so we don't go around poking in the darkness :).

If using two lua instances does cause crashsI know another way that works but it is a little more complicated and does not use lua socket. Edited by no_signal

If the lua socket does cause crashsI know another way that works but it is a little more complicated and does not use lua socket.

It's not really just sockets, you need to have threading also, you can't really make a server without it. I do agree that loading another lua instance in the same process might crash the application. Especially since lua51 is built using VS2005, while the game is built using VS2008, so you will have 2 versions of the CRT in the same process, feels like walking on glass.I think it is a good ideea to create a new thread, and leave this one to the for the multiplayer functionality

If the lua socket does cause crashsI know another way that works but it is a little more complicated and does not use lua socket.

It's not really just sockets, you need to have threading also, you can't really make a server without it. I do agree that loading another lua instance in the same process might crash the application. Especially since lua51 is built using VS2005, while the game is built using VS2008, so you will have 2 versions of the CRT in the same process, feels like walking on glass.I think it is a good ideea to create a new thread, and leave this one to the for the multiplayer functionality

It's not really just sockets, you need to have threading also, you can't really make a server without it. I do agree that loading another lua instance in the same process might crash the application. Especially since lua51 is built using VS2005, while the game is built using VS2008, so you will have 2 versions of the CRT in the same process, feels like walking on glass.I think it is a good ideea to create a new thread, and leave this one to the for the multiplayer functionality

you have a pointedit:removed some stuff Edited by no_signal

It's not really just sockets, you need to have threading also, you can't really make a server without it. I do agree that loading another lua instance in the same process might crash the application. Especially since lua51 is built using VS2005, while the game is built using VS2008, so you will have 2 versions of the CRT in the same process, feels like walking on glass.I think it is a good ideea to create a new thread, and leave this one to the for the multiplayer functionality

you have a pointedit:removed some stuff Edited by no_signal

you have a pointI can tell you how to communicate between two programs without sockets.edit:you can use it to communicate with an application that handles the server

Do tell, any idea helps, I did not take the responsibility of making the multiplayer functionality, I really do not have the time for such a big project, I am on the lookout for solutions to this, and I can provide some programming help if it is needed.If an external app is needed than so be it :).

you have a pointI can tell you how to communicate between two programs without sockets.edit:you can use it to communicate with an application that handles the server

Do tell, any idea helps, I did not take the responsibility of making the multiplayer functionality, I really do not have the time for such a big project, I am on the lookout for solutions to this, and I can provide some programming help if it is needed.If an external app is needed than so be it :).

Do tell, any idea helps, I did not take the responsibility of making the multiplayer functionality, I really do not have the time for such a big project, I am on the lookout for solutions to this, and I can provide some programming help if it is needed.If an external app is needed than so be it :).

I tested it and sadly it does not work right because they removed a needed function:(

I tested it and sadly it does not work right because they removed a needed function:(

At least you tried :), basically for a server, the game should allow use of sockets and threads. The only solution right now is running with two engines in the same process, yes it can crash the game, that can be said for any mod. If we rebuild lua in 2008 we at least get rid of the CRT thorn. Currently even this solution seems superficial, you need VS 2005 runtime installed. Also for Chrome it will not work.

I have globally read everything and I think we should create another thread to really move on the main code issue, basically implementing connections into the game. From what I've seen in previous posts getting connections will be hard and unstable (?) so basically we need to ask devs to help us on that point. I saw someone talking about how the connection will be made, but the server-client connection will probably be the one chosen, like in minecraft or terraria, simply because it works much better and it avoid desyncs.I am volunteer since I know LUA basics and I have much spare time during the holidays, but I am really ignorant concerning the network coding and stuff, and I don't know where to start from in this mass of coding. However what you guys were talking about in these posts about socket and threads really interests me a lot, but I don't understand everything though.

I haven't read all of the pages yet, but I'm going to put my input and suggestions, because my brother and I would love to play on lan, or with my best friend who lives out of town. Anyhoo.

My suggestion for any modder(s) who wants to do this:

1) Look at Minecraft's files. It wasn't always multiplayer, and the game now has an internal server thing for lan (a good learning spot, I would speculate).

2) If you do decide to do it, which I hope someone will in time, to get past the sleeping, do what Minecraft does. You lay there until all people in the server are laying down. Or disable sleeping mats/tents, but they're so nice for sanity.

3) There's a really good ghost suggestion on page 4 or 5, where if one player died, they respawn as a ghost until the other player(s) build something to respawn them.

Now I will continue reading, but I would seriously love a multiplayer mod, and I only know the very basics of JavaScript, so I don't think I could do it >_<;

What happened? This thread suddenly stopped, I am highly interested in multiplayer so I want to address someone stuff.Sanity needs to be player side so other players don't see the hallucinations, the only trouble I see is the shadow hands, if a friend is near a campfire and is insane and they come they shouldn't be able to pat out the campfire for the not insane one. This is an issue I don't know how to work around. I also suggest that you use a similar style to terrarias multiplayer, make it a host and play.

Man. First reply. Multiplayer would be great an all, coop 1-2 people sounds great, in fact i can already hear my friends yelling at me to get some firewood or food, but lets get serious. Don't Starve...PvP? (That was a joke but if you saw in your head Wilson running around with a ham-bat hitting wolfgang we may be the same person) if i recall minecraft started out singleplayer and it became a smash hit. just something to consider, i find modding and coding impossible as im a simple Download and play person. but were looking at you modders. Maybe even kevin can give you a job!

I believe someone's already made a multiplayer mod. Two people, actually. Their names are [MENTION=15605]futaradragon[/MENTION] and [MENTION=24606]chromiumboy[/MENTION], and they are the messiahs. The one by Chromiumboy is meant for crowded keyboard multiplayer (Although how that works is beyond me when DS can only support having 1 mouse plugged in)And, honestly, I know this is off-topic, but I think that a modded in multiplayer would be better in some situations. After all, as many have said, there is a mammoth-sized amount of things that have to be balanced for it to work, and someone who is an active member of the community and has more time to venture in it would be able to get opinions from multiple people on how this would work.Also, I have a question for the devs: If someone ever was to fully make a mod that worked perfectly (Hypothetically), would you implement it?

How would playing with friends work? Would they join your game that you're hosting? We've adressed sanity and it being clientside, but could one person disconnect and the other keep playing? would the other person still get the exp and the days? if winter came for one player would the other have winter as well? on a different note I think it would be pretty cool if the dark arms we saw grab wilson in the trailer grab your friend if he goes insane and gets killed. also, it also conflicts with woodies curse when he falls asleep and wakes up the next day, same with wickerbottoms insomnia. it just seems like dont starve has alot of things that would need to be changed in order to become Multi-Player.

And there would be Problems with traps. unless it activated for the both of you. but thats somewhat unfair. If someone would make MultiPlayer there should be a tab with your partners/teams hunger, sanity, and life, maybe across the top or available to be seen when you hit the map tab.

Edited by Colloger
Mistake

I'd think that each player would take a vote on whether or not to skip the day whenever one of them tries to sleep. The other players will sleep on the ground, causing no effect other than to skip the day.Also, a concept for Woodie's power: How about the players have to "Revive" each other when they die, like in most co-op based games? And, when Woodie comes out of the werebeaver mode, he is considered "Dead", and when the player revives him, it skips to the next day?

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...