Log In
Name:
Pass:
Online Members (0)
No members are currently online.
Current Interguild Time:
Thu Mar 28 2024 9:10 pm
Member Chat Box  [click here to enlarge]
Recent Posts and Comments

Welcome to the Interguild's Video Archive! This is a database of all of the videos that our members have made. While we do not provide a way for you to directly upload videos onto our site, we let users upload them to their own accounts on video sites such as Youtube or Google Video. We then embed the videos onto here so that you can find them all in one place.

Walkthroughs          Guides          Main Levels          Other Vids          Top Rated
Video Archive Main     Newest Videos     Add a New Video     Search: Advanced Search
Preview - Boulder Physics
More HATPC Videos
ICTOAN3 Shortcut
by: Mysteryman

Game: HATPC
Length: 00:31 | Jan 22, 2008

Hannah Banana's Guess the Cave
by: aych bee

Game: HATPC
Length: 01:02 | Aug 14, 2007

HATPC Promotional
by: Darvince

Game: HATPC
Length: 01:00 | Dec 13, 2011

HATPC in 4 Minutes
by: Livio

Game: HATPC
Length: 04:07 | Oct 14, 2007

Interguild Video Quiz 6 entry
by: jellsprout

Game: HATPC
Length: 00:25 | Oct 14, 2008

Preview - Boulder Physics - More Info
Made by: DroidFreak36 on Sep 29, 2016
Length: 01:50 -- Views: 1756 -- Game: HATPC

Not final, but working boulder physics that cascades in a similar way to vanilla HATPC. That user level at the end was Chaos Theory by jebby... and my game crashed at the end. I don't think it was the game's fault though, I was running it in GameMaker: Studio Runner and that tends to crash randomly regardless of what my game does. It doesn't crash like that in HTML5 (or when compiled for Windows).
User Rating: (Log in to rate)

Average: 0/5 | Total Votes: 0
[?] Karma: +3
User Comments (8)
« Forum Index < The Hannah and the Pirate Caves Board

jebby
[?] Karma: 0 | Quote - Link
Saturday, October 1 2016, 11:44 am EST
Interguild Founder

Age: 32
Karma: 233
Posts: 968
Gender: Male
Location: United Kingdom
pm | email
I felt like I was in a nightclub with the boulder sounds at the end. Very impressive. What's the algorithm for boulder cascading?
DroidFreak36
[?] Karma: 0 | Quote - Link
Saturday, October 1 2016, 12:57 pm EST
HATPC Reborn Dev

Age: 30
Karma: 200
Posts: 491
Gender: Male
Location: droidfreak36.com
pm | email
There's a function called "scr_cascade_check(i, j)" that checks if the specified position contains a boulder which should cascade:

Notes:
Spoiler:


Code:
//var i = argument[0]
//var j = argument[1]
cascleft = false
cascright = false

