Lemmings in C#

Started by oskar12345, March 13, 2014, 08:08:50 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

namida

If it helps, you can get the Lemmix source code here. It can be a tad hard to follow; it's also written in Delphi rather than C# but if you have a decent amount of programming knowledge, you should be able to follow it. (I was able to understand some C# code mostly just based on my Delphi knowledge, at least to enough of an extent to work out how a program worked.) It might help you work out how stuff is done.

https://www.dropbox.com/s/i1gum9va0m7fr3z/PlayerSource_V28.zip

SuperLemmini and Lix are also open-source (SuperLemmini is Java and... not sure whether Lix is C or C++, but it's one of them), which may also be of help to you. NeoLemmix source can also be provided on request if you feel it'll help, though in terms of how it handles switching levels it's almost identical to regular Lemmix.
My projects
2D Lemmings: NeoLemmix (engine) | Lemmings Plus Series (level packs) | Doomsday Lemmings (level pack)
3D Lemmings: Loap (engine) | L3DEdit (level / graphics editor) | L3DUtils (replay / etc utility) | Lemmings Plus 3D (level pack)
Non-Lemmings: Commander Keen: Galaxy Reimagined (a Commander Keen fangame)

Simon

With OOP, the first idea is to have the entire play in a large class, and reinstantiate the class. Since this is unwieldy, the next idea is to have savestates as components in the game class, and go back to a savestate from the very beginning.

-- Simon

oskar12345

#17
i'm really noob with classes, i never used it. i need to study more... i understand the concepts but i need more practice..
i'll try to implement like dos only with ifs, conditions and structs that i initialize when  i change levels if it's possible

for this reason i'll upload the source code if someone can help.it'll be great.

namida

It's well worth learning them. They're not overly difficult to use, and extremely powerful.
My projects
2D Lemmings: NeoLemmix (engine) | Lemmings Plus Series (level packs) | Doomsday Lemmings (level pack)
3D Lemmings: Loap (engine) | L3DEdit (level / graphics editor) | L3DUtils (replay / etc utility) | Lemmings Plus 3D (level pack)
Non-Lemmings: Commander Keen: Galaxy Reimagined (a Commander Keen fangame)

Simon

I've skimmed the source.

You are already using a struct for the lemming. You can implement what I have suggested with all-public structs and normal functions. I.e., you don't need inheritance, you don't need virtual methods, ...

This is a general observation: A language is a toolbox, you don't need to use every tool.

For readable source, try to keep your identifier names in English. Comments in English are also preferred.

-- Simon

oskar12345

#20
here it's the beta 2. All the levels on one exe
almost finish defining all traps drawing,background parallax,rectangles for logic,logic steels,arrows...etc.
All are in structs for future addings (level images,traps,new sprites,doors,exits,whatever), only have to code some lines on the source.

https://mega.co.nz/#!zgMSXB4Y!UdULyejRbZayXq3kXMTKqj3HoszOrKZs6er02MASoTM