Physics-based arena shooter
- BlackBulletIV
- Inner party member
- Posts: 1261
- Joined: Wed Dec 29, 2010 8:19 pm
- Location: Queensland, Australia
- Contact:
Re: Physics-based arena shooter
Oh, sorry about that. I forgot to add a couple new folders to the .love file. It should work now.
Re: Physics-based arena shooter
No, I didn't mean performance. I meant that it's hard to keep track of what's going on because there's loads of particles in the way.
Do you recognise when the world won't stop for you? Or when the days don't care what you've got to do? When the weight's too tough to lift up, what do you? Don't let them choose for you, that's on you.
- Roland_Yonaba
- Inner party member
- Posts: 1563
- Joined: Tue Jun 21, 2011 6:08 pm
- Location: Ouagadougou (Burkina Faso)
- Contact:
Re: Physics-based arena shooter
That's great.
What would you think of a life bar ?
EDIT: Well, I'm starting to think that your Asset Manager should be part of Ammo.
At least, making it more generic, and add a public interface to set customized parameters like paths, for instance.
What would you think of a life bar ?
EDIT: Well, I'm starting to think that your Asset Manager should be part of Ammo.
At least, making it more generic, and add a public interface to set customized parameters like paths, for instance.
- BlackBulletIV
- Inner party member
- Posts: 1261
- Joined: Wed Dec 29, 2010 8:19 pm
- Location: Queensland, Australia
- Contact:
Re: Physics-based arena shooter
Ok, everyone I has their preference. I've personally never had any trouble with it. But preferences aside, I can't do much to alter the number of particles without affecting gameplay, as I said in my previous post.Lafolie wrote:No, I didn't mean performance. I meant that it's hard to keep track of what's going on because there's loads of particles in the way.
Yeah, I'll definitely need a way to indicate lives.Roland_Yonaba wrote:That's great.
What would you think of a life bar ?
EDIT: Well, I'm starting to think that your Asset Manager should be part of Ammo.
At least, making it more generic, and add a public interface to set customized parameters like paths, for instance.
As for the asset manager, I'm planning to make it an extension module, probably called ammo-assets. The paths are already pretty customisable, though it'd probably need a bit of tweaking to be ready for a public module.
Re: Physics-based arena shooter
Hey, that's not true at all! You could take focus from them by making players and enemies stand out more.
Do you recognise when the world won't stop for you? Or when the days don't care what you've got to do? When the weight's too tough to lift up, what do you? Don't let them choose for you, that's on you.
- BlackBulletIV
- Inner party member
- Posts: 1261
- Joined: Wed Dec 29, 2010 8:19 pm
- Location: Queensland, Australia
- Contact:
Re: Physics-based arena shooter
How? The player is a bright colour, the enemies a light shades of grey, and both are up against a black background. I might be able to reduce how much the particles stand out though; reducing their alpha and/or making them smaller might help.
- Positive07
- Party member
- Posts: 1014
- Joined: Sun Aug 12, 2012 4:34 pm
- Location: Argentina
Re: Physics-based arena shooter
Im having this same bug in windows so it may be better just yo put ones and not nil as default everything else is working (the menu is the only thing I could see and it was perfect )josefnpat wrote:It blew up for meCode: Select all
Error: ammo/physics/PhysicalEntity.lua:97: bad argument #3 to 'newFixture' (number expected, got nil) stack traceback: [C]: in function 'newFixture' ammo/physics/PhysicalEntity.lua:97: in function 'addShape' entities/Barrier.lua:17: in function 'added' ammo/core/World.lua:150: in function '_updateLists' ammo/core/World.lua:43: in function 'update' ammo/physics/PhysicalWorld.lua:42: in function 'update' worlds/Game.lua:62: in function 'update' ammo/core/init.lua:33: in function 'update' main.lua:60: in function 'update' [string "boot.lua"]:404: in function <[string "boot.lua"]:373> [C]: in function 'xpcall'
EDIT:
Well I found a solution to the first error adding this:
Code: Select all
function PhysicalEntity:addShape(shape, density)
local dens = density or 1
if not (type(dens) == "number") then
dens = 1
end
local fixture = love.physics.newFixture(self._body, shape, dens)
fixture:setUserData(self)
return fixture
end
EDIT2: Well I just deleted that line and it worked but now it is throwing a C++ Runtime error when the shot crashes against the wall and a lot of particles appear.
Also the little grey squares that follow me around dont die when the shoots thouch them its like if the were ghost this may be caused because the enemies the misiles the player and everything else (exceptfr the "Fade" and the "HUD" that shares a layer) are in different layers
Code: Select all
Player = 3
Missile = 5
Shrapnel = 6
Barrier = 2
Enemy = 4
So I cant play
Last edited by Positive07 on Sat Sep 22, 2012 8:02 pm, edited 2 times in total.
for i, person in ipairs(everybody) do
[tab]if not person.obey then person:setObey(true) end
end
love.system.openURL(github.com/pablomayobre)
[tab]if not person.obey then person:setObey(true) end
end
love.system.openURL(github.com/pablomayobre)
Re: Physics-based arena shooter
It looks great, but the game always freezes (100% cpu usage) when missle or player hits an enemy. I've tested it on Linux.
- BlackBulletIV
- Inner party member
- Posts: 1261
- Joined: Wed Dec 29, 2010 8:19 pm
- Location: Queensland, Australia
- Contact:
Re: Physics-based arena shooter
I've updated the game. The changes are:
What's the C++ error you're getting?
I would assume that the "ghost enemies" is a problem with the collision functions not being triggered or something. Sounds like it may be another LÖVE bug. It's got nothing to do with layers, as those simply specify the order of when things are drawn.
I should probably test this on Windows.
- Arena is no longer sized by resolution. It will customisable to some degree in the future, but for now the arena size is set 1440x900.
- Resolution can now be changed anywhere and the game should adjust everything to suit.
- The camera tracks the player.
- A number of visual tweaks, such as reduced alphas on particles.
That's really weird with the setMass thing. Exactly what error is it giving you? Also, in case you're wondering, setMass is one of many functions that are defined dynamically when they are first accessed.Positive07 wrote:But there is a mistake in the Player.lua entity that I cant find (found it) a solution. The self.setMass(10) used in line 44 of this file is not declared anywhere so it just gives me an error.
EDIT2: Well I just deleted that line and it worked but now it is throwing a C++ Runtime error when the shot crashes against the wall and a lot of particles appear.
Also the little grey squares that follow me around dont die when the shoots thouch them its like if the were ghost this may be caused because the enemies the misiles the player and everything else (exceptfr the "Fade" and the "HUD" that shares a layer) are in different layersCode: Select all
Player = 3 Missile = 5 Shrapnel = 6 Barrier = 2 Enemy = 4
What's the C++ error you're getting?
I would assume that the "ghost enemies" is a problem with the collision functions not being triggered or something. Sounds like it may be another LÖVE bug. It's got nothing to do with layers, as those simply specify the order of when things are drawn.
I should probably test this on Windows.
I'm pretty sure that because my collision handling functions are somehow getting called an infinite amount of times, instead of just once. If that is the case, it's a problem with LÖVE, and I've no idea how to fix it.jonyzz wrote:It looks great, but the game always freezes (100% cpu usage) when missle or player hits an enemy. I've tested it on Linux.
- Positive07
- Party member
- Posts: 1014
- Joined: Sun Aug 12, 2012 4:34 pm
- Location: Argentina
Re: Physics-based arena shooter
SetMass is just used in the line 44 of the Player.lua file and nowhere else so the error it gives me is that, the function is a nil value (it doesnt exists) so when i deleted it worked just fine. The C++ error happens just when the misile crashes against the wall and that happens always because it even passes through the enemies. It is a Love error but it doesnt give any information about it so I dont really now which part of the code makes Love crash. The "ghost" enemies may be because of the collision detection where do you handle this in your files?BlackBulletIV wrote:I've updated the game. The changes are:
That's really weird with the setMass thing. Exactly what error is it giving you? Also, in case you're wondering, setMass is one of many functions that are defined dynamically when they are first accessed.
What's the C++ error you're getting?
I would assume that the "ghost enemies" is a problem with the collision functions not being triggered or something. Sounds like it may be another LÖVE bug. It's got nothing to do with layers, as those simply specify the order of when things are drawn.
I should probably test this on Windows.
Well what I have seen till nw its great I just want to play it and kill some grey boxes
for i, person in ipairs(everybody) do
[tab]if not person.obey then person:setObey(true) end
end
love.system.openURL(github.com/pablomayobre)
[tab]if not person.obey then person:setObey(true) end
end
love.system.openURL(github.com/pablomayobre)
Who is online
Users browsing this forum: No registered users and 8 guests