Lemmingssdl (Networked)


fusion_power said:
Tried the latest Version. Looks fine again. I've found some minor things...maybe.
Here, Screenshot:
lemminginwall.png

You can get into a wall if you start building Stairs close to a wall and continue with this.

I've also noticed, that the "mouseover" over the Lemmings which usualy shows the type of Lemming doesn't work with the Stopper-Lemming (I think)

Game is still a little bit to fast (or I am to slow, could be :lol: )

Scrolling could be faster, maybe with Arrow-Key support onto the PC? So Mouse-Scrolling still works as it is and with additional left/right Arrow, it could scroll much faster.

Had the Original Lemmings also Scrolling within 1-Screen-Levels? Can't remember ^_^

Good call on the 'building into walls' - I will look into that.

Timing is a bitch, the only way of testing that is UAE (actually I _could_ get my old Amiga down from the loft...only in B/W though - my modulator died!!!)

I'm pretty sure the amiga could scroll on single screen levels, again checking is required...

Agreed on scrolling speed as well :)

Thanks for your help. Though, I guess anyone who's interested in playing this should be doing the thanking - mind you, that probably includes everyone who's helping to test it!
 
Last edited by a moderator:
Hey everyone, just wanted to try this and downloaded the win32 version. But it crashes right after i click on 1player. It also crashes after selecting server in 2 playermode.
I use WinXP Sp3 Prof.. Is there anything I have to do before running the game?
 
mcobit said:
Hey everyone, just wanted to try this and downloaded the win32 version. But it crashes right after i click on 1player. It also crashes after selecting server in 2 playermode.
I use WinXP Sp3 Prof.. Is there anything I have to do before running the game?

Hmmm, strange. It sounds like it's trying to load the level and failing for some reason. There should be a console window, can you tell me what the last messages when it crashes?

You must have the 'data' directory otherwise you wouldn't see the title-screen. Can you ensure you have the directory data/levels/1player , and all the .lds files inside it please?

I have XP Sp3 at home, I will try it tonight but please try those things for me and get back to me.
ch
 
Last edited by a moderator:
mcobit said:
Hey everyone, just wanted to try this and downloaded the win32 version. But it crashes right after i click on 1player. It also crashes after selecting server in 2 playermode.
I use WinXP Sp3 Prof.. Is there anything I have to do before running the game?
It no longer crashed for me, since I've activated the compatibility-Options in the programm properties. However, this was for Vista. ^^"""
 
Last edited by a moderator:
I have all the levels and files. they are arranged in subfolders.
the last output of the console is:

image5eb.jpg


When it crashes it outputs some more, but both windows close too fast to read it.
 
fusion_power said:
mcobit said:
Hey everyone, just wanted to try this and downloaded the win32 version. But it crashes right after i click on 1player. It also crashes after selecting server in 2 playermode.
I use WinXP Sp3 Prof.. Is there anything I have to do before running the game?
It no longer crashed for me, since I've activated the compatibility-Options in the programm properties. However, this was for Vista. ^^"""

Yes, now I got it. It doesn't crash if I set the compatibility optio to win 2000! Win 95 doesn't work.
 
Last edited by a moderator:
mcobit said:
fusion_power said:
mcobit said:
Hey everyone, just wanted to try this and downloaded the win32 version. But it crashes right after i click on 1player. It also crashes after selecting server in 2 playermode.
I use WinXP Sp3 Prof.. Is there anything I have to do before running the game?
It no longer crashed for me, since I've activated the compatibility-Options in the programm properties. However, this was for Vista. ^^"""

Yes, now I got it. It doesn't crash if I set the compatibility optio to win 2000! Win 95 doesn't work.

I wish I undertood why...

Perhaps it's because I built it under Vista? I can't see why though as I don't think it uses any windows libraries (I use MiniGW and SDL only afaict)

Can anyone shed some light on how to make an SDL app more compatable?
 
Last edited by a moderator:
I also found a little bug:

image2eb.jpg


When the climber was over the Block and bashed its way back, he left some pixels (red arrow).
The other Lemmings can't get past and no Lemming can climb over the Block again, so the level is unsolveable.
 
If anyone wants to do some good 2player mode testing, join our lemmings irc channel and we can do some testing
(btw you will need to download hamachi , which makes a virtual LAN between our computers to do this)

irc.enterthegame.com
#lemmings

I idle in that chat channel 24/7 and dont close the program, other guys just come on at random times, but its definitely been useful so far.
 
I'd be up for two-player test games if I can get the Windows version working -- I have yet to try the newest version. I go to the IRC channel RubiX has mentioned. Would be happy to see some of you people there. ;-) The channel is mostly empty with only RubiX sitting around there, though. You might need some patience.

About how I do the networking in L++: Every player maintains his own replay of the current game. Replays contain information about when a player did something, like selecting a skill, clicking a lemming, nuking the level. Each game is fully determined by the contents of a replay. Thus, I only send such changes. Everybody else inserts it into their replay, goes back to an earlier (silently saved) state of the game and recomputes the current situation.

This means zero lag and perfect pixel precision for the clicking player. Everybody else will usually see an opponent's lemming jump back a few frames, having started a different activity. This has not appeared to hamper the game experience, and it feels pretty nice for everybody. The cost is that I have to keep several saved states in the memory on every machine, and a state includes the full terrain bitmap among other things. With many players, the frequent recalculation can lead to small, but noticable slowdowns.

See you all in #lemmings!

-- Simon
 
I got home and tried the newest Windows version on Win XP. I got the same problem as some people above.

It loads into the menu fine, both fullscreen and windowed. I can hear the music. However, it crashes when I select 1-player, or when I select to be server, or when I've entered an IP address and clicked to continue. The New Level option doesn't crash.

These are the last lines before the crash in singleplayer:

Code:
In game LoadLevel
getting level at 0loading level: data/levels/1player/standard/Lems A - Fun/v07_01_Just_dig.lds
currentLevel is Not Null at least
getting level at 0adding unin fram e 0 tot 6
The directory structure and the level file exist.

These are the last lines before crashing during the multiplayer set-up:

Code:
heres okay 1
heres okay 2
heres okay 2
setting level 0
adding unin fram e 0 tot 6
adding unin fram e 1 tot 6
adding unin fram e 2 tot 14
adding unin fram e 3 tot 14
Hope this helps a bit.

It does work perfectly when I select the compatibility mode for Win 2000, as mccobit suggested.

-- Simon
 
mcobit said:
I have all the levels and files. they are arranged in subfolders.
the last output of the console is:



When it crashes it outputs some more, but both windows close too fast to read it.
Try running it from the cmd prompt to leave the window open after the crash
 
Last edited by a moderator:
Hi Miner, me and Simon did some tests today with network play.
So port 2001 is where it communicates on, and Simon forwarded that port and set himself as server, we connected normally without hamachi, no problems there. The game ran about 3FPS though, was unplayable at that speed. This must be distance related, as when me and my brother were playing over hamachi, we are about 80km apart and did notice a small lag difference but was totally playable between us then.

Simon bashed through to get to his end still, and we notice that I was gaining lemmings on the bar instead of him (definitely was his exit they were jumping into) So something has changed since another version with the exiting.

We tried a game on Hamachi to see if there was a speed difference but couldnt even connect this way now, very puzzling o_O but that doesnt really matter as straight IP connection does work on port:2001 anyway.

Join us back on IRC when you can.

Thanks!
 
Yep, it works! Port 2001 over TCP for anyone that wishes to try. :) Best if you are located close together, not on opposite ends of the world like Rubix and me.

Rubix and me have played two-player Level 2, in case the false-exit bug depends on the level. I've loaded the original two-player levels from the game myself as well, and I didn't see a pattern about which exit object belongs to which player.

-- Simon
 
Simon N said:
Yep, it works! Port 2001 over TCP for anyone that wishes to try. :) Best if you are located close together, not on opposite ends of the world like Rubix and me.

Rubix and me have played two-player Level 2, in case the false-exit bug depends on the level. I've loaded the original two-player levels from the game myself as well, and I didn't see a pattern about which exit object belongs to which player.

-- Simon


Very interesting. I know why my initial 2-player test didn't work (me and a friend of mine about 100 miles away) - _I_ wasn't forwarding port 2001 from my server/router through to my PC. I spent (lunchtime obviously!) today writing an unnecessarily long Makefile and built LemmingsSDL over SSH on my server and ran it - Shields Up says port 2001 is open.

I don't really know enough about networking to begin to speculate on the reason for such a low framerate. I do send a 2-byte packet each frame which results in (according to BWM on my server) a transfer rate of about 3.5 K/s. Broadband should have no problem with this but for some reason it does?