if(global.blocks[argument[0], argument[1]] = 17)
{
    if(global.tiles[argument[0], argument[1]] != 0)
    {
        if(tile_get_background(global.tiles[argument[0], argument[1]]) = bbg_boulder)
        {
            if(global.blocks[argument[0] + 1, argument[1]] = 17)
            {
                if((global.blocks[argument[0], argument[1] - 1] = 0 || global.block_data[global.blocks[argument[0], argument[1] - 1], 3] = -2) && (global.block_data[global.blocks[argument[0] + 1, argument[1] - 1], 3] = 0 || global.block_data[global.blocks[argument[0] + 1, argument[1] - 1], 3] = -2 || global.tiles[argument[0] + 1, argument[1] - 1] = 0))
                {
                    var tmp = instance_create(argument[1] * 32 + 16, argument[0] * 32 + 16, global.block_data[17, 11])
                    tile_delete(global.tiles[argument[0], argument[1]])
                    global.tiles[argument[0], argument[1]] = 0
                    cascleft = true
                }
                if((global.blocks[argument[0], argument[1] + 1] = 0 || global.block_data[global.blocks[argument[0], argument[1] + 1], 3] = -2) && (global.block_data[global.blocks[argument[0] + 1, argument[1] + 1], 3] = 0 || global.block_data[global.blocks[argument[0] + 1, argument[1] + 1], 3] = -2 || global.tiles[argument[0] + 1, argument[1] + 1] = 0))
                {
                    if(!cascleft)
                    {
                        var tmp = instance_create(argument[1] * 32 + 16, argument[0] * 32 + 16, global.block_data[17, 11])
                        tile_delete(global.tiles[argument[0], argument[1]])
                        global.tiles[argument[0], argument[1]] = 0
                    }
                    cascright = true
                }
            }
        }
    }
    else
    {
        var tmp = collision_point(argument[1] * 32 + 16, argument[0] * 32 + 16, obj_boulder, false, true)
        if(tmp != noone)
        {
            if(tmp.fallstate < 2 && !tmp.rolling)
            {
                if(global.blocks[argument[0] + 1, argument[1]] = 17)
                {
                    if((global.blocks[argument[0], argument[1] - 1] = 0 || global.block_data[global.blocks[argument[0], argument[1] - 1], 3] = -2) && (global.block_data[global.blocks[argument[0] + 1, argument[1] - 1], 3] = 0 || global.block_data[global.blocks[argument[0] + 1, argument[1] - 1], 3] = -2 || global.tiles[argument[0] + 1, argument[1] - 1] = 0))
                    {
                        cascleft = true
                        tmp.fallstate = 0
                    }
                    if((global.blocks[argument[0], argument[1] + 1] = 0 || global.block_data[global.blocks[argument[0], argument[1] + 1], 3] = -2) && (global.block_data[global.blocks[argument[0] + 1, argument[1] + 1], 3] = 0 || global.block_data[global.blocks[argument[0] + 1, argument[1] + 1], 3] = -2 || global.tiles[argument[0] + 1, argument[1] + 1] = 0))
                    {
                        cascright = true
                        tmp.fallstate = 0
                    }
                }
            }
        }
    }
    if(cascleft)
    {
        global.blocks[argument[0], argument[1] - 1] = 17
        tmp.rolling = true
        tmp.dir = -1
        scr_cascade_check(argument[0] - 1, argument[1] + 1)
    }
    else
    {
        if(cascright)
        {
            global.blocks[argument[0], argument[1] + 1] = 17
            tmp.rolling = true
            tmp.dir = 1
            scr_cascade_check(argument[0] - 1, argument[1] - 1)
        }
    }
}


Basically, if the position contains a boulder tile or a boulder that's waiting to fall, it checks whether the criteria to cascade are met (boulder below, free space to one side or the other) and defaults to cascading left if both directions are available. Boulders are prevented from cascading into the same spot as other boulders by the making them occupy both positions in global.blocks[i, j] while they are rolling.

Then scr_cascade_check() is called whenever a position would normally get updated (such as when a falling object falls past it).




Quote:
Rictory for Ralkyon!

HATPC Reborn home page
DroidFreak36
[?] Karma: 0 | Quote - Link
Saturday, October 1 2016, 1:00 pm EST
HATPC Reborn Dev

Age: 30
Karma: 200
Posts: 491
Gender: Male
Location: droidfreak36.com
pm | email
In case you're wondering, the key I use for keeping track of blockIDs, block properties, and collision types is:

Code:
1  x                                       terrain
2  b                                       wood crate
3  K                                       metal crate
4  ^                                       arrow
5  <                                       arrow
6  V                                       arrow
7  >                                       arrow
8  /                                       dynamite wood
9  |                                       dynamite metal
10 [                                       left platform
11 =                                       platform
12 ]                                       right platform
13 L                                       life
14 G                                       gem
15 +                                       treasure
16 "                                       ladder
17 o                                       boulder
18 w                                       stalactite
19 m                                       stalagmite
20 z                                       secret
21 #                                       hannah
22 D                                       door
23 1                                       bird
24 2                                       monkey
25 3                                       skull
26 4                                       ghost
27 5                                       skeleton
28 .                                       air pocket
29 t                                       tap
30 ~                                       water level
31 n                                       tut up
32 (                                       tut left
33 u                                       tut down
34 )                                       tut right
35 '                                       steel arrow up
36 {                                       steel arrow left
37 ,                                       steel arrow down
38 }                                       steel arrow right

