Page 1 of 1

[Map]The Great Bombing Run! (V1.21)

PostPosted: Tue Apr 23, 2013 16:04
by Jonathan
It's out! The great Bombing Run!

It includes PilzAdam's TNT mod (modified), my TNT Dropper mod, and Jeija's map. My code might not be the most efficient, but hopefully it does not lag bad. (I would not use PilzAdam's regular TNT mod with this one. Might not work right.)

Goal: Find one of the two bomb shelters to hide in to win! (They are in the city)
Only rules: Don't use fly, fast, or creative mode.

Hope you enjoy! Post any neat screenshots :) (FYI: Some of the signs in the city I added or modified :). Some of them you might find funny.)

Minetest Version Required: 0.4.6 or greater.
Installation Instructions: Just unzip, and put the folder in your "minetest\worlds\" folder, and your ready to go!
Download:https://www.dropbox.com/s/xilba8hj429cl15/TheGreatBombingRun!.zip
Note: The mods are in the world folder so it will not affect other maps (Warning, do not use these mods with other maps you do NOT want destroyed!).

Screenshots:
Starting Position:
Image
Bombs Away!:
Image
City Before:
Image
City After:
Image
Poor Guy:
Image
First Bomb Bunker:
Image
Second Bomb Bunker:
Image

PostPosted: Tue Apr 23, 2013 18:53
by Zane
Wow oh my goodness this map is awesome!!!!Is there any rules?

PostPosted: Tue Apr 23, 2013 18:53
by Zane
realy awesome

PostPosted: Tue Apr 23, 2013 19:45
by Jonathan
Well, I figured out how to place the bombs randomly in a way that I am content with. (I just wish I knew how to make them slowly fall from the sky instead of instantly appearing on the ground)

I think I might use Jeija's old singleplayer map http://forum.minetest.net/viewtopic.php?id=915 , but I am not sure yet.

I still don't know if it is possible for a player to turn off the abm, so any help or suggestions would be appreciated.

PostPosted: Wed Apr 24, 2013 14:25
by Jonathan
I sometimes get the following error using PilzAdam's TNT mod:

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
10:16:26: ERROR[ServerThread]: ServerEnv: Trying to store id=41 statically but block (-4,0,-5) already contains 49 (over 49) objects. Forcing delete.
10:16:26: ERROR[ServerThread]: ServerEnv: Trying to store id=42 statically but block (-4,0,-5) already contains 49 (over 49) objects. Forcing delete.
10:16:26: ERROR[ServerThread]: ServerEnv: Trying to store id=43 statically but block (-4,0,-5) already contains 49 (over 49) objects. Forcing delete.
10:16:26: ERROR[ServerThread]: ServerEnv: Trying to store id=44 statically but block (-4,0,-5) already contains 49 (over 49) objects. Forcing delete.
10:16:26: ERROR[ServerThread]: ServerEnv: Trying to store id=45 statically but block (-4,0,-5) already contains 49 (over 49) objects. Forcing delete.


I tried commenting out the following lines with no success preventing the errors (Although for this map I didn't want it to drop the nodes just destroy them anyways):
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
local destroy = function(pos)
--    if math.random(1,5) <= 4 then
--        minetest.env:add_entity({x=pos.x+math.random(0,10)/10-0.5, y=pos.y, z=pos.z+math.random(0,10)/10-0.5}, "tnt:smoke")
--    end
    local nodename = minetest.env:get_node(pos).name
    if nodename ~= "air" then
        minetest.env:remove_node(pos)
        nodeupdate(pos)
        if minetest.registered_nodes[nodename].groups.flammable ~= nil then
            minetest.env:set_node(pos, {name="fire:basic_flame"})
            return
        end
--        local drop = minetest.get_node_drops(nodename, "")
--        for _,item in ipairs(drop) do
--            if type(item) == "string" then
--                local obj = minetest.env:add_item(pos, item)
--                if obj == nil then
--                    return
--                end
--                obj:get_luaentity().collect = true
--                obj:setacceleration({x=0, y=-10, z=0})
--                obj:setvelocity({x=math.random(0,6)-3, y=10, z=math.random(0,6)-3})
--            else
--                for i=1,item:get_count() do
--                    local obj = minetest.env:add_item(pos, item:get_name())
--                    if obj == nil then
--                        return
--                    end
--                    obj:get_luaentity().collect = true
--                    obj:setacceleration({x=0, y=-10, z=0})
--                    obj:setvelocity({x=math.random(0,6)-3, y=10, z=math.random(0,6)-3})
--                end
--            end
--        end
    end
end


Any thoughts as to what is causing this?

PostPosted: Wed Apr 24, 2013 16:31
by rubenwardy
It is because that section of the map has not been loaded, iirc

PostPosted: Wed Apr 24, 2013 18:07
by Jonathan
rubenwardy wrote:It is because that section of the map has not been loaded, iirc


So is it because I have an abm that creates TNT, and the TNT keeps getting added to the unloaded sections of the map?

PostPosted: Thu Apr 25, 2013 14:31
by Jonathan
Thanks for your help Rubenwardy. I decided to change my approach to randomly place the TNT with minetest.register_globalstep instead of an abm.

PostPosted: Thu Apr 25, 2013 17:24
by Jonathan
I've hit another roadblock:

tntdropper.init
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
local timer = 0
minetest.register_globalstep(function(dtime)
    timer = timer + dtime;
    --Place bombs around every 20 seconds.
    if timer >= 20 then
        timer = 0
        if math.random(0,11) >= 0.5 then
            minetest.chat_send_all("Bombs Away!")
        else
            minetest.chat_send_all("Look Out!")
        end
        local playerlist = minetest.get_connected_players()
        --Bomb every player in map.
        for _,player in ipairs(playerlist) do
            local tpos = player:getpos()
--            local testpos = player:getpos()

            --Check each block within a radius of 15 blocks of the player.
            for dx=-15,15 do
                for dz=-15,15 do
                    for dy=15,-15,-1 do
                        tpos.x = tpos.x+dx
                        tpos.y = tpos.y+dy
                        tpos.z = tpos.z+dz
                        --Around a 10% chance of placing tnt in valid node.
                        if math.random(0,100) > 90 then
                            local check = true
                             local setpos = {x = tpos.x, y = tpos.y - 6, z = tpos.z}
                             
                            --Checking if valid node.
                            if minetest.env:get_node({x = tpos.x, y = tpos.y - 7, z = tpos.z}).name ~= "air" and minetest.env:get_node(tpos).name == "air" then
--                                For testing purposes only:
--                                minetest.env:set_node({x = testpos.x, y = testpos.y + 7, z = testpos.z}, {name = "tnt:tnt"})
--                                minetest.env:punch_node({x = testpos.x, y = testpos.y + 7, z = testpos.z})
                               
                                for t=1,6,1 do
                                    if minetest.env:get_node({x = tpos.x, y = tpos.y - t, z = tpos.z}).name ~= "air" then
                                        check = false
                                    end
                                end

                                --If valid node... bombs away!!!
                                if check == true then
                                    minetest.env:set_node(setpos, {name = "tnt:tnt"})
                                    minetest.env:punch_node(setpos)
                                end
                            end
                        end
                    end       
                end
            end
        end
    end
end)


When the timer >= 20 my minetest.env:get_node functions In the line:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
--Checking if valid node.
if minetest.env:get_node({x = tpos.x, y = tpos.y - 7, z = tpos.z}).name ~= "air" and minetest.env:get_node(tpos).name == "air" then


keep returning "ignore" all except for one time. Can anyone spot the issue? After this issue is fixed, and I tweak the map a little, I'm done.

Edit:
Issue has now been solved. Prestidigitator pointed out the issue to me.

PostPosted: Sat Apr 27, 2013 02:43
by Jonathan
It's Finished!

PostPosted: Sat Apr 27, 2013 03:03
by Josh
Look's awesome! Maybe someone could make this into a WWII adventure but before the TNT drops, there is an air raid siren :)

PostPosted: Sat Apr 27, 2013 06:34
by sfan5
rubenwardy wrote:It is because that section of the map has not been loaded, iirc

No, its because theres an entity limit per MapBlock

PostPosted: Sat Apr 27, 2013 12:49
by xavier108
My netbook call this the great fps drop run
But the screenshots are great +1

PostPosted: Sat Apr 27, 2013 23:19
by Jonathan
Hybrid Dog, those are some great screenshots! Thanks for sharing :)

PostPosted: Sun Apr 28, 2013 02:17
by Jonathan
Since the TNT is falling from the sky, is there a different texture you think might work better with this map?

PostPosted: Sun Apr 28, 2013 21:12
by Jonathan
Hybrid Dog wrote:
Hybrid Dog said:
Image
I don't understand this warning.


Not sure what caused that warning. I never got it during all my testing and tweaking.

By the way I like the textures! :) I'll have to put it in the map (Can't do it today though). What license do you want me to use with the textures?

PostPosted: Tue Apr 30, 2013 16:42
by Jonathan
Would anyone by chance have a blender model of a plane? A model of a World War II plane would be really nice :)

PostPosted: Tue Apr 30, 2013 17:36
by rubenwardy
Looking good.

PostPosted: Wed May 01, 2013 03:00
by Josh
Jonathan wrote:Would anyone by chance have a blender model of a plane? A model of a World War II plane would be really nice :)

WWII Fighters dropping bombs in this map would be awesome! we could have pilots in them aswell, the player could also get into his/her plane and fight them off, a real WWII adventure!

PostPosted: Wed May 15, 2013 14:48
by Jonathan
Version 1.2 is out! Finally got the map fixed.

Although, it does not use new textures for the TNT yet, due to the link to Hybrid Dog's new textures being removed (not sure why).

Feel free to make maps just like this. I would not mind trying the map ;). I might make some updates later on as well.

PostPosted: Wed May 15, 2013 16:57
by Jonathan
Version 1.21 is out! New textures from Hybrid Dog are used now.

PostPosted: Thu May 16, 2013 19:00
by Jonathan
New update (Version 2) might be coming soon! Sneak peek below of one of the things that will be added:

https://www.dropbox.com/s/q8ylbf8m9vmxo37/NewTNT.png

This will be an additional TNT type that will be dropped.

PostPosted: Fri May 24, 2013 19:09
by Jonathan
Another sneak peek :D

Image Image
Image Image

PostPosted: Fri May 24, 2013 21:34
by Evergreen
This is a great map! :D Still haven't managed to find a bunker though. (even when flying with noclip :P)

PostPosted: Mon May 27, 2013 18:40
by Jonathan
Hybrid Dog wrote:
Evergreen wrote:This is a great map! :D Still haven't managed to find a bunker though. (even when flying with noclip :P)
I only spawned at the first one. I have never been at the second one.


You won't spawn in the bunker anymore. The newest version does not spawn you in the bunker, and the bunker locations have been changed since the first version ;)

PostPosted: Tue Jun 04, 2013 13:31
by Jonathan
A spin off of The Great Bombing Run! has been created.

You can find it here: http://forum.minetest.net/viewtopic.php?id=6178

Note: This spin off does not contain planes, that is coming later. :)

PostPosted: Mon Jun 17, 2013 22:49
by Dan Duncombe
Here are 2 missiles you might find helpful, in blend format:
One I found free on the internet:https://www.dropbox.com/s/l8d7yun6jm03p61/AGM-65-Maverick-Air-to-Ground-Tactical-Missile.zip
One I made (My first ever blend!):https://www.dropbox.com/s/zxlx43uhdamg18k/rocket.zip