Rescue

23 Aug, 2018 - 00:00:00

By

Matthew Deig

Tags:

The Group

Tanbo Gustofferson, Dragonborn Bard Wheely Healy, Dwarf Cleric Fungal Scourge, Dragonborn Figter Davian Mongothsfeather, Aarakocra Ranger

Story So Far

After raiding the Red Band Ruffians. The group took one of the a Red Band as a captive, to find the hideout of the goblins that might have a map to find the magical mace. They made it thru the trail and traps and at the mouth of the cave to the goblin hideout.

Rescue

Our gang was discussing how to enter the cave that two goblins attacked them. The easy dispatched the goblins that they enter the cave and saw some wolves chained up to the wall and they high tailed out of the cave to discus what they want to do next. Our gang decide to take a rest for the night so they can be ready for the fight ahead. During their night rest they interrogated the Red Band to find out his name and become his friend after stripping his clothes, killing, and bring him back to life. They got his name but Tanbo changed it to Tim.

While the group is sleeping Tim crawls off into the woods. After a few hours of crawling a Bugbear grabs Tim and carries him off.

In the morning the group wakes up to their horror they find their "friend" Tim is gone. They look around the camp to find where he went off. They find his crawling tracks they went off into the woods. So they decided to go off into the woods looking for them. They running for few hours stumbling around a in woods they come to a clearing where they see the Bugbear.

Wheely Healy comes up with a plan to sneak attacked the Bugbear. The others agree, Wheely Healy was going to cast a guided missile, Fungal Scourge was going to rush in with his swords, Tanbo was going to rush in, and Davian Mongothsfeather was going to shoot his bow. They executed the plan but Wheely Healy's guided missile whiffs by the Bugbear's head, and while Davian Mongothsfeather's arrow just lands at the Bugbear's feet. Tanbo just stumbles out of the woods losing his footing. Fungal Scourge goes in with his sword but the Bugbear lifts up his arm that was carrying Tim and Fungal Scourge just slices Tim in half vertically, and with that their "friend" Tim was slayed.

The group swears revenge on the Bugbear that they nicked at the health of the Bugbear and the Bugbear was missing up til he was able to hit Davian Mongothsfeather with his mouringstar, which ended up making Davian Mongothsfeather coughing up blood. Tanbo was able to kill the Bugbear with his bow.

The gang heads back to camp to rest up for their adventure into the goblin hideout.

Edit

The names and classes wasn't accurate so I updated it

RSS Feed

06 Feb, 2018 - 00:00:00

By

Matthew Deig

Tags:

Well I added a hacky add on to pft to make an rss feed for this blog. When I mean hacky the text for the blog posts will not have any format to the text so it is terrible to read but the whole markdown version of the blog post is in the rss feed now.

Enjoy

Random Level Generator For Squidio

05 Feb, 2018 - 00:00:00

By

Matthew Deig

Tags:

