The Hacksperiment [Community Project]

General discussion about LÖVE, Lua, game development, puns, and unicorns.
User avatar
MadByte
Party member
Posts: 533
Joined: Fri May 03, 2013 6:42 pm
Location: Braunschweig, Germany

Re: The Hacksperiment [Community Project]

Post by MadByte »

kbmonkey wrote: Nice one! Great use of the hit() call :)
I replaced that ugly turret with a sprite from here: http://opengameart.org/content/steampunk-turrets
*img*
Thanks and nice sprite, I like the gear wheel a lot - nice little detail :)
The project already starts to become "something" - I'm excited for what comes next. I'll do something new tomorrow.

I also made some changes on the base code.
  • Modules can be inside several different directories now! This is great for organizing modules.(e.g in "modules/username/module.lua" or "modules/entities/module.lua", etc.) They will be loaded automatically.
  • Added Flux and Classic (tweening and class libs by rxi) to the project for easy and fast access.
    Note: It is possible to require your own libraries inside your module, so that doesn't mean that I'm dictating you what libs you have to use! If you gonna add a new library, please add it to the /libraries directory!
User avatar
MadByte
Party member
Posts: 533
Joined: Fri May 03, 2013 6:42 pm
Location: Braunschweig, Germany

Re: The Hacksperiment [Community Project]

Post by MadByte »

Suicidal Ground Forces incoming!

Image

atm they just explode and may hit other guys with their blast.
Infos on how to use the module can be found here

I also added Anim8 as default library, updated the Github Wiki and improved some module code.
User avatar
kbmonkey
Party member
Posts: 139
Joined: Tue Sep 01, 2015 12:19 pm
Location: Sydney
Contact:

Re: The Hacksperiment [Community Project]

Post by kbmonkey »

Nice troopers!

I don't know if feels right that the turret monopolized the mouse. If other people wanted to use the mouse it makes it difficult for them. I was thinking of changing it so you need to click on the turret first to use it, and release it with right-click perhaps. I am not sure, just throwing ideas around.
User avatar
MadByte
Party member
Posts: 533
Joined: Fri May 03, 2013 6:42 pm
Location: Braunschweig, Germany

Re: The Hacksperiment [Community Project]

Post by MadByte »

kbmonkey wrote: I don't know if feels right that the turret monopolized the mouse. If other people wanted to use the mouse it makes it difficult for them. I was thinking of changing it so you need to click on the turret first to use it, and release it with right-click perhaps. I am not sure, just throwing ideas around.
Thats a good point, handling the input is quite difficult in such an open project. Technically the base code will procceed all inputs, even if a key or button is used serveral times.
There are also some default keys / buttons / axis that will most likely be used a couple times, e.g:
  • Arrow Keys (e.g for movement or interface actions like selecting buttons in menus, ...)
  • WASD
  • Space / Return ; ...
  • Mouse Buttons / Position
  • Controller Buttons / Axis
  • ...
One idea would be good communication and organisation. :)
Also maybe a new module that somehow can be used to manage inputs can be introduced and people use that module (if they want) to set keys and buttons for their own module if a specific state has been set.

Some pseudo code:

Code: Select all

-------------------------------
-- A player char module --
-------------------------------

function module:enter()
  -- Load the input module --
  self.inputModule = Game:getModule("InputModule")

  -- if the state "gameActive" get set, module:setInput() will be triggered.
  self.inputModule:addState("gameActive", self)
end


function module:setInput() 
  -- the table key is the input ; the table value is a function to call if the input is down.

  -- On hold calls --
  self.holdInput = {"w" = entity.moveUp, "s" = entity.moveDown}
  self.inputModule:onHold(self.holdInput)

  -- On press calls --
  self.pressInput = {" " = entity.jump, "r" = entity.reload}
  self.inputModule:onPressed(self.pressInput)
end

Other modules can listen to the "gameState" state too and set their own keys and buttons if "gameState" is selected. And if any input is used by more then one module then the inputModule will show a warning or/and block one of them based on a specifc condition that has been set previously. That way it would be easy to seperate stuff like "player movement" and "interface interactions" (like an ingame menu with buttons etc.).

But all that stuff will make the module more and more complex (and I want it to be really easy for new contributors to join). Maybe we should accept the risk that some keys get set several times and if so we talk with the author who made the conflicting module and maybe these guys can find a way to solve it.

btw I've updated the OP , Github Readme and the WIki and cleaned up some code.
User avatar
kbmonkey
Party member
Posts: 139
Joined: Tue Sep 01, 2015 12:19 pm
Location: Sydney
Contact:

Re: The Hacksperiment [Community Project]

Post by kbmonkey »

I agree to keep it simple. I've been looking through the new stuff you added to your MadObject, it looks nice and I am falling behind on it :crazy:

There is a new turret pull request:

* The player has to click on the turret to use it. Right click releases control
* Ease the barrel towards it's target.

That is all. I feel it is time for a new module soon ;)
User avatar
MadByte
Party member
Posts: 533
Joined: Fri May 03, 2013 6:42 pm
Location: Braunschweig, Germany

Re: The Hacksperiment [Community Project]

Post by MadByte »

kbmonkey wrote:I've been looking through the new stuff you added to your MadObject, it looks nice and I am falling behind on it :crazy:
Thanks, no worries. I've way to much time at the moment :ultrahappy:
Here is the MadObject documentation.

If someone want to join into the project: I've created some nice module examples and a detailed documentation about the project.
How to create a module
Wiki
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests