Author Topic: Tech Mechs - Colorful Arty's Senior Project  (Read 14313 times)

0 Members and 1 Guest are viewing this topic.

Offline Simon

  • Administrator
  • Posts: 3860
    • View Profile
    • Lix
Re: Tech Mechs - Colorful Arty's Senior Project
« Reply #15 on: January 30, 2018, 06:12:58 PM »
The main module is getting rather long.

You have these lists of variables that are grouped by comment, e.g., # level variables. And you have behavior associated closely with these variables, executeGameFrame and handleGameEvents, whereas these variables are never used outside of these functions.

Consider creating a class from these data and behaviors, and move this code into a separate module. # level variables is already a hint about what abstraction this class will capture.



Some comments can be replaced with better identifier names. E.g.,

    # handle the user-related events like mouse clicks or keyboard presses
    handleGameEvents()


Why do you explain what the called function does when it's called with zero arguments? If you don't believe that handleGameEvents() is clear enough, rename handleGameEvents such that it will be clear.

If you've moved this code to a class that captures the abstraction of playing a single level, then this will probably be a method of that class. This is excellent for naming methods, you can omit "Game" from the method name because the class will already tell us that this method deals only with playing the game.



TechMech.wasClicked assumes arguments to be map coordinates, but it's called with mouse coordinates. As a result, once you scroll such that screen's top-left no longer coincides with map's top-left, we cannot click exactly on mechs to assign skills.

Which of the two modules, main or techmech, has the bug? Is it possible to prevent calling the method with wrong data (ideally static error, next best is runtime throws)? If it's not possible to prevent the bug by design, is it at least possible to define the method such that, once we call it with wrong data, the calling code looks wrong? Or is convention really the only solution, in which case we should document it glaringly?

-- Simon

Offline Colorful Arty

  • Posts: 814
  • You are so loved!
    • View Profile
    • Colorful Arty's Youtube Page
Re: Tech Mechs - Colorful Arty's Senior Project
« Reply #16 on: January 30, 2018, 08:49:53 PM »
Excellent catch on the mouse clicking bug; I will make patching that top priority right now.

I agree the main.py file is getting a bit long. Some of this is unavoidable, as the SCREEN variable, and any variables relating to the graphics library initializer must be called by the main file. I may move some of these to a different file, but the problem is getting access to these important game/level variables quickly from the main file.
My Youtube channel where I let's play games with family-friendly commentary:
https://www.youtube.com/channel/UCiRPZ5j87ft_clSRLFCESQA

My Twitch channel: https://www.twitch.tv/colorfularty

My levelpack: SubLems
For New formats NeoLemmix: https://www.lemmingsforums.net/index.php?topic=4942.0
For Old formats NeoLemmix: http://www.lemmingsforums.net/index.php?topic=2787.0
For SuperLemmini: http://www.lemmingsforums.net/index.php?topic=2704.0

My levelpack: ArtLems
For New formats NeoLemmix: https://www.lemmingsforums.net/index.php?topic=4583.0

Offline Colorful Arty

  • Posts: 814
  • You are so loved!
    • View Profile
    • Colorful Arty's Youtube Page
Re: Tech Mechs - Colorful Arty's Senior Project
« Reply #17 on: February 01, 2018, 04:06:21 AM »
I finally got a walker animation that looks fluid and pleasing! I'm quite proud of it! :D

My Youtube channel where I let's play games with family-friendly commentary:
https://www.youtube.com/channel/UCiRPZ5j87ft_clSRLFCESQA

My Twitch channel: https://www.twitch.tv/colorfularty

My levelpack: SubLems
For New formats NeoLemmix: https://www.lemmingsforums.net/index.php?topic=4942.0
For Old formats NeoLemmix: http://www.lemmingsforums.net/index.php?topic=2787.0
For SuperLemmini: http://www.lemmingsforums.net/index.php?topic=2704.0

My levelpack: ArtLems
For New formats NeoLemmix: https://www.lemmingsforums.net/index.php?topic=4583.0

Offline Flopsy

  • Global Moderator
  • Posts: 953
  • Lix Nerd
    • View Profile
Re: Tech Mechs - Colorful Arty's Senior Project
« Reply #18 on: February 01, 2018, 09:10:44 AM »
Awesome, looks like it will walk faster than Lemmings, Lemmings have evolved!

Good work Arty, keep it up :)

Offline Colorful Arty

  • Posts: 814
  • You are so loved!
    • View Profile
    • Colorful Arty's Youtube Page