Array columns:
0 - Destructible (T/F)
1 - Falls (T/F)
2 - Foreground (T/F)
3 - Collision Type (-2 through 4)
4 - Fall Sound (soundID)
5 - Wooden (T/F)
6 - Sprite (bbg)
7 - xoffset
8 - yoffset
9 - width
10- height
11- Associated object

Collision types:
-2 - Spike
-1 - Destroyed by collision, no knockback
 0 - No collision
 1 - Collision from above only
 2 - Standard solid collision
 3 - Boulder
 4 - Destroyed by collision, knockback


EDIT: And this is the INI file used to populate block_data[]
Spoiler:




Quote:
Rictory for Ralkyon!

HATPC Reborn home page
aych bee
[?] Karma: 0 | Quote - Link
Saturday, October 1 2016, 4:15 pm EST
when i am king

Age: 104
Karma: 147
Posts: 1002
Gender: Female
Location: you will be first against the wall
pm | email
in my opinion your physics are better than the actual hatpc physics.


Spoiler:
shos
[?] Karma: 0 | Quote - Link
Sunday, October 2 2016, 7:16 pm EST
~Jack of all trades~

Age: 31
Karma: 389
Posts: 8273
Gender: Male
Location: Israel
pm | email
Does the boulder falling through ground glitch currently work?

It's sort of hard to understand whether what we see in Chaos Theory is what we want. The leftmost culumn for example - why didn't it fall to the right for so long? When you take a treasure, the one above it falls immediately. Why the difference? is there a set of rules for what happens first, and/or an amount of maximal stuff that happen in the same time?

also, is there a priority for left/right/top boulder to fall to the same spot - as per level tut3?


DroidFreak36
[?] Karma: 0 | Quote - Link
Monday, October 3 2016, 12:57 am EST
HATPC Reborn Dev

Age: 30
Karma: 200
Posts: 491
Gender: Male
Location: droidfreak36.com
pm | email
Quote:
Does the boulder falling through ground glitch currently work?


No, and I'm not currently planning on implementing it.

Quote:
The leftmost culumn for example - why didn't it fall to the right for so long?


I'm not sure what exactly you are referring to. If you're talking about that one vertical tower that didn't cascade, that's due to a glitch (which I still haven't nailed down) where falling boulders can "land" on spikes while still staying in the falling state. I have also changed boulder behavior since then so that boulders which land on other falling boulders will actually cascade, so it doesn't currently form towers that tall, although the original glitch is still there.

Quote:
When you take a treasure, the one above it falls immediately. Why the difference? is there a set of rules for what happens first, and/or an amount of maximal stuff that happen in the same time?


Unlike in the original HATPC, there is no limit to how many operations get processed in one tick. In the original game, Chaos Theory's physics grind to a halt as the queue for falling objects filled up, but in my version, the physics still progresses at normal speed. So grabbing treasures causes the boulders to respond instantaneously - often to deadly effect.

Quote:
also, is there a priority for left/right/top boulder to fall to the same spot - as per level tut3?


What do you mean? In terms of directional biases, a boulder which can cascade in either direction will always choose left, and if two boulders both want to cascade into the same spot, the one on the left will generally win.




Quote:
Rictory for Ralkyon!

HATPC Reborn home page
shos
[?] Karma: 0 | Quote - Link
Monday, October 3 2016, 7:13 am EST
~Jack of all trades~

Age: 31
Karma: 389
Posts: 8273
Gender: Male
Location: Israel
pm | email
@last one:
imagine this
Code:
xox
ooo
ooo
xbx

I hit the box. which boulder moves?


DroidFreak36
[?] Karma: 0 | Quote - Link
Monday, October 3 2016, 11:01 am EST
HATPC Reborn Dev

Age: 30
Karma: 200
Posts: 491
Gender: Male
Location: droidfreak36.com
pm | email
Do you mean which of the 3 boulders will go through that spot in the middle first? The order would be left, right, top. Top has to have last priority for the second cascade part in tutorial level 3 to work - all the boulders cascading have to take priority over the treasure falling.




Quote:
Rictory for Ralkyon!

HATPC Reborn home page

« Forum Index < The Hannah and the Pirate Caves Board

In order to post in the forums, you must be logged into your account.
Click here to login.

© 2024 The Interguild | About & Links | Contact: [email protected]
All games copyrighted to their respective owners.