Code

    function new_world ()
        obs = 0
        level_num_obs = level_num_obs + level_mul
        if new_game == 1 then
            starting_pixels = 350
            while obs <= level_num_obs do

                world_build_check = math.random() * 100

                if ( ( world_build_check - 40 ) < 0 ) then
                    new_block_speed = math.random(-1 * block.max_velocity, block.max_velocity)
                    if ( new_block_speed < 0 and new_block_speed > -1 * block.min_velocity ) then
                        new_block_speed = math.random( -1 * block.max_velocity, -1 * block.min_velocity)
                    elseif ( new_block_speed > 0 and new_block_speed < block.min_velocity ) then
                        new_block_speed = math.random( block.min_velocity, block.max_velocity )
                    else
                        new_block_speed = block.min_velocity
                    end
                    table.insert ( world, { ['name'] = 'block', ['x'] = math.random(block.width, love.graphics.getWidth() - block.width),
                                            ['y'] = starting_pixels, ['width'] = block.width, ['height'] = block.height, ['velocity'] = new_block_speed,
                                            ['sprite'] = block.sprite} )
                    obs = obs + 1
                elseif ( ( world_build_check - 50 ) < 0 ) then
                    world_build_check = math.random() * 100
                    if ( ( world_build_check - 30 ) < 0 ) then
                        table.insert ( world, { ['name'] = 'left_stream', ['x'] = love.graphics.getWidth() - left_stream.width,
                                                ['y'] = starting_pixels, ['width'] = left_stream.width, ['height'] = left_stream.height, ['velocity'] = math.random(left_stream.min_force, left_stream.max_force),
                                                ['sprite'] = left_stream.sprite} )
                    else
                        table.insert ( world, { ['name'] = 'right_stream', ['x'] = 0,
                                                ['y'] = starting_pixels, ['width'] = right_stream.width, ['height'] = right_stream.height, ['velocity'] = math.random(right_stream.min_force, right_stream.max_force),
                                                ['sprite'] = right_stream.sprite} )
                    end
                    obs = obs + 1
                end

                    starting_pixels = starting_pixels - 62
            end

            starting_pixels = starting_pixels - 124
            table.insert ( world, { ['name'] = 'goal', ['x'] = goal.width,
                                            ['y'] = starting_pixels, ['width'] = goal.width, ['height'] = goal.height, ['velocity'] = 0,
                                            ['sprite'] = goal.sprite} )
            table.insert ( world, { ['name'] = 'goal2', ['x'] = love.graphics.getWidth() - goal.width,
                                            ['y'] = starting_pixels, ['width'] = goal.width, ['height'] = goal.height, ['velocity'] = 0,
                                            ['sprite'] = goal.sprite} )
        else
            starting_pixels = -62
            while obs <= level_num_obs do

                world_build_check = math.random() * 100
                if ( ( world_build_check - 40 ) < 0 ) then
                    new_block_speed = math.random(-1 * block.max_velocity, block.max_velocity)
                    if ( new_block_speed < 0 and new_block_speed > -1 * block.min_velocity ) then
                        new_block_speed = math.random( -1 * block.max_velocity, -1 * block.min_velocity)
                    elseif ( new_block_speed > 0 and new_block_speed < block.min_velocity ) then
                        new_block_speed = math.random( block.min_velocity, block.max_velocity )
                    else
                        new_block_speed = block.min_velocity
                    end


                    table.insert ( world, { ['name'] = 'block', ['x'] = math.random(block.width, love.graphics.getWidth() - block.width),
                                            ['y'] = starting_pixels, ['width'] = block.width, ['height'] = block.height, ['velocity'] = new_block_speed,
                                            ['sprite'] = block.sprite} )
                    obs = obs + 1
                elseif ( ( world_build_check - 50 ) < 0 ) then
                    world_build_check = math.random() * 100
                    if ( ( world_build_check - 30 ) < 0 ) then
                        table.insert ( world, { ['name'] = 'left_stream', ['x'] = love.graphics.getWidth() - left_stream.width,
                                                ['y'] = starting_pixels, ['width'] = left_stream.width, ['height'] = left_stream.height, ['velocity'] = math.random(left_stream.min_force, left_stream.max_force),
                                                ['sprite'] = left_stream.sprite} )
                    else
                        table.insert ( world, { ['name'] = 'right_stream', ['x'] = 0,
                                                ['y'] = starting_pixels, ['width'] = right_stream.width, ['height'] = right_stream.height, ['velocity'] = math.random(right_stream.min_force, right_stream.max_force),
                                                ['sprite'] = right_stream.sprite} )
                    end
                    obs = obs + 1

                end
                starting_pixels = starting_pixels - 62

            end

            starting_pixels = starting_pixels - 124
            table.insert ( world, { ['name'] = 'goal', ['x'] = goal.width,
                                            ['y'] = starting_pixels, ['width'] = goal.width, ['height'] = goal.height, ['velocity'] = 0,
                                            ['sprite'] = goal.sprite} )
            table.insert ( world, { ['name'] = 'goal2', ['x'] = love.graphics.getWidth() - goal.width,
                                            ['y'] = starting_pixels, ['width'] = goal.width, ['height'] = goal.height, ['velocity'] = 0,
                                            ['sprite'] = goal.sprite} )

        end


    end

What does it do

This function for the game will generate new table objects for the level after the goal marker shows up on the screen. I wanted it to be a weighted random so I just did some random check and minus out the chance of it happening. Some of my older version used a range check on the random number, but the results were not desired of what I wanted.

It places the hit object, stream object, and the goal object. The player is spawn at the bottom of the screen. Then I take the starting pixel which is roughly the middle of the screen and go up the screen until I hit the maxium of objects for the level.

I feel the function is a little wielding but it got the job done.