Welcome, Guest |
You have to register before you can post on our site.
|
Forum Statistics |
» Members: 8,079
» Latest member: seanac11
» Forum threads: 10,350
» Forum posts: 91,276
Full Statistics
|
Online Users |
There are currently 230 online users. » 0 Member(s) | 228 Guest(s) Bing, Google
|
Latest Threads |
I'm leaving the site too....
Forum: 2DWorlds Discussion
Last Post: Jacob_
07-03-2023, 04:59 AM
» Replies: 12
» Views: 6,149
|
hi there.
Forum: 2DWorlds Discussion
Last Post: Jacob_
01-03-2020, 04:30 AM
» Replies: 1
» Views: 711
|
obroke
Forum: Current Games
Last Post: FrancisSah
09-06-2017, 10:11 AM
» Replies: 0
» Views: 20,510
|
fcouldn't
Forum: Current Games
Last Post: FrancisSah
09-06-2017, 09:02 AM
» Replies: 0
» Views: 8,217
|
qhow
Forum: Current Games
Last Post: PhilipShums
09-06-2017, 07:25 AM
» Replies: 0
» Views: 2,095
|
zstone
Forum: Current Games
Last Post: TimothyTox
09-06-2017, 07:03 AM
» Replies: 0
» Views: 965
|
vbit
Forum: Current Games
Last Post: FrancisSah
09-06-2017, 03:00 AM
» Replies: 0
» Views: 941
|
sildenafil 100 mg sandoz
Forum: Current Games
Last Post: RichardLen
09-06-2017, 12:28 AM
» Replies: 0
» Views: 1,151
|
mhis
Forum: Current Games
Last Post: TimothyTox
09-05-2017, 04:09 PM
» Replies: 0
» Views: 972
|
sildenafil citrate 100mg ...
Forum: Current Games
Last Post: Waltertog
09-05-2017, 12:27 PM
» Replies: 0
» Views: 928
|
|
|
Property of Terrain to allow explosion damage |
Posted by: Ghosty - 11-26-2012, 07:24 PM - Forum: Suggestions
- Replies (3)
|
 |
My suggestion is to add a Boolean value to the Terrain object that, if true, allows explosions to lower impacted regions of the terrain based on their radius and blast pressure. Supposedly, there is some way to do this with Lua already, but I have tried and failed.
|
|
|
This game is crashing after the first round in the editor. |
Posted by: Ghosty - 11-26-2012, 04:23 PM - Forum: Bug Reports
- Replies (2)
|
 |
It's basically a remake of my old Asteroid Dodgers (or Meteor Shower or whatever I called it) from the old site, totally redone from scratch.
I need to work on adding the final touches and some balancing to make it actually survivable, but it should be working just fine.
However, when I load it in the editor and hit play, after it completes the first round, I get a NegativeArrayException.
Code: java.lang.NegativeArraySizeException
org.jbox2d.dynamics.Island.init(Island.java:118)
org.jbox2d.dynamics.PhysicsWorld.solve(PhysicsWorld.java:669)
org.jbox2d.dynamics.PhysicsWorld.step(PhysicsWorld.java:572)
net.worlds.World.step(World.java:736)
net.worlds.Game.step(Game.java:295)
net.worlds.Main.gameStep(Main.java:657)
net.worlds.MainApplet.run(MainApplet.java:236)
java.lang.Thread.run(Unknown Source)
Any ideas why? I'm going to try to debug it some more later, but if anyone else can help that'd be great.
http://2dworlds.org/game.php?id=31
Here's the script I believe to be the problem:
Code: function checkWhoSurvived()
local players = game.Players:getChildren()
for q = 1, #players do
players[q].Stats.Played.Value = players[q].Stats.Played.Value + 1
if players[q].Alive.Value == true then
players[q].Stats.Survived.Value = players[q].Stats.Survived.Value + 1
else
players[q].Alive.Value = true
end
end
end
function redoWorld()
local spawn = game.World:getChild("Spawn")
local players = game.Players:getChildren()
for w = 1, #players do
if players[w].Character ~= nil then
players[w].Character.Body.Position = spawn.Position
end
end
game.Terrain:generate()
end
function ticky(top, num)
for z = 1, num do
local players = game.Players:getChildren()
for x = 1, #players do
players[x]:message(tostring(top - z))
end
sleep(1)
end
local players = game.Players:getChildren()
for c = 1, #players do
players[c]:message()
end
end
function cleanup()
local parts = game.World:getChildren()
for y = 1, #parts do
if parts[y]:isA("Circle") and string.sub(parts[y].Name, 1, 6) == "Meteor" then
parts[y]:remove()
end
end
end
while true do
game.World.BGM:stop()
game.World.Meteors.Create.Value = false
cleanup()
redoWorld()
local players = game.Players:getChildren()
for e = 1, #players do
players[e]:message("Beginning new round!")
players[e].Alive.Value = true
end
sleep(4)
for r = 1, #players do
players[r]:message()
end
game.World.BGM:play()
game.World.Meteors.Create.Value = true
ticky(140, 140)
checkWhoSurvived()
end
The game freezes, and then the music begins to play again. So I suspect the problem is somewhere here:
game.World.BGM:play()
game.World.Meteors.Create.Value = true
ticky(140, 140)
EDIT: It is also now crashing with this error at other times as well.
|
|
|
|