Re: Tech Mechs - Colorful Arty's Senior Project
« Reply #19 on: February 08, 2018, 03:38:44 AM »
Just updated the "game". Lot of bug fixes and animations added. I also added a poll for people to vote on what I should make next.
My Youtube channel where I let's play games with family-friendly commentary:
https://www.youtube.com/channel/UCiRPZ5j87ft_clSRLFCESQA

My Twitch channel: https://www.twitch.tv/colorfularty

My levelpack: SubLems
For New formats NeoLemmix: https://www.lemmingsforums.net/index.php?topic=4942.0
For Old formats NeoLemmix: http://www.lemmingsforums.net/index.php?topic=2787.0
For SuperLemmini: http://www.lemmingsforums.net/index.php?topic=2704.0

My levelpack: ArtLems
For New formats NeoLemmix: https://www.lemmingsforums.net/index.php?topic=4583.0

Offline Colorful Arty

  • Posts: 814
  • You are so loved!
    • View Profile
    • Colorful Arty's Youtube Page
Re: Tech Mechs - Colorful Arty's Senior Project
« Reply #20 on: February 16, 2018, 04:17:48 PM »
Latest version is on github. Caution signs and land mines are now skills. The test level now uses lix graphics, and there is a title screen.
My Youtube channel where I let's play games with family-friendly commentary:
https://www.youtube.com/channel/UCiRPZ5j87ft_clSRLFCESQA

My Twitch channel: https://www.twitch.tv/colorfularty

My levelpack: SubLems
For New formats NeoLemmix: https://www.lemmingsforums.net/index.php?topic=4942.0
For Old formats NeoLemmix: http://www.lemmingsforums.net/index.php?topic=2787.0
For SuperLemmini: http://www.lemmingsforums.net/index.php?topic=2704.0

My levelpack: ArtLems
For New formats NeoLemmix: https://www.lemmingsforums.net/index.php?topic=4583.0

Offline Colorful Arty

  • Posts: 814
  • You are so loved!
    • View Profile
    • Colorful Arty's Youtube Page
Re: Tech Mechs - Colorful Arty's Senior Project
« Reply #21 on: March 27, 2018, 09:49:10 PM »
I know progress on this has been slow for a month now, but the reason for this is not that I wasn't working on it, but because I didn't want to push the level editor until it was functionally complete! You can now create your own levels, save them as .txt files and then play them! My Lego tileset has also been included in the game now!

My next step will be working towards getting basic wireless multiplayer to work as well as increasing level editor intuitiveness and maybe even implementing more skills!
My Youtube channel where I let's play games with family-friendly commentary:
https://www.youtube.com/channel/UCiRPZ5j87ft_clSRLFCESQA

My Twitch channel: https://www.twitch.tv/colorfularty

My levelpack: SubLems
For New formats NeoLemmix: https://www.lemmingsforums.net/index.php?topic=4942.0
For Old formats NeoLemmix: http://www.lemmingsforums.net/index.php?topic=2787.0
For SuperLemmini: http://www.lemmingsforums.net/index.php?topic=2704.0

My levelpack: ArtLems
For New formats NeoLemmix: https://www.lemmingsforums.net/index.php?topic=4583.0

Offline Forestidia86

  • Posts: 721
  • inactive
    • View Profile
Re: Tech Mechs - Colorful Arty's Senior Project
« Reply #22 on: April 11, 2018, 07:03:59 PM »
I tested the current version of Tech-Mechs as of the date of this post.

One non-inherent point: The files in the github repo don't seem to be complete. There is missing pause.png and "end level.png", which leads to several crashes (e.g. upon opening a level) and level.py/skill.py don't seem to have the new skills "Energizer" und "Magnet Boots" defined, which crashes the current Lego level, which has these in it.

It's nice that there is now pause and a possibility to end the level prematurely in single player and that an end of level dialog gives feedback upon your results. Although you can't see the requirements beforehand (apart from looking in the editor)?

I've tried the multiplayer which generally worked well but the window of player 2 froze in most occasions upon level finish. I think you have no indicator which are your Tech-Mechs unless you try to assign a skill?

It's a bit odd that you have so much free space and the level is in the upper left corner. The sprites of the Tech-Mechs have block boxes around them.

Offline 607

  • Posts: 468
    • View Profile
Re: Tech Mechs - Colorful Arty's Senior Project
« Reply #23 on: April 16, 2018, 10:20:46 AM »
I read all the posts: very interesting. :)

Offline Colorful Arty

  • Posts: 814
  • You are so loved!
    • View Profile
    • Colorful Arty's Youtube Page