@Simon: it's fascinating how we both approached essentially the same problem from such different angles. I did consider a similar approach to yours but thought it would be too complicated to implement and result in an odd gaming experience but as I discovered last night - it works great! I would still like to understand why my method appears to be so slow though as it's very simple to implement.

Must go now, as out youngest needs bathing!

Will be on IRC later :)
 
Last edited by a moderator:
I don't if anyone is still interested in this but here goes anyway:

New version changes:

Bashers bash better
Builders don't get stuck as much (or at all?)
Homes should be correct in 2 player mode.
Mouse pointer now runs at 50fps whilst game still runs at ~25* (this was a BIG change)
Hopefully fixed some Vista issues (NULLing something, then checking != NULL)
Lot's of other stuff...

The big one though, is I've implemented something similar to L++. The reason two player games were slow was due to the ping time between machine which is why it worked fine on a LAN. So, I now package up a few frames worth and send them off all at once, like L++ there is some visible weirdness but it's not _that_ noticable. I haven't tried it over the internet yet but in theory it should work. It defaults to 4 frames right now but this can be set with the buffer command line param. Currently both client and server need to set this the same (lame, yes)

//TODO:

Automatically set buffer
Figure out exact Amiga speed!!!
Save one player levels-done state (a little marker to show levels completed, with an arrow to goto next screen)
Everything you guys (might) tell me!
Package all the files up into one.
Set up a Pandora build environment and build for that!
 
Hello again. I just noticed the message on your site that says the music in Windows is broken! This may or may not still be true. It works fine on my machine in Windows 7, but I apologize for not letting you know about my fix sooner. It's a simple one. Using the latest version of SDL (1.2.14), the following line needs to be added to MainForm.cpp, right before calling "Mix_VolumeMusic(50);" for music to work correctly:
Code:
Mix_Init(MIX_INIT_MOD|MIX_INIT_MP3|MIX_INIT_OGG);
Also, it's probably a good idea to add the following in TitleScreenMenu.cpp after every occurrence of "Mix_FadeOutMusic(1000);":
Code:
Mix_FreeMusic(Mix);
However, this is a blocking function and will wait for the fade to complete which causes a bit of a hiccup. I haven't had a chance to look into how to improve this. Sorry!

Hope this helps!
 
Miner49er said:
I don't if anyone is still interested in this but here goes anyway:


Im sure there's huge interest out there for the Amiga clone, for those who originally played it on amiga, no other system ever felt as good for lemmings. Keep it coming :D

I was busy holding a LAN at my place last few days, but can help test things if needed again tommorow, i'll be around on IRC most of the day im sure.

Thx
 
Last edited by a moderator:
Rotsiser Mho said:
Hello again. I just noticed the message on your site that says the music in Windows is broken! This may or may not still be true. It works fine on my machine in Windows 7, but I apologize for not letting you know about my fix sooner. It's a simple one. Using the latest version of SDL (1.2.14), the following line needs to be added to MainForm.cpp, right before calling "Mix_VolumeMusic(50);" for music to work correctly:
Code:
Mix_Init(MIX_INIT_MOD|MIX_INIT_MP3|MIX_INIT_OGG);
Also, it's probably a good idea to add the following in TitleScreenMenu.cpp after every occurrence of "Mix_FadeOutMusic(1000);":
Code:
Mix_FreeMusic(Mix);
However, this is a blocking function and will wait for the fade to complete which causes a bit of a hiccup. I haven't had a chance to look into how to improve this. Sorry!

Hope this helps!

re: Mix_FreeMusic(Mix)
Aah, this is very useful indeed. I guess I may have to introduce threads to the program and have music start/stop on a different thread. So far, I haven't needed threads at all...

Do I have to free wavs with an SDL function or just delete()...or neither? I ask this as I am still getting a Seg Fault in windows when the program ends.
 
Last edited by a moderator:
Miner49er said:
re: Mix_FreeMusic(Mix)Aah, this is very useful indeed. I guess I may have to introduce threads to the program and have music start/stop on a different thread. So far, I haven't needed threads at all...Do I have to free wavs with an SDL function or just delete()...or neither? I ask this as I am still getting a Seg Fault in windows when the program ends.

I would imagine one is supposed to use Mix_FreeChunk(chunk) on those sound effects you load, but I'd be surprised if failing to do this was causing your seg. fault.
Also, there's a convenient way to free the music without resorting to using threads: Mix_HookMusicFinished. Just set that up as a callback to Mix_FreeMusic(Mix). See here.
 
Last edited by a moderator:
Back
Top