Physics-based arena shooter

Show off your games, demos and other (playable) creations.
User avatar
BlackBulletIV
Inner party member
Posts: 1261
Joined: Wed Dec 29, 2010 8:19 pm
Location: Queensland, Australia
Contact:

Re: Physics-based arena shooter

Post by BlackBulletIV »

Oh, sorry about that. I forgot to add a couple new folders to the .love file. It should work now.
User avatar
Lafolie
Inner party member
Posts: 809
Joined: Tue Apr 05, 2011 2:59 pm
Location: SR388
Contact:

Re: Physics-based arena shooter

Post by Lafolie »

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.
User avatar
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

Post by Roland_Yonaba »

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. :awesome:
User avatar
BlackBulletIV
Inner party member
Posts: 1261
Joined: Wed Dec 29, 2010 8:19 pm
Location: Queensland, Australia
Contact:

Re: Physics-based arena shooter

Post by BlackBulletIV »

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.
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.
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. :awesome:
Yeah, I'll definitely need a way to indicate lives.

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.
User avatar
Lafolie
Inner party member
Posts: 809
Joined: Tue Apr 05, 2011 2:59 pm
Location: SR388
Contact:

Re: Physics-based arena shooter

Post by Lafolie »

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.
User avatar
BlackBulletIV
Inner party member
Posts: 1261
Joined: Wed Dec 29, 2010 8:19 pm
Location: Queensland, Australia
Contact:

Re: Physics-based arena shooter

Post by BlackBulletIV »

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.
User avatar
Positive07
Party member
Posts: 1014
Joined: Sun Aug 12, 2012 4:34 pm
Location: Argentina

Re: Physics-based arena shooter

Post by Positive07 »

josefnpat wrote:It blew up for me :(

Code: 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'
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 :awesome: )

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
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. :cry:

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 :joker: 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
I dont really know how this work
So I cant play :cry:
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)
jonyzz
Prole
Posts: 48
Joined: Sun Sep 02, 2012 9:35 pm

Re: Physics-based arena shooter

Post by jonyzz »

It looks great, but the game always freezes (100% cpu usage) when missle or player hits an enemy. I've tested it on Linux.
User avatar
BlackBulletIV
Inner party member
Posts: 1261
Joined: Wed Dec 29, 2010 8:19 pm
Location: Queensland, Australia
Contact:

Re: Physics-based arena shooter

Post by BlackBulletIV »

I've updated the game. The changes are:
  • 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.
Anyway, all these problems sound like they're bugs with LÖVE's physics system. I've adjusted PhysicalEntity:addShape to fix the density error; that's the one thing out of these errors that's trivial to fix.
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. :cry:

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 :joker: 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
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.
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.
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.
User avatar
Positive07
Party member
Posts: 1014
Joined: Sun Aug 12, 2012 4:34 pm
Location: Argentina

Re: Physics-based arena shooter

Post by Positive07 »

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.
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?
Well what I have seen till nw its great I just want to play it and kill some grey boxes :awesome:
for i, person in ipairs(everybody) do
[tab]if not person.obey then person:setObey(true) end
end
love.system.openURL(github.com/pablomayobre)
Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 0 guests