Re: Tech Mechs - Colorful Arty's Senior Project
« Reply #24 on: April 17, 2018, 03:50:38 AM »
I just committed what I hope is the last updates for the beta version that I am submitting as my final school project (Download at https://github.com/colorfularty/Tech-Mechs). For those who are curious, the game now has the following features:

  • Fully functioning single player
  • Fully functioning cooperative 2p multiplayer, although the server is not up and running 24/7. Please let me know if you want to try out the multiplayer, and I can run the server on my VPS
  • A functioning level editor that lets you create single player and multiplayer levels
  • Customizable hotkeys
  • Two graphic sets: my lego tileset and a special graphics tileset
  • A few music tracks, all of which were taken from modarchive
  • A few simple sound effects, used when certain skills are assigned
  • 8 skills: including the magnet boots, energizer, cautioner, detonator, jackhammerer, driller, grappler, and gravity reverser

To those who have played the various builds I've made, thank you very much, and thank you for all feedback, whether positive or constructively negative. If you encounter any serious bugs in the code, PLEASE let me know ASAP and I will patch it as quickly as I can.


I'm already making a list of things that NEED to be done, and things I want to get done for future updates. I've divided them into categories: small things and large things.

Small things that need to be done
  • Improved multiplayer game interface. Specifically, right now once you click multiplayer and the server is running, you get stuck in a wait screen until another person joins. Ideally, you should be able to leave the multiplayer lobby at any time to go back to the main menu, and the server should react accordingly.
  • Improved sound effect handling. Right now the sound effect handling is meh at best, with tons of bugs and minimal sounds in general. Ideally every sound effect should stop naturally when appropriate and should not overwrite other sound effects currently being played.
  • A "get objects" button in the level editor. Much like in the NLEditor, you can toggle between terrain and objects being displayed in the panels. Right now, only terrain is displayed, so objects still have to be inserted and modified via hotkeys.
  • Main menu music. The menus feel a little lonely without some awesome music playing in the background.

Big things that I want to do
  • Better graphics. The graphics are passable at best, but look far from professional quality. In order to improve this, I'll either need to hire people for this, or take some classes/tutorials to improve my artwork.
  • More/better animations. Many skills have no animation to them, especially the cautioner and detonator. I'd like to change that in the future, but it'll be a decent-sized job.
  • Custom music for the game. Mobius has graciously agreed to help me with this, as he is far more talented than I at that. But custom tracks take time and fine-tuning before it gets done.
  • More graphic sets. Specifically graphic sets that look good and are very flexible, like the original and Oh No graphic sets that have limitless possibilities for what can be made with them
  • More skills. I have ideas for putting in a builder and miner skill, as well as a laser blaster, flamethrower, and (possibly) hover boots skill if I end up making splat height a thing.
  • More objects. I crudely put water in the game, but right now it just functions like instant death, and I'd love to add in special shorting-out animations for Tech Mechs that touch water.
  • Custom graphic set support. Above all else, I'd like Tech Mechs to have a custom community like Lemmings does, and I want to make it as easy as possible for users to make their own graphics. Right now, it is possible, but it involves manually making very specific text files containing metadata for the objects in the graphic set.
  • Improved UI for the level editor. While my level editor works, it is NOT user-friendly at all, and I'd like to change that, but it will be an extremely demanding job.
  • Add in voice or text chat in multiplayer mode. Because you have to work together and cannot see each other's skills, communication is essential for multiplayer, and thus far it doesn't have that. I'd really like to change that, but it will be a TON of work.
  • (Possibly) Allow for more than 2p multiplayer. While this would open even more puzzle potential, I'm afraid allowing for more than 2 players in cooperative multiplayer would not only make it too confusing but would also cause the game to lag due to all of the data being transferred through the server.
  • (Possibly) Add competitive multiplayer. While it would be cool and (relatively) easy to make since a lot of code can be reused from the cooperative multiplayer, we already have Lix, so I'm leaning towards passing on this one.
My Youtube channel where I let's play games with family-friendly commentary:
https://www.youtube.com/channel/UCiRPZ5j87ft_clSRLFCESQA

My Twitch channel: https://www.twitch.tv/colorfularty

My levelpack: SubLems
For New formats NeoLemmix: https://www.lemmingsforums.net/index.php?topic=4942.0
For Old formats NeoLemmix: http://www.lemmingsforums.net/index.php?topic=2787.0
For SuperLemmini: http://www.lemmingsforums.net/index.php?topic=2704.0

My levelpack: ArtLems
For New formats NeoLemmix: https://www.lemmingsforums.net/index.php?topic=4583.0