The Mossmouth Forums

Games => Source => Topic started by: TyrOvC on July 31, 2010, 08:30:22 AM



Title: The Spelunky Community Update Project
Post by: TyrOvC on July 31, 2010, 08:30:22 AM
Spelunky Community Update Project
For Players:
Windows Stable Release 2:
Mirror 1 (http://www.mediafire.com/?binjj13nvj2r60v)
Mirror 2 (http://spelunkylevels.tyr-net.net/spelunky12/downloadtracker.php?file=spelunky_1.2_July_3_2012.zip)
Mac:

Community made Spelunky Update.
Fixing as many bugs as we can hunt down, but only doing that, not adding anything or taking anything from the game.
Then modmakers will have an improved base to start working upon and won't have to fix bugs as they notice them, and anyone who wants to play the original Spelunky without the already discovered bugs will be able to do so, without having to play a mod that changes the game.

The Spelunky Community Update is also compiled with GameMaker 8.1, which has better performances and fixes several problems with hardware as compared to Spelunky 1.1's being compiled with GameMaker 8.

Fixed Bugs:
  • Yeti King does no damage in custom levels
  • Ankh respawn causes HUD to disappear
  • Death causes money to not finish updating
  • Levitating Player when hit by an enemy while climbing a rope
  • Damsel sound effect panning is backwards
  • Cape continues to flutter after death
  • Stunnable enemies never recover while in a web if they are not completely touching the ground
  • Arrow flying out of Player's hands when Player is hit can cause damage to self
  • Held arrows and rocks throw off Player collision checking
  • Hawkman type mislabeled as Yeti
  • Custom Levels could cause the mouse cursor to become visible
  • 'M' key does not properly select the music in custom levels
  • Four pixel wide gap between boulder trap's head and body
  • When playing as the tunnel man, when player meets the NPC tunnel man in the transition room, player sprite reverts to main dude sprite after talking to the NPC tunnel man.
  • When damsel is in idle state, she will not react to being hit with the machete, even when her HP is reduced to 0
  • Dead damsel makes sounds when her corpse is thrown or attacked with machete or bullets
  • Some objects trapped in lava will remain floating in air when the lava is destroyed
  • Player stunned sprite collision mask is wider than the standing sprite collision mask
  • When dead or stunned, held items do not fly out of player's hands due to duplicate code
  • When playing as the damsel and climbing the rope to exit on the title screen, sprite reverts back to main dude
  • Launching a rope up with the rope hotkey while holding a damsel and falling downwards, causes her to take damage
  • Kapala continues to collect blood when player is dead
  • Jars broken with the whip produce double the amount of contents
  • Compass doesn't work in custom levels
  • Stunned shopkeepers wake up when whipped
  • Arrows on the ground always face right
  • Zombies have no type
  • Dead fish have no type
  • Vampire deaths register incorrectly
  • ManTraps don't eat Yetis, Hawkmen, and Vampires
  • Ankh fails to teleport inside Moai if too far away
  • Skulls and Jars are active while off-screen
  • Shopkeepers guard exits in custom levels
  • Throws from Shopkeeper/Yeti/Hawkman don't count as being killed by them
  • Boulder deaths register as Crushed deaths
  • Parachute deploys too early
  • Short drops may cause fall damage due to a math bug
  • Bats have no type
  • Key sprite doesn't direction when facing right
  • MegaMouth's type is incorrect
  • Getting killed by Magma Men doesn't count as a Magma Man death
  • Getting crushed by a Smash Trap doesn't count as a Smash Trap death
  • Tomb Lord fails to spawn on level 13
  • Crumbling blocks above arrow traps fixed
  • Gold blocks now drop gold
  • ManTraps couldn't be crushed
  • Jars lack collision variables
  • Golden skull ceiling trap in the temple doesn't check if the side doors actually exist when triggered
  • City of Gold entrance could be covered up by the backdrop due to it having the wrong depth
  • ManTraps could eat more things while in the sleeping animation

For Developers and Translators:

I will keep a confirmed bug and confirmed fixed list in the start of this topic.  Anyone submitting a bug fix should post exactly all of the code they changed, where it is (what line! not oh it's somewhere in this script), and so forth.

Bugs that Need Tracking Down
-Rapidly entering and exiting water can cause bats to fly while in their hanging sprite
-When pushing a block, if there is nothing underneath the player, and the block falls, the player will float in the air in the pushing position until the jump key is pressed. Can happen in custom levels made with the two more advanced custom level editors, since trap circumstances can make both be in a place where they need to fall at the same time, by removing a row of blocks. Might rarely be possible in the default game in Area 2 too?

Possible Bugs:
Vines and lamps sometimes do not disappear/drop after the block above them is removed? Not default behavior but some mods changed this and it makes sense graphically.

Being thrown directly into a wall causes instant death due to being crushed. Does this count as a bug? Might be intentional gameplay.

Possible Non-Bugfixes, i.e. Optimization, etc.
These will be kept minimum as this is supposed to become a standard base for everyone to play and make mods off of. This will stay vanilla Spelunky, so anything that changes the main game is out.

- OS dependent game code is redone to be compilable both on Windows and Mac with only a few changes.

-Better screen scaling option implemented, select "Fit Screen" in the config and the game scales up to the computer's resolution, while maintaining aspect ratio.

-Dice can now be "gently" set down, by holding down and releasing a die without throwing it, not drawing the shopkeeper's ire.  Rerolling a die by throwing it causes normal behavior.

Source Code and Build Instructions

The source code for the Translations fork is in Gamemaker 8.1 (.gm81) for better foreign characterset support.

The base source is in Gamemaker 8 (.gmk) format, as that's what Spelunky was originally made in and since GameMaker is backwards compatible but not forwards compatible.

On Windows, it should be compiled and ran with Gamemaker 8.1

To submit source code changes to the project, either only edit the source code file that you submit with Gamemaker 8 Pro (not 8.1!), or post line numbers and changes in this topic and someone will merge them into the source code for you.


Source Code
Project now uses a Github repository! thanks to the wonderful Medo42. Instructions on how to use it at
https://github.com/tyrovc/SpelunkyCommunityUpdateProject


Base Source Code (Gamemaker 8 format):


Old Source Code
Spelunky 1.2r2 Base Gamemaker 8 Source Code:
http://www.spelunkylevels.tk/spelunky12/source_July_3_2012.zip

Latest Translations Source Code (Gamemaker 8.1)
http://www.spelunkylevels.tk/spelunky12/source_July_3_2012_translations.zip



WIP Translation Release 3
Note that this is in need of an overhaul to the format, and a lot of work. Actually making translations is too much of a pain at the moment, the format will be made better eventually. Code improvements are welcome though.

http://www.spelunkylevels.tk/mods/Spelunky_v1_2_3.zip
Translation Format:
Each translation gets its own directory in /languages/
That directory name should be lowercase ANSI compatible characters (abcdefghijklmnopqrstuvwxyz)

In that directory is:
flag.png
language.txt
text.txt
/sprites/ directory
font.gmspr (Optional)
fontsmall.gmspr (Optional)

Specifics:
flag.png:
32x24 image that represents the language in Config.exe's language selection menu

language.txt:
Information about the language the translation is to.
Contains:
name= Name of language shown in config.exe, should be localized to that language. Example: name= Deutsch / German

charset= What characterset is used for the language. Choose a characterset that contains all the characters the translation will use.

useimagefont=(true/false) Whether to use the included image fonts font.gmspr fontsmall.gmspr - Probably not feasible to use for languages like Japanese and Chinese

text.txt:
Equal sign separated values. Left side of the equal sign is the key in the code for the text, the right side is where the translated text goes.

Example:
Jetpack=MY HOVERCRAFT IS FULL OF EELS!
When a Jetpack is picked up, "MY HOVERCRAFT IS FULL OF EELS!" displays instead of "YOU GOT A JETPACK!"

Optional font.gmspr fontsmall.gmspr:
Exported game maker sprite files, to be used as fonts.

/sprites/ directory
Sprites is the portable network graphics (.png) format. Any image in this directory will replace any GameMaker sprite with the same name.
Example:
sQuitSign.png would replace the sQuitSign sprite.


Full change log
http://pastebin.com/NgCBMtd8

Credits
http://pastebin.com/kATkR4Qi


Title: Re: The Spelunky 1.2 Project
Post by: halibabica on July 31, 2010, 10:56:11 AM
Interesting!  I know there were a couple bugs I fixed in TLS that annoyed me in regular Spelunky.

First and most obvious, the Yeti King is supposed to do 2 damage when he touches you.  Another one is the bug that causes you to take fall damage when you jump along a ceiling.  I remember how I fixed both of these; I just need to dig up the scripts for them.

I'm sure there were others, but only those come to mind.  I improved the way piranhas choose their targets, if you think that would count...


Title: Re: The Spelunky 1.2 Project
Post by: Moloch on July 31, 2010, 11:39:13 AM
I kept a list of the 1.1 bugs i fixed in my mods along with thier locations for my reference. I will try to tidy it up for posting.

I was thinking of adding some sort of bug fixing tutorial category to the wiki a while ago, with pages for each bug and directions for which line numbers to change in the appropriate objects/scripts, but never got started on it.. but if there is going to be a community effort maybe the wiki would be a good place to document the changes made. It would be easier to view all the bug fixes on a category page rather than a multi-page forum thread.


Title: Re: The Spelunky 1.2 Project
Post by: Moloch on July 31, 2010, 03:43:05 PM
Double-post, yeah.


Bug: Yeti King doesn't do touch damage in custom levels.

Location:
oYetiKing > Collision with oCharacter Event, line 27

Old:
Code:
if (global.plife > 0 and isRealLevel())

New:
Code:
if (global.plife > 0 and isLevel())
   

   
Bug: If player is killed by the ghost and consumes the ankh to respawn, the HUD disappears.

Location:   
oGhost > Collision with oCharacter Event, line 18

Old:
Code:
global.drawHUD = false;

New:
Code:
//global.drawHUD = false;

Comment: There is code elsewhere that will change global.drawHUD to false when the player dies and does NOT have the ankh, so this line was redundant anyway.



Bug: If player is eaten by a mantrap and consumes the ankh to respawn, the HUD disappears.

Location:
oManTrap > Collision with oCharacter Event, line 46

Old:
Code:
global.drawHUD = false;

New:
Code:
//global.drawHUD = false;

Comment: Old line was redundant.



Bug:If player dies before 'collected' amount of money (yellow numbers) is finished being added to total amount of money, they will miss out on the 'collected' amount on their high score, even though the 'final score' on the game over screen will display the correct total.
   
Location:
oPlayer1 > Step Event > Second 'Execute a piece of code' block in the 'Hurt' section (the one with '//DIED' at the top)
   
Insert the following at line 69 (or somewhere within that 'else' statement:
Code:
global.money += global.collect;
global.xmoney += global.collect;
global.collect = 0;
   


Bug: If player is struck by an enemy while climbing rope, he can get knocked to the side and remain stuck levitiating in the air.

Location:
oEnemy > Collision with oCharacter Event

At line 18 you will see:
Code:
if (other.x < x)
other.xVel = -6;
else
other.xVel = 6;

Change it to:
Code:
if other.state != 14
{
if (other.x < x)
other.xVel = -6;
else
other.xVel = 6;
}



Bug: Damsel sound effect pan is backwards.
   
Location:
oDamsel > Step Event, lines 199-200

Old:
Code:
if (oPlayer1.x < x) SS_SetSoundPan(global.sndDamsel, -10000);
else if (oPlayer1.x > x) SS_SetSoundPan(global.sndDamsel, 10000);

New:
Code:
if (oPlayer1.x < x) SS_SetSoundPan(global.sndDamsel, 10000);
else if (oPlayer1.x > x) SS_SetSoundPan(global.sndDamsel, -10000);



Bug: Cape continues fluttering if you die while in the air.
   
Location:
oPlayer > Step Event, second 'Execute a piece of code' block in the 'Hurt' section

Add the following to the 'if (dead)' statement at the bottom:
Code:
if instance_exists(oCape) oCape.open = false;



Bug: Caveman, Hawkman, Yeti, Vampire and ManTrap will never recover from stun effect if they are caught in a web and not touching the ground.
   
Repeat the following procedure for oCaveman, oHawkman, oYeti, oVampire and oManTrap:

Add a new line to the Create Event code:
Code:
inWeb = false;

Insert the following around line 16-17 of the Step code (before the "if (status >= STUNNED)" statement):
Code:
if (collision_rectangle(x, y, x+15, y+15, oWeb, false, false)) inWeb = true
else inWeb = false;

Somewhere around line 156 in the Step Event find "if (held or colBot)" and change it to:
Code:
if (held or colBot or inWeb)
      


See next post for more.


Title: Re: The Spelunky 1.2 Project
Post by: Moloch on July 31, 2010, 03:55:35 PM

Bug: If the player is holding an arrow and gets hit by another arrow from an arrow trap, the arrow the player is holding will also damage the player as it flies out of the players' hands.

Location:
oPlayer1 > Step Event, the first 'Execute a piece of code' block, line 330

Insert the following between lines 337 and 338 (under the "holdItem.held = false;" line):
Code:
if (holdItem.type == "Arrow")
{
holdItem.safe = true;
holdItem.alarm[2] = 30;
}



Bug: Player is less likely to be hit by an arrow trap when holding an arrow because the collision check will often detect the held 'safe' arrow instead of the one flying at player.

Location:
oPlayer1 > Step Event, first 'execute a piece of code' block in the 'Hurt' section

Add the following at line 31, before the "if (collision_rectangle.." statement:
Code:
if (holdItem != 0) instance_deactivate_object(holdItem)

Add the following at line 85:
Code:
if (holdItem != 0) instance_activate_object(holdItem)

Comment: After looking at this again I decided to move the line that activates the held item again down to line 85, after the collision check with rocks, as the same bug would apply there too.  I've never been in a situation to be hit by a flying rock when carrying another rock, but if someone were to create a mod with a new enemy that throws rocks, it would prevent the same bug.
   


Bug: Hawkman is labelled as a Yeti.

Location:
oHawkman > Create Event, line 8

Old:
Code:
type = "Yeti";

Should be:
Code:
type = "Hawkman";

Comment: Probably just a copy/paste error. Does not actually cause any bugs as oHawkman uses its own collision with oCharacter event rather than the inherited one from oEnemy (which uses the 'type' variable) to count death stats.
      


Bug: Player can take damage from short falls (when head touches ceiling?).

Location:
oPlayer > Step Event, first 'execute a piece of code' section, line 253

Old:
Code:
if (yVel > 0 and state != CLIMBING)

New:
Code:
if (yVel > 1 and state != CLIMBING)

A side effect of this change prevents the player from taking damage from spikes if falling onto them from directly above (less than 1 tile).
To fix that, go to:
oPlayer > Step Event, first 'execute a piece of code' in the 'Hurt' section, line 212

Old:
Code:
if (colSpikes and yVel > 0 and (fallTimer > 4 or stunned))

New:
Code:
if (colSpikes and yVel > 0 and (fallTimer > 3 or stunned))
   

   
Bug: Mouse cursor becomes visible in the game window when player reaches the custom level end scene.

Fix: Add "window_set_cursor(cr_none)" to oEndCustom Create Event.



Bug: Mouse cursor remains visible after leaving the level loading screen and return to main menu.

Location:
oLoadLevel > Press ANY Key Event

Insert new line "window_set_cursor(cr_none);" at line 6, before the "room_goto(rTitle);" line.



Bug: If music is stopped then restarted with the 'M' key in a custom level, it will be reset to the 'cave' tune.

Location:
oGame > Press M-key Event

Old:
Code:
if (global.music)
{
    global.music = false;
    stopAllMusic();
}
else
{
    global.music = true;
    if (isLevel())
    {
        if (global.levelType == 1) playMusic(global.musLush, true);
        else if (global.levelType == 2) playMusic(global.musIce, true);
        else if (global.levelType == 3) playMusic(global.musTemple, true);
        else if (isRoom("rOlmec"))
        {
            if (oPlayer1.active)
                playMusic(global.musBoss, true);
        }
        else playMusic(global.musCave, true);
    }
    else if (isRoom("rTitle")) playMusic(global.musTitle, true);
}

New:
Code:
if (global.music)
{
    global.music = false;
    stopAllMusic();
}
else
{
    global.music = true;
    startMusic();
    if (isRoom("rTitle")) playMusic(global.musTitle, true);
}


Comment: The startMusic script is better at determining what music should be playing than the "if (isLevel())" statement used.


 ;D
I'll probably write up some more tomorrow.. I'm about halfway through my list.


Title: Re: The Spelunky 1.2 Project
Post by: halibabica on July 31, 2010, 04:03:53 PM
Ooh, while we're at it...there are some things about the stats file that need fixed.

Getting crushed by a boulder never registers as a boulder death.  Zombies have no enemy type, so getting killed by one never registers in the stats.  And, if killed after being thrown by a shopkeeper, hawkman, or yeti, it doesn't count as being killed by them.

I swear, I'll pull up the code I used to fix all this stuff when I feel like it!


Title: Re: The Spelunky 1.2 Project
Post by: TyrOvC on July 31, 2010, 04:58:37 PM
Okay, I went through these changes and added and tested them.  I adjusted some things to be more efficient, notably since all enemies have the stunned status the oWeb object that already does the collision checking for enemies stuck in the web also sets the inWeb variable now.  Also, for the player taking damage from short falls I think there might be a better way to fix it.  Just checking whether the yVel is not approximately zero seems to work well too, so I'm going to leave it at greater than 0.1 for now.

Also, I've noticed a small graphical bug, there is a four pixel wide gap between the boulder trap's head and body (which is actually quite noticeable on my setup).  Fixed in the roomGen script.

I'll update the first post with a fixed bug list and code for exactly what was fixed in a minute.


Title: Re: The Spelunky 1.2 Project
Post by: Pteriforever on July 31, 2010, 06:34:00 PM
No thank you.  ;D My 1.0b is perfectly good.


Title: Re: The Spelunky 1.2 Project
Post by: Patrick on July 31, 2010, 06:52:42 PM
No thank you.  ;D My 1.0b is perfectly good.
The version where Tunnel Man starts with the same health and items as Spelunker, and can do the mattock + jump exploit?
Ah, the good old days.


Title: Re: The Spelunky 1.2 Project
Post by: eguee on July 31, 2010, 07:28:54 PM
That's my favorite version.

Also, we could fliphang onto spikes 2 tiles tall. Ahh, nostalgia.

I'd like to suggest you include TLS's editor into this. I'd hate making levels with the normal editor.


Title: Re: The Spelunky 1.2 Project
Post by: halibabica on July 31, 2010, 07:40:07 PM
I'd like to suggest you include TLS's editor into this. I'd hate making levels with the normal editor.
I was thinking of suggesting this, but I'm not sure if we should.  This isn't supposed to be a mod of Spelunky so much as it is a bug fix.  But including handy features from TLS' editor in this does sound like a good idea.  Specifically the drag boxes and tab menu (and maybe the autosave at level start feature).  I'd leave all the extra tiles out, though.  That's what Editor + is for.  Leave out layers, too.  We don't want to alter it too much.


Title: Re: The Spelunky 1.2 Project
Post by: TyrOvC on July 31, 2010, 07:46:56 PM
Well see, I'm debating that too.  While we could add the whole thing, layers and all (with an improved level format, static data before variable!), this is first and foremost a bug fix.  I want all of us to introduce a new stable version of Spelunky for not just people to make mods with, but general people who just want to play the vanilla Spelunky to play.

So obviously anything that changes the main game is out, but perhaps we could take a vote on improving the level editor?

Also though, didn't hyperme say that he's not adding layers to editor plus?


Title: Re: The Spelunky 1.2 Project
Post by: halibabica on July 31, 2010, 08:23:06 PM
I'm in favor of improving the editor's functionality, but not expanding its capabilities (ie no layers).  And yes, hyperme doesn't think layers are at all necessary (I'm not so sure they are myself), so I doubt he'll ever add them to Editor +.


Title: Re: The Spelunky 1.2 Project
Post by: grieck on July 31, 2010, 09:05:19 PM
I say include the editor, layers and all. It is a marvelous resource for Spelunky, fixing any possible problems/bugs that the normal editor might have while adding new stuff.


Title: Re: The Spelunky 1.2 Project
Post by: eguee on August 01, 2010, 06:19:45 AM
Making underwater levels is also impossible without it. Layers+Drag Box=Win. Tab dialog box=More Win. +Extra traps, customizable miniboss drops and Category 6 items=Epic Win.


Title: Re: The Spelunky 1.2 Project
Post by: halibabica on August 01, 2010, 06:27:46 AM
Making underwater levels is also impossible without it. Layers+Drag Box=Win. Tab dialog box=More Win. +Extra traps, customizable miniboss drops and Category 6 items=Epic Win.

I really think that defeats the purpose of having editor plus.  Yeah, all those things are nice, but perhaps we should convince/help hyperme include them in that instead.  Don't forget, this is just supposed to be a bug fix!  Making the editor handier is just a potential bonus!


Title: Re: The Spelunky 1.2 Project
Post by: Moloch on August 01, 2010, 11:29:57 AM
I also wouldn't mind seeing the TLS editor usability features included, I don't think anything that changes the original level format (new tiles, layers) should be added.


(Sorry the line numbers below refer to the original source, but they probably still match up.)

Bug: When playing as the tunnel man, when player meets the NPC tunnel man in the transition room, player sprite reverts to main dude sprite after talking to the NPC tunnel man.

Location:
oTunnelMan > Step Event, line 35

Old:
Code:
with oPDummy
{
status = TRANSITION;
if (global.isDamsel) sprite_index = sDamselRunL;
else sprite_index = sRunLeft;
}

New:
Code:
with oPDummy
{
status = TRANSITION;
if (global.isDamsel) sprite_index = sDamselRunL;
else if (global.isTunnelMan) sprite_index = sTunnelRunL;
else sprite_index = sRunLeft;
}



Damsel behaviour bugs:
(Grouped together because location overlaps)
- When damsel is in idle state, she will not react to being hit with the machete, even when her HP is reduced to 0.
- Dead damsel makes sounds when her corpse is thrown or attacked with machete or bullets.

Location 1 and 2:
oDamsel > Collision with oWhip Event, and Collision with oWhipPre Event (replace the code in both these events with the code below)
Code:
if (other.type == "Machete" and hit == 0)
{
     if hp > 0 playSound(global.sndDamsel);
     hp -= other.damage;
     hit = 10;
     yVel = -2
     playSound(global.sndHit);
     if (bloodLeft > 0)
     {
        scrCreateBlood(x+sprite_width/2, y+sprite_height/2, 1);
        if (hp < 0) bloodLeft -= 1;
     }
     if (forSale)
     {
        scrShopkeeperAnger(3);
     }
     if hp > 0 status = THROWN;
}
else if (status != THROWN and (status < EXIT or status == SLAVE or status == KISS) and hit == 0)
{
    yVel = -2;
    hit = 10;
    playSound(global.sndHit);
    if hp > 0 playSound(global.sndDamsel);
    if (forSale)
    {
        scrShopkeeperAnger(3);
    }
}

Location 3:
scrUseItem, line 602

Old:
Code:
playSound(global.sndDamsel);

New:
Code:
if holdItem.hp > 0 playSound(global.sndDamsel);

Location 4:
oBullet > Collision with oDamsel Event, line 21

Old:
Code:
playSound(global.sndDamsel);

New:
Code:
if other.hp > 0 playSound(global.sndDamsel);



Bug: Some objects trapped in lava will remain floating in air when the lava is destroyed.

Locations:
oJar > Step Event, line 81
oTreasure > Step Event, line 69
oSkull > Step Event, line 79
oDice > Step Event, line 96

Add "else myGrav = 0.6;" to the end of the lava collision check statement in all three locations so it looks like this:
Code:
if (collision_rectangle(x-3, y-3, x+3, y+3, oLava, 0, 0))
{
myGrav = 0;
xVel = 0;
yVel = 0;
y += 0.05;
}
else myGrav = 0.6


   
Bug: If the player is stunned and falling, landing at the very edge of a ledge means that he may continue as soon as he wakes up because the stunned sprite collision mask is wider than the standing sprite collision mask.

Fix:
sStunL, sDamselStunL and sTunnelStunL > Modify Mask
   - set Bounding Box to Manual
   - set Left to 2
   - set Right to 13
   - make sure these settings are the same for all frames
   


Title: Re: The Spelunky 1.2 Project
Post by: Moloch on August 01, 2010, 11:36:48 AM
Bug: When dead or stunned, held items do not fly out of player's hands as (I beleive) Derek intended due to duplicate code in the same step.

Location 1:
oPlayer1 > Step Event, first 'Execute a piece of code' block, line 330

Old:
Code:
if (holdItem)
{
if (holdItem.type == "Bow" and bowArmed)
{
scrFireBow();
}
holdItem.visible = true;
holdItem.held = false;
if (holdItem.type == pickupItemType)
{
holdItem = 0;
pickupItemType = "";
}
else scrHoldItem(pickupItemType);
//holdItem = 0;
//pickupItemType = "";
}

New:
Code:
if (holdItem)
{
if (holdItem.type == "Bow" and bowArmed)
{
scrFireBow();
}

holdItem.visible = true;
holdItem.held = false;

if (holdItem.type == "Arrow")
{
holdItem.safe = true;
holdItem.alarm[2] = 30;
}     

holdItem.xVel = xVel;   
holdItem.yVel = -3;

if (holdItem.type == "Damsel")
{
holdItem.status = 2;
holdItem.counter = 120;
}   

if (holdItem.type == pickupItemType)
{
holdItem = 0;
pickupItemType = "";
}
else scrHoldItem(pickupItemType);
}
   

Location 2:
oPlayer1 > Step Event, first 'Execute a piece of code' block under the 'Hurt' section
Comment out or delete the following code (lines 233-255):
Code:
if ((dead or stunned) and holdItem != 0)
{
    holdItem.held = false;
   
    holdItem.xVel = xVel;
    holdItem.yVel = -6;
    holdItem.armed = true;
    if (holdItem.type == "Damsel")
    {
        holdItem.status = 2;
    }
    else if (holdItem.type == "Bow")
    {
        scrFireBow();
    }
   
    if (holdItem.type == pickupItemType)
    {
        holdItem = 0;
        pickupItemType = "";
    }
    else scrHoldItem(pickupItemType);
}

Comments: This includes the fix listed previously for the bug where player takes damage from the arrow he is was holding when hit by another arrow.



Bug: When playing as the damsel and climbing the rope to exit on the title screen, sprite reverts back to main dude.

Location:
oPDummy5 > Create Event, line 5

Old:
Code:
if (global.isTunnelMan) sprite_index = sTunnelClimb2;

New:
Code:
else if (global.isTunnelMan) sprite_index = sTunnelClimb2;



Bug: If you launch a rope up with the rope hotkey while holding a damsel and falling downwards, it will damage her.

Location:
oRopeThrow > Create Event

Add the following lines:
Code:
safe = true;
alarm[2] = 30;



Bug: Kapala continues to collect blood when player is dead.

Location:
oPlayer1 > Collision with oBlood Event, line 1

Old:
Code:
if (global.hasKapala and other.collectible)

New:
Code:
if (global.hasKapala and other.collectible and not dead)

Comment: Has no effect on gameplay since you are already dead, but doesn't make much sense. To see this in action, die on spikes with the kapala, and you will endlessly collect your own blood, generating hearts.



Bug: Breaking jars with the whip produces double amount of contents.

Location:
oJar > Collision with Whip Event

Delete all the code and replace it with:
Code:
instance_destroy();

Comment: Duplicate code. Jar contents are generated in the Destroy event.



Bug: Compass doesn't work in custom levels.

Location:
scrLoadLevel

Insert the following after line 104:
Code:
if (obj)
{
global.exitX = obj.x;
global.exitY = obj.y;
}



Bug: Stunned shopkeeper wakes up when whipped.

Locations:
oShopkeeper > Collision with oWhip Event, and Collision with oWhipPre Event

Change line 18 in both events to:
Code:
if status < STUNNED status = ATTACK;



Bug: Arrows on the ground always face right.

Location:
oArrow > Step Event, line 18

Old:
Code:
else if (not stuck) direction = 0;

New:
Code:
else if (not stuck)
{
    if direction > 90 and direction < 270 direction = 180
    else direction = 0;
}



Annoyance: Accidentally picking up the die that has already been rolled (especially when they overlap) in the craps game angers the shopkeeper. Avoiding overlap by cautiously dropping the dice instead of flinging them around the room is no fun. This fix prevents the first rolled die from being able to be picked up until you finish the craps game by rolling the second die.

Location 1:
oDice > Step Event, line 219

Old:
Code:
if (rolling and yVel == 0)
{
if (rolled) scrShopkeeperAnger(0); // NO CHEATING!
rolled = true;
rolling = false;
}

New:
Code:
if (rolling and yVel == 0)
{
if (rolled) scrShopkeeperAnger(0); // NO CHEATING!
rolled = true;
canPickUp = false;
rolling = false;
}


Location 2:
oShopkeeper > Step Event, line 160

Old:
Code:
if (not rolled) global.diceRolled = false;

New:
Code:
if (not rolled) { global.diceRolled = false; canPickUp = true; }

Location 3:
oShopkeeper > Step Event, line 220

Old:
Code:
with oDice { rolled = false; }

New:
Code:
with oDice { rolled = false; canPickUp = true;}
   


Title: Re: The Spelunky 1.2 Project
Post by: TyrOvC on August 01, 2010, 12:13:56 PM
I'm not really sure whether to add the craps fix.  Its one of those rougelike touches that you can anger the shopkeeper by cheating, accidentally or not, and it was probably intended that a new player could attempt to cheat.

Instead, I think maybe the code should be changed to where the player is only cheating if they throw the dice causing it to roll again, and have it to where doing the crouched down gently dropping the dice doesn't count as cheating.

Edit: Actually yeh, I'll code a change that causes the dice only to be rolled if you actually throw it, and make it to where the shopkeeper's ire is not drawn simply by picking up an all ready rolled die.


Title: Re: The Spelunky 1.2 Project
Post by: halibabica on August 01, 2010, 12:38:34 PM
Why does nobody seem to realize that it's impossible to cheat in Spelunky craps.  You roll one die.  You roll the other.  The end result is random every time.  Even if you reroll one die, it has no bearing on the outcome of the other.

That said, I really think it should be made so that a rolled die cannot be rolled again.  There's no point in angering the shopkeep over 'cheating' when no such thing can be accomplished in the first place.


Title: Re: The Spelunky 1.2 Project
Post by: TyrOvC on August 01, 2010, 01:07:19 PM
According to the bell curve you can cheat.  What number is rolled on one die effects the probability of what the outcome will be, and using the formula you can accurately predict what the outcome will be.
(http://upload.wikimedia.org/math/9/e/1/9e1e4a3af93c9680ba75669a0b69fbf6.png)

Anyway though, I guess we could go ahead and make it to where it can't be rolled again.  I still like the idea of being able to anger the shopkeeper though (but making it more forgiving by letting you set the accidentally picked up die down).


Title: Re: The Spelunky 1.2 Project
Post by: halibabica on August 01, 2010, 01:12:23 PM
No, wait, hold on a sec.  I'll be completely honest; this never occurred to me until just today.  While it is impossible to cheat in trying to get the item on display at the craps house, it is very much possible to cheat for more money.  Rolling something low first would tempt the player to roll again so they can potentially come out on top.

In light of that, I think your previous proposed method is a better idea.  If they pick up the wrong die by accident, setting it down gently will not reroll it.  If they try to reroll it with a normal throw, they get BULLETS.


Title: Re: The Spelunky 1.2 Project
Post by: TyrOvC on August 01, 2010, 01:49:31 PM
Turns out that changing line 211 of oDice's step event from
Code:
if (abs(yVel) > 2 or abs(xVel) > 2)
to
Code:
if (abs(yVel) > 2 or abs(xVel) > 6)
does a wonderfully good job of only rolling the die if you actually throw it, not if you set it down.  I haven't tested it with a pitcher's mitt yet though, so I don't know if that would increase the horizontal velocity enough to trigger it when just set down.


Title: Re: The Spelunky 1.2 Project
Post by: TyrOvC on August 05, 2010, 06:08:24 PM
Updated with the latest bug fixes.

I'll start going through that mess of a bug list at the Spelunky wiki when I get the time.


Title: Re: The Spelunky 1.2 Project
Post by: marsgreekgod on August 06, 2010, 10:30:53 AM
Making underwater levels is also impossible without it. Layers+Drag Box=Win. Tab dialog box=More Win. +Extra traps, customizable miniboss drops and Category 6 items=Epic Win.

I really think that defeats the purpose of having editor plus.  Yeah, all those things are nice, but perhaps we should convince/help hyperme include them in that instead.  Don't forget, this is just supposed to be a bug fix!  Making the editor handier is just a potential bonus!
yes, yes it does. But it does make this more likely to be used.


Title: Re: The Spelunky 1.2 Project
Post by: halibabica on August 07, 2010, 04:54:00 AM
In the script scrInitLevel, it says at line 246:

if (global.murderer or global.thiefLevel > 0)
{
    with oExit
    {
        if (type == "Exit")
        {
            obj = instance_create(x, y, oShopkeeper);
            obj.status = 4;
        }
    }
    // global.thiefLevel -= 1;
}

Simply change it so it says:

if ((global.murderer or global.thiefLevel > 0) and isRealLevel())

This will stop Shopkeepers from spawning at exits in custom levels, because that is some seriously lame crap.

Also, I don't know if you would consider this a glitch or not, but jars generate two objects when whipped as opposed to when they're destroyed by other means.  This is because of repetitive data.  Jars are already set to generate something when they're destroyed, but in its collision event with the whip, it has the same data again.  Thus, one is created from the collision, and another created from the destruction.  Removing the extra data from the whip event and simply leaving it at 'instance_destroy();' should fix it.

Unless we don't want to fix this, because it is kinda nice getting multiple rewards from the same jar.  Alternatively, we could make it so the jar's destruction always results in two rewards by having it repeat its destruction event twice.  We'd still have to take out the whip data, though.
 And it turns out you already fixed that.

EDIT EDIT: Here are a couple more for you!

Zombies have no type: add a line to the Zombie's create code that says 'type = "Zombie";'.  Easy!

Yeti/Hawk/Shop throws don't count as kills for them: this one's a little trickier.  First, you need to add some code to the player's create event.  These three lines here:

shopThrow = false;
yetiThrow = false;
hawkThrow = false;

Next, in the player collision events of those three enemies, add a line in their throwing code that sets one of these variables to true.  You'll also have to set the others to false.  So, for example, under the shopkeeper's throw code, it should say somewhere:

with (other)
{
yetiThrow = false;
hawkThrow = false;
shopThrow = true;
}

Finally, in the player's step event (Hurt section, part 1, if (dead or stunned) code), find the line that says 'if (wallHurt > 0)' (lines 359 and 385 in TLS).  The code here says:

global.plife -= 1;
wallHurt -= 1;

Add this between those two lines:

if (global.plife <= 0)
{
if (shopThrow and isRealLevel()) global.enemyDeaths[19] += 1;
else if (yetiThrow and isRealLevel()) global.enemyDeaths[13] += 1;
else if (hawkThrow and isRealLevel()) global.enemyDeaths[18] += 1;
}

It must be added in both of those places.  This will register damage from being thrown as done by those enemies and count as a kill by them if it's fatal.  But there's one more thing you must add!

At the end of the 'if (dead or stunned)' code, add the following:

if (wallHurt = 0)
{
shopThrow = false;
yetiThrow = false;
hawkThrow = false;
}

This way, the variables turn off if the player survives the throw.  Whew, that one was complicated!

Crushed by boulder doesn't count as boulder death: another easy fix.  In the player's step event (Hurt section, collision x y solid code (line 12 in TLS)), there's a code that says:

if (isRealLevel())
{
if (isRoom("rOlmec")) global.enemyDeaths[22] += 1;
else global.miscDeaths[2] += 1;
}

Change it to this:

if (isRealLevel())
{
if (isRoom("rOlmec")) global.enemyDeaths[22] += 1;
else if collision_point(x, y, oBoulder, 0, 0) global.miscDeaths[5] += 1;
else global.miscDeaths[2] += 1;
}

~tada.

Also, TyrannicalOverlordC, were you able to fix the short fall damage glitch?  Did the yVel Approximately Zero thing work?  If not, I can detail all the horrible crap I had to do to fix it.


Title: Re: The Spelunky 1.2 Project
Post by: marsgreekgod on August 07, 2010, 12:05:50 PM
Just poping in to say, this looks really well planed and ordered..

good job guys.


Title: Re: The Spelunky 1.2 Project
Post by: halibabica on August 15, 2010, 06:29:49 AM
Hey, I'm not sure if this is something we ever planned to change, but ManTraps don't eat Hawkmen, Yetis, or Vampires in editor levels.  It's kinda cool having them all be buddies, but it doesn't really make sense.  All the sprites we'd need are in TLS' source, and the script would be copy+paste for each one.

Also, should we employ the improved target tracking I gave piranhas?

Hey, also!  If you die with ankh too far away from the Moai in the regular game, it will fail to teleport you inside it.  I fixed it in TLS, but I think there might be a better way.  I'll put whatever I come up with here later.

EDIT: Jars, Skulls, and Rope Ends tend to fall through solids while off-screen.  If you add the code at the top of the step event script for oItem to jars and skulls, it will fix this.  Code being this:

if ((x > view_xview[0]-16 and x < view_xview[0] + view_wview[0]+16 and
    y > view_yview[0]-16 and y < view_yview[0] + view_hview[0]+16) or
    type == "Rope")

It's the x_view y_view requirements that are important for jars and skulls.  To fix rope ends, change the part that says 'or type == "Rope"' to 'or (type = "Rope" and armed)'.  This will stop them from falling through solids when dropped, but still allow them to activate in the frozen zone.  Don't forget to add the curly braces around the whole step event underneath!

We didn't forget about this project, did we?


Title: Re: The Spelunky 1.2 Project
Post by: TyrOvC on August 15, 2010, 08:34:32 AM
Nope! I just got distracted.  I'll get on updating this tomorrow.


Title: Re: The Spelunky 1.2 Project
Post by: halibabica on August 17, 2010, 06:20:38 PM
More broken stuff!

Getting killed by a Vampire doesn't register as such in the stats file.  Likewise, getting killed by a dead piranha doesn't count as anything.  The Vampire's easy to fix, but the piranha will require more work since it adds something new to the stats file.  I'll post about it again once I figure out a compatible way.

Also, TOC, have you made any significant changes to TLS' source lately?  Because there are a bunch of things I'd like to fix, and I don't want for either of us to do double work.


Title: Re: The Spelunky 1.2 Project
Post by: Moloch on August 21, 2010, 01:35:09 PM
Hey, I'm not sure if this is something we ever planned to change, but ManTraps don't eat Hawkmen, Yetis, or Vampires in editor levels.  It's kinda cool having them all be buddies, but it doesn't really make sense.  All the sprites we'd need are in TLS' source, and the script would be copy+paste for each one.

I support this suggestion, and i'm assuming you won't mind if I use the above mentioned sprites in my mod even if TOC doesn't add them to 1.2?

Hey, also!  If you die with ankh too far away from the Moai in the regular game, it will fail to teleport you inside it.  I fixed it in TLS, but I think there might be a better way.  I'll put whatever I come up with here later.

I haven't checked the TLS source to see what you did, but in oLevel > Step where it deactivates/activates instances I just added the Moai to the list of instances that always get reactivated.

Getting killed by a Vampire doesn't register as such in the stats file.  Likewise, getting killed by a dead piranha doesn't count as anything.  The Vampire's easy to fix, but the piranha will require more work since it adds something new to the stats file.  I'll post about it again once I figure out a compatible way.

Maybe just have dead piranhas count as living ones if you don't want to mess with the stats file format (not out of laziness, but for compatibility between mods and the original game in the same folder).


Title: Re: The Spelunky 1.2 Project
Post by: kinnik on August 21, 2010, 03:02:37 PM
Thank you everyone (esp Moloch for the line by line)!!  I added some of the fixs to my mod.  I really needed the fall damage fix.. ;p Keep it up!!


Title: Re: The Spelunky 1.2 Project
Post by: halibabica on August 21, 2010, 07:40:31 PM
i'm assuming you won't mind if I use the above mentioned sprites in my mod even if TOC doesn't add them to 1.2?
Of course you may!  TLS is open-source just like the game it was spawned from.


Title: Re: The Spelunky 1.2 Project
Post by: TyrOvC on August 24, 2010, 02:23:35 PM
If anyone wants to compile the latest fixes into the source, feel free! I think I've had ~3 hours of free time in the past week, so needless to say I've been obscenely busy.  I'll of course update the topic and such.


Title: Re: The Spelunky 1.2 Project
Post by: halibabica on August 24, 2010, 06:36:55 PM
I'll do it! ;D

EDIT: Done!  Here's a list of all the things I fixed.

Zombies have no type
Dead fish have no type
Vampire deaths register incorrectly
ManTraps don't eat Yetis, Hawkmen, and Vampires
Ankh fails to teleport inside Moai if too far away
Skulls and Jars are active while off-screen
Shopkeepers guard exits in custom levels
Throws from Shopkeeper/Yeti/Hawkman don't count as being killed by them
Boulder deaths register as Crushed deaths
Parachute deploys too early
Short drops may cause fall damage
Bats have no type
Key changes when facing right
MegaMouth's type is incorrect
Getting killed by Magma doesn't count as a Magma Man death
Getting crushed by a Smash Trap doesn't count as a Smash Trap death

All things stats file-related have been fixed.  I set dead fish to register as Piranha deaths.  However, I didn't improve the way piranhas track their targets.  I still can, if you want me to.

Also, sometimes Tomb Lord fails to spawn on L13.  I fixed this in TLS by setting him to appear above the Exit door if he didn't spawn elsewhere.  Should I put that in Spelunky 1.2?

Screw it; I fixed the Tomb Lord not-show-up glitch.  I also fixed the blocks in the first area so they don't crumble when Arrow Traps spawn on top of them.

Here's that updated source: http://www.mediafire.com/?u1s9s4g18jz9r1a


Title: Re: The Spelunky 1.2 Project
Post by: TyrOvC on September 06, 2010, 09:43:32 PM
Okay, finally tested and updated the topic.


Title: Re: The Spelunky 1.2 Project
Post by: halibabica on September 07, 2010, 04:29:04 AM
Don't forget, I fixed the Tomb Lord and crumbling block problems, too (I noticed they weren't on the bug list).


Title: Re: The Spelunky 1.2 Project
Post by: ptmc2112 on September 29, 2010, 12:24:20 PM
could someone build it? I would like to try it.


Title: Re: The Spelunky 1.2 Project
Post by: halibabica on September 29, 2010, 02:02:21 PM
Build what?  We already have the most up-to-date version in this topic.  Or did you want it as an .exe?  If so...

Spelunky 1.2 (http://www.mediafire.com/?8wmjancs844mlda)


Title: Re: The Spelunky 1.2 Project
Post by: ptmc2112 on September 29, 2010, 02:50:25 PM
Yeah, I meant for someone to make an .exe...

Thanks though!


Title: Re: The Spelunky 1.2 Project
Post by: TyrOvC on September 29, 2010, 06:44:21 PM
Added that link to the Halibabica's build to the topic.

Hadn't thought to upload an already built one yet.


Title: Re: The Spelunky 1.2 Project
Post by: halibabica on October 13, 2010, 05:37:37 PM
I fixed some stuff!  It turns out I added the code for forcing Tomb Lord to appear in the wrong place, causing him to never appear anywhere BUT above the exit.  Such is no longer the case.

I also fixed the bug that caused gold push blocks not to drop treasure in the city of gold, and made it so ManTraps can be crushed by solid objects.

I was thinking of removing the code from Yetis that makes them alert nearby Cavemen and Hawkmen when they spot the player, but I thought I'd better ask first.

Otherwise, here's both the updated mod and source.


Updated again!  For the list in the OP:

 - Tomb Lord fails to spawn on L13
 - gold blocks don't drop gold
 - ManTraps can't be crushed
 - Jars lack collision variables

Spelunky 1.2 (http://www.mediafire.com/?zuwh7qd6hqeaccq)

1.2 Source (http://www.mediafire.com/?71o89ewbk3tklaa)


Title: Re: The Spelunky 1.2 Project
Post by: TyrOvC on October 13, 2010, 07:03:00 PM
Updated the OP


Title: Re: The Spelunky 1.2 Project
Post by: leafbarrett on October 27, 2010, 08:12:56 AM
Hmm. Does this version keep track of total treasure collected?

And for the thrown into wall glitch: I have no experience with Game Maker (literally; never even used it before), but couldn't you make it so that instead of being moved to behind the thrower when thrown, you're just moved to the thrower's position?


Title: Re: The Spelunky 1.2 Project
Post by: Kegluneq on October 27, 2010, 08:33:38 AM
Or just in the frame where you're behind the thrower, you are invincible and don't get crush death'd.


Title: Re: The Spelunky 1.2 Project
Post by: leafbarrett on October 27, 2010, 08:48:43 AM
Or just in the frame where you're behind the thrower, you are invincible and don't get crush death'd.
That works too. Are you only behind them for 1 frame?


Title: Re: The Spelunky 1.2 Project
Post by: Kegluneq on October 27, 2010, 03:31:38 PM
Or 2. Can't be more than that.


Title: Re: The Spelunky 1.2 Project
Post by: leafbarrett on November 04, 2010, 07:53:40 AM
When you pick up an arrow, the arrow always stays in the direction it was facing when you picked it up, no matter what direction you're facing.


Title: Re: The Spelunky 1.2 Project
Post by: Bae on November 04, 2010, 12:40:41 PM
I thought it always just faced right :0 but that would be something id like to see changed


Title: Re: The Spelunky 1.2 Project
Post by: leafbarrett on November 04, 2010, 12:49:27 PM
I thought it always just faced right :0 but that would be something id like to see changed
They fixed the always facing right glitch. That's what allowed this glitch to show up: since it can face both right and left now, you can actually tell that it's not turning with you.
...On closer inspection, rocks do this as well.


Title: Re: The Spelunky 1.2 Project
Post by: AileTheAlien on November 26, 2010, 12:23:07 AM
Bug:
You can get free arrows for your bow from shops.
When you pick up a new bow, you gain the arrows from it.
All bows then have the same amount of arrows, so shooting from either bow will drain your supply.
The problem is that when you pick up a bow in a shop, it adds the arrows before you purchase it.
So, just pick up the unpaid bow, put it back down, and now you've got more arrows.

Fix:
1. Easier solution: only add the arrows after you buy the new bow.
2. Harder solution: have all bows hold individual supplies.

Not sure which one actually makes more sense.
Are we counting bows as magically being glued to their respective quivers or not?
Also, I don't know if your arrow count resets if you drop a bow, exit the level, and pick up a new bow on the next level.


Title: Re: The Spelunky 1.2 Project
Post by: Wonkyth on November 26, 2010, 12:32:50 AM
Actually, I don't mind the idea of getting arrow refills, wether free or not.


Title: Re: The Spelunky 1.2 Project
Post by: ManaUser on November 26, 2010, 10:27:14 AM
For that matter what about the bug where you can shoot bombs... without using up any bombs. Or is that not considered a bug?


Title: Re: The Spelunky 1.2 Project
Post by: Patrick on November 26, 2010, 03:29:55 PM
For that matter what about the bug where you can shoot bombs... without using up any bombs. Or is that not considered a bug?
Shh!


Title: Re: The Spelunky 1.2 Project
Post by: Bae on November 26, 2010, 07:04:24 PM
That is the best bug that i also forget to exploit

Remember the indie mantra! If its fun then its not a bug!


Title: Re: The Spelunky 1.2 Project
Post by: Kegluneq on November 27, 2010, 02:07:39 AM
http://tvtropes.org/pmwiki/pmwiki.php/Main/RuleOfFun


Title: Re: The Spelunky 1.2 Project
Post by: ManaUser on November 27, 2010, 02:25:08 PM
It's probably beyond the scope of 1.2, but the bow really needs an overhaul. Currently that bug is pretty much the only use for it at all. I mean it's the weakest weapon AND the only one with limited ammo.


Title: Re: The Spelunky 1.2 Project
Post by: Patrick on November 27, 2010, 02:51:03 PM
It's probably beyond the scope of 1.2, but the bow really needs an overhaul. Currently that bug is pretty much the only use for it at all. I mean it's the weakest weapon AND the only one with limited ammo.
I think it's fine. Carrying a bow around is a small price to pay to have a rocket launcher.


Title: Re: The Spelunky 1.2 Project
Post by: Delver on April 05, 2011, 05:08:14 PM
Fixed two small bugs:

When you pick up an arrow, the arrow always stays in the direction it was facing when you picked it up, no matter what direction you're facing.

in oArrow/Step:

    if (xVel > 0 and yVel < 0)
    {
        ...
    }

//adding the code below
    if (held)
    {   
        if (oPlayer1.facing == 18)
        {
            direction = 180;
        }
        else
        {
            direction = 0;
        }
    }
//end

    image_angle = direction;

    // ensure the arrow does not shoot through the target in the Moon challenge
    if (isRoom("rMoon"))
    {
        ...
    }

The second fix stops the mantrap from eating the spelunker while falling to sleep:

in oManTrap/oCharacter:

    ...

    else if (other.visible and other.invincible == 0)
    {
//added "and status != SLEEPY to below line
        if (status != STUNNED and status != EATING and status != SLEEPY)
        {
        ...
        }
    }



Spelunky1.2.gmk
http://www.mediafire.com/?s3bvdm5c9s62kiv

Spelunky1.2.exe
http://www.mediafire.com/?q1kw172f0e0a1xb



Title: Re: The Spelunky 1.2 Project
Post by: TyrOvC on March 09, 2012, 10:13:42 PM
Instead of using Gamemaker 8, the game should be compiled with Gamemaker 8.1 Standard edition. It fixes a lot of bugs and performs way better then the old Gamemaker 8 did. Most of the black screen and other odd issues that happen on some computers are fixed by 8.1


I recompiled the game with Gamemaker 8.1 Standard edition and uploaded it. Source code is still .gmk though.


Edit:
For an example of the improved performance, I tried running the game with the instance_deactive/instance_activate code removed (Frozen Zone) with compiled with both versions on an older Celeron D processor. With GM8, it dipped down below 30fps at times. With GM8.1, it stayed at a constant 30fps.


Title: Re: The Spelunky 1.2 Project
Post by: TyrOvC on April 05, 2012, 06:45:01 PM
Started working on a format for loading translations to other languages. Planned format so far:

program_directory/languages/

holds separate language folders. Each folder should have a simple ANSI name based on the language it contains. For example, English would be "en" and Russian would be "ru". This directories contents are parsed by config.exe, which lets players choose a language.

Each language folder contains:

flag.png 32x24 image that is displayed next to the language name in config.exe

text.txt Will contain equal sign separated list of text keys + values.
Example:
Shopkeeperangermurderer=YOU'LL PAY FOR YOUR CRIMES
Udjateye=YOU GOT THE UDJAT EYE!
Udjateye2=YOU FEEL AWAKENED.

language.txt - Contains long name that will show in config.exe, and the name of the characterset that the language uses
Example:
name=ENGLISH
charset=ANSI_CHARSET

"sprites" directory
Should contain sprites in the png format. Sprites with the same name as any files contained within the sprites directory are replaced. sFont and sFontSmall should not be replaced here, fonts will require special handling.


Still working out how to deal with the image font used by Spelunky. Playing around how GameMaker 8.1 deals with other character sets and font_replace_sprite();

What I have done so far:
Code:
//
// scrLoadLanguage(String language identifier)
//
// Loads language from \languages\argument0
//
// Example usage: scrLoadLanguage("en")  loads english language
var languageid, filepointer, spritemap, i, tempsprite, spritename, spriteindex;
languageid=argument0;

//Load Sprites
//First, need to map sprite_index ids to sprite names so that we can replace them based on filename
    tempsprite = sprite_create_from_screen(0,0,1,1,false,false,0,0);//Make a new sprite and use it to get the highest sprite_index value
    sprite_delete(tempsprite);
    spritemap=ds_map_create();
    for (i=0; i<tempsprite; i+=1) {
        if (sprite_exists(i)) {
            ds_map_add(spritemap,sprite_get_name(i),i);
        }
    }

file_find_first(program_directory+"\languages\"+languageid+"\sprites\*",false);

filepointer=file_find_next();
while(filepointer!=""){
    spritename=filename_change_ext(filepointer,"");
    spriteindex=ds_map_find_value(spritemap,filepointer);
    if(sprite_exists(spriteindex)){
        sprite_replace(sprite_index,program_directory+"\"+languageid+"\sprites\"+filepointer,sprite_get_number(spriteindex),false,false,sprite_get_xoffset(xorig),sprite_get_yoffset(yorig));
        filepointer=file_find_next();
    }
}
file_find_close();
ds_map_destroy(spritemap);


Title: Re: The Spelunky 1.2 Project
Post by: Moloch on April 05, 2012, 10:50:38 PM
For languages based on the Latin alphabet, maybe add sFontExtended and sFontSmallExtended, which would included the extended Latin alphabet characters (http://en.wikipedia.org/wiki/Latin-derived_alphabet#All_extended_Latin_letters_in_collation_order)  (not sure all these could even be made readable in 8x8) for the translators to make use of, but I don't have a clue how you would deal with other languages like Russian, Arabic, Hebrew, Chinese, Japanese, Korean, etc.

I'd like to see how this works out - I made a quick mod based on 1.2 for myself so I could play Spelunky at 1920x1080 in fullscreen with no black borders (480x270, scale x4) and would maybe turn it into a mod to allow any custom resolution (320x240 minimum), but among other problems, I would need to replace all the draw_text's with a script to align/position all the text based on the current resolution. It looks like there is over 600 draw_text functions in the objects and scripts. :P  If you have to modify all those for the language features then I'm not going to start that now.

Let me know if you want some help with some of the tedious copy/paste/search/replace work that will likely be involved with this.


The ability to have 'sprite packs' as external files rather than separate mods would be great, people would be able to make their recolor/reskins without having to use Game Maker (assuming someone goes to the trouble to export the default sprites/sheets first), and players could mix or omit individual sprites from different packs to suit their taste. I'm sure we'd see some great sprite packs from people who are talented in that area but haven't bothered because they have no interest in purchasing or messing around with Game Maker.


Title: Re: The Spelunky 1.2 Project
Post by: TyrOvC on April 06, 2012, 10:54:52 AM
As a fallback, I made default text fonts for each characterset and translations can specify to use them instead of an image font. Text outlining and everything has to be done programmatically when its not using the image font though, so I'm ending up replacing a lot of draw_text() with a script.

Should make your resolution changes easier too :)


Title: Re: The Spelunky 1.2 Project
Post by: TyrOvC on April 06, 2012, 03:31:38 PM
Translation text file. Think I got everything except for the config.exe text, key config + gamepad config.

English text.txt
Code:
#oGame
BetterLuckNextTime=BETTER LUCK NEXT TIME...
FinalScore=FINAL SCORE:
ForHighScores=FOR HIGH SCORES.
GameOver=GAME OVER
MiniFinished=FINISHED!
NewRecord=YOU SET A NEW RECORD!
Paused=PAUSED
PauseButtons2=ESC-RETURN  F1-DIE  F10-QUIT
PauseButtons=START-RETURN  BOMB-DIE  ROPE-QUIT
PauseButtonsNoDeath2=ESC-RETURN  F10-QUIT
PauseButtonsNoDeath=START-RETURN  ROPE-QUIT
ToEditLevel= TO EDIT LEVEL.
ToLoadAnotherLevel= TO LOAD ANOTHER LEVEL.
WelcomeToShortcut=WELCOME TO THE SHORTCUT HOUSE!
#Level Transition
CompletedLevel=COMPLETED!
Depth=DEPTH:
DepthUnit=FEET
ForANewShortcut=FOR A NEW SHORTCUT.
Level=LEVEL
LevelKills=KILLS -
LeveLoot=LOOT  -
LevelTime=TIME  -
LevelMoney=MONEY -
None=NONE
SavedDamsel=MY HERO!
ShortcutBuilt=ONE SHORTCUT, COMING UP!
TunnelmanDigsShortcuts=I DIG SHORTCUTS.
TunnelmanDonate=DONATE:
TunnelmanIntroduce=HEY THERE! I'M THE TUNNEL MAN!
TunnelmanLendme=CAN YOU LEND ME A LITTLE MONEY?
TunnelmanNeed=I NEED $
TunnelNeverFinish=I'LL NEVER GET THIS SHORTCUT BUILT!
TunnelThanks=THANKS! YOU WON'T REGRET IT!
TutorialCompleted=TUTORIAL CAVE COMPLETED!
#Shopkeeper
Armory=ARMORY!
BombShop=BOMB SHOP!
ClothingShop=CLOTHING SHOP!
DiceHouse=DICE HOUSE!
DiceLost=I'M SORRY, BUT YOU LOSE!
DiceWon=CONGRATULATIONS! YOU WIN!
GetOutDeadbeat=GET OUTTA HERE, DEADBEAT!
HeSweet=NOW AIN'T HE SWEET!
IHaveSomethingSpecial=I HAVE SOMETHING SPECIAL...
KissingParlor=KISSING PARLOR!
KissPress=A KISS. PRESS
NotEnoughMoney=YOU HAVEN'T GOT ENOUGH MONEY!
NowRoll=NOW ROLL THE DICE!
OneBet=ONE BET AT A TIME!
PleaseRoll=PLEASE ROLL THE DICE!
PleasureDoingBusiness=PLEASURE DOING BUSINESS!
RolledSeven=YOU ROLLED A SEVEN!
Shesweet=NOW AIN'T SHE SWEET!
ShopkeeperAnger1=COME BACK HERE, THIEF!
ShopkeeperAnger2=DIE, YOU VANDAL!
ShopkeeperAnger3=TERRORIST!
ShopkeeperAnger4=HEY, ONLY I CAN DO THAT!
ShopkeeperAnger5=NOW I'M REALLY STEAMED!
ShopkeeperAngerMurderer=YOU'LL PAY FOR YOUR CRIMES!
SpecialityShop=SPECIALTY SHOP!
SupplyShop=SUPPLY SHOP!
ToBet=TO BET $
ToPurchase=TO PURCHASE.
WelcomeTo=WELCOME TO
WonPrize=YOU WIN A PRIZE!
YouBet=YOU BET $
YouNeed=YOU NEED $
YouRolledA=YOU ROLLED A
#Items
Ankh2=YOU FEEL PROTECTED.
Ankh=YOU GOT THE ANKH!
AnkhBuy=AN ANKH FOR $
Bombbag=YOU GOT 3 MORE BOMBS!
BombbagBuy=A BAG OF 3 BOMBS FOR $
Bombbox=YOU GOT 12 MORE BOMBS!
BombboxBuy=A BOX OF 12 BOMBS FOR $
Bow=YOU GOT THE BOW AND ARROWS!
BowBuy=BOW AND ARROWS FOR $
Cape=YOU GOT A CAPE!
CapeBuy=A CAPE FOR $
Compass=YOU GOT A COMPASS!
CompassBuy=A COMPASS FOR $
Gloves=YOU GOT CLIMBING GLOVES!
GlovesBuy=CLIMBING GLOVES FOR $
Glovewebcannon=YOUR SPIDER SENSE TINGLES!
Hedjet2=IT GLOWS A BRILLIANT WHITE.
Hedjet=YOU GOT THE HEDJET!
Jetpack=YOU GOT A JETPACK!
JetpackBuy=JETPACK FOR $
Jordans2=YOU FEEL LIGHT ON YOUR FEET.
Jordans=YOU GOT JORDANS!
JordansBuy=JORDANS FOR $50000!
Kapala2=IT THIRSTS FOR BLOOD...
Kapala=YOU GOT THE KAPALA!
Machete=YOU GOT A MACHETE!
MacheteBuy=A MACHETE FOR $
Mattock2=IT SEEMS A BIT RUSTY.
Mattock=YOU GOT A MATTOCK!
MattockBuy=A MATTOCK FOR $
Parachute2=IT WILL DEPLOY AUTOMATICALLY.
Parachute=YOU GOT A PARACHUTE!
ParachuteBuy=A PARACHUTE FOR $
Paste=YOU GOT STICKY BOMBS!
PasteBuy=BOMB PASTE FOR $
Pistol=YOU GOT A PISTOL!
PistolBuy=A PISTOL FOR $
Pitchersmitt=YOU GOT A PITCHER'S MITT!
PitchersmittBuy=PITCHER'S MITT FOR $
Ropepile=YOU GOT 3 MORE ROPES!
RopepileBuy=EXTRA ROPE FOR $
Shotgun=YOU GOT A SHOTGUN!
ShotgunBuy=A SHOTGUN FOR $
Spectacles2=YOUR EYESIGHT SEEMS IMPROVED...
Spectacles=YOU GOT SPECTACLES!
SpectaclesBuy=SPECTACLES FOR $
Spikeshoes=YOU GOT SPIKE SHOES!
SpikeshoesBuy=SPIKE SHOES FOR $
Springshoes2=YOU FEEL BOUNCY.
Springshoes=YOU GOT SPRING SHOES!
SpringshoesBuy=SPRINGY SHOES FOR $
Stealdamsel=YOU MUST BE IN LOVE!
Teleporter=YOU GOT A TELEPORTER!
TeleporterBuy=A TELEPORTER FOR $
Udjateye2=YOU FEEL AWAKENED.
Udjateye=YOU GOT THE UDJAT EYE!
Webcannon=YOU GOT A WEB CANNON!
WebcannonBuy=A WEB CANNON FOR $
#Misc
AnkhRevives=YOU HAVE BEEN REVIVED!
AnkhShatters=THE ANKH SHATTERS!
LevelSelect=PRESS ESCAPE TO RETURN TO TITLE.
OutOfArrows=I'M OUT OF ARROWS!
Press=PRESS
SceptreFits2=BUT NOTHING IS HAPPENING!
SceptreFits=THE SCEPTRE FITS...
#Kali
KaliVeryAngry=SHE SEEMS VERY ANGRY WITH YOU!
KaliAngry=SHE SEEMS ANGRY WITH YOU.
KaliForgive=SHE HAS FORGIVEN YOU!
KaliHeals=YOU FEEL INVIGORATED!
KaliEcstatic=SHE SEEMS ECSTATIC WITH YOU!
KaliFillBombs=YOUR SATCHEL FEELS VERY FULL NOW!
KaliVeryHappy=SHE SEEMS VERY HAPPY WITH YOU!
KaliHappy=SHE SEEMS HAPPY WITH YOU.
KaliBestows=SHE BESTOWS A GIFT UPON YOU!
KaliPleased=SHE SEEMS PLEASED WITH YOU.
KaliAcceptsSacrifice=KALI ACCEPTS THE SACRIFICE!
KaliDevoursSacrifice=KALI DEVOURS THE SACRIFICE!
DefileAltar=YOU DARE DEFILE MY ALTAR?
DefileAltar2=I WILL PUNISH YOU!
#Ghost
Ghost=A CHILL RUNS UP YOUR SPINE...
Ghost2=LET'S GET OUT OF HERE!
#Level Feelings
AlienCraft=THERE'S A PSYCHIC PRESENCE HERE!
BetterUseFlares=I'D BETTER USE THESE FLARES!
Blackmarket=WELCOME TO THE BLACK MARKET!
CantSee=I CAN'T SEE A THING!
Cemetary=THE DEAD ARE RESTLESS!
CityOfGold=IT'S THE LEGENDARY CITY OF GOLD!
HedjetShines=THE HEDJET SHINES BRIGHTLY.
Lake=I CAN HEAR RUSHING WATER...
SacrificePit=I CAN HEAR PRAYERS TO KALI!
SnakePit=I HEAR SNAKES... I HATE SNAKES!
YetiLair=IT SMELLS LIKE WET FUR IN HERE!
#Highscores and Minigames
SecretChallenges=SECRET CHALLENGES
SunScore=SUN:  
MoonScore=MOON:  
StarsScore=STARS:
SunRoom=SUN ROOM
SunInstruction=KEEP YOURSELF AND
SunInstruction2=THE DAMSEL ALIVE
SunInstruction3=FOR AS LONG AS
SunInstruction4=POSSIBLE!
SunBeginsIn=DAMSEL CHALLENGE BEGINS IN
Locked=LOCKED.
MoonRoom=MOON ROOM
MoonInstruction=SHOOT THE MOVING
MoonInstruction2=TARGETS WITH YOUR
MoonInstruction3=BOW AND ARROWS!
MoonBeginsIn=ARCHERY CHALLENGE BEGINS IN
StarsRoom=STARS ROOM
StarsInstruction=KILL AS MANY ANGRY
StarsInstruction2=SHOPKEEPS AS YOU CAN
StarsInstruction3=BEFORE THEY GET YOU!
StarsBeginsIn=SHOTGUN CHALLENGE BEGINS IN
ChangingRoom=CHANGING ROOM
LadyInRed=LADY IN RED...
TopDefilers=TOP DEFILERS
#The below stat names have to have spaces added behind the colons, to space them out properly in the highscore list depending on the translation
Money=MONEY:  
Kills=KILLS:  
Saves=SAVES:  
Time=TIME:
Plays=PLAYS:  
Deaths=DEATHS:
Wins=WINS:  
#End of stats that need spacing
Statistics=STATISTICS
ThisClears=THIS WILL CLEAR EVERYTHING!
#Tutorial
ToJump=TO JUMP.
ToUsewWip=TO USE YOUR WHIP.
HoldUpAndPress=HOLD UP AND PRESS
Tutorial1=WELCOME TO THE TUTORIAL CAVE!
Tutorial2=THIS MIGHT BE YOUR FIRST TIME PLAYING.
Tutorial3=YOU CAN HANG ON LEDGES, TOO!
Tousewhip=TO USE YOUR WHIP.
Tutorial4=COLLECT THE TREASURE!
HoldUpAndPress=HOLD UP AND PRESS
ToOpenChests=TO OPEN CHESTS.
Tutorial5=HOLD DOWN TO DUCK AND CRAWL.
Tutorial6=CRAWL OVER THE EDGE TO DO A FLIP HANG.
Tutorial7=FALLING TOO FAR CAN REALLY HURT!
Tutorial8=HOLD UP TO CLIMB THE LADDER.
DuckAndPress=DUCK AND PRESS
ToPickupItems=TO PICK UP ITEMS.
ToThrowOrUseItems= TO THROW OR USE ITEMS.
Tutorial9=HOLD UP TO THROW HIGH AND DOWN TO DROP.
ToSelectyourropeand=TO SELECT YOUR ROPE AND
ToUseIt=TO USE IT.
CrouchAndPress=CROUCH AND PRESS
Tutorial10=TO THROW A ROPE DOWN A LEDGE.
ToRunHoldDown=TO RUN, HOLD DOWN
Or=OR
Tutorial11=OPEN THIS CRATE FOR A BAG OF BOMBS.
ToSelectBombsAnd= TO SELECT BOMBS AND
Tutorial12=THERE'S LOTS MORE AHEAD!
Tutorial13=USE YOUR WITS AND BEWARE OF TRAPS!
#Intro
Intro=AS THE MOON BURNED BRIGHT ABOVE,
Intro2=WITH THE DESERT STRETCHING BEHIND ME,
Intro3=AFTER I DOUBLE-CHECKED MY MAP,
Intro4=MY LIPS CRACKED AND COVERED IN SAND,
Intro5=WITH FATE GUIDING MY EVERY MOVE,
Intro6=PUTTING THE FADED PHOTO IN MY POCKET,
Intro7=AS I RECALLED MY FATHER'S LAST WORDS,
Intro8=MY MEMORY SLIPPING AWAY FROM ME,
Intro9=I STRODE VALIANTLY TOWARD MY DESTINY,
Intro10=I SQUEEZED THE WHIP AT MY SIDE,
Intro11=I DRAINED THE REST OF MY CANTEEN,
Intro12=I SPOTTED THE CAVE'S ENTRANCE,
Intro13=I FURROWED MY BROW,
Intro14=I PAID MY BEDOUIN GUIDE,
Intro15=I DISMOUNTED MY CAMEL,
Intro16=I SQUINTED INTO THE DARKNESS,
Intro17=AND THOUGHT OF HER ONE LAST TIME.
Intro18=AND HELD MY HAT AGAINST THE WIND.
Intro19=AND A COLD CHILL TOOK HOLD OF ME.
Intro20=AND WONDERED HOW LONG I'D BE BELOW.
Intro21=AND VOWED TO RETURN VICTORIOUS.
Intro22=AND SWORE I HEARD VOICES UP AHEAD.
Intro23=AND FELT THE GODS SMILING UPON ME.
Intro24=AND THAT'S WHEN IT ALL STARTED.
#Ending
YouMadeIt=YOU MADE IT!
FinalScore=FINAL SCORE:
RememberedAs=YOU SHALL BE REMEMBERED AS A HERO.


Title: Re: The Spelunky 1.2 Project
Post by: EdenNov on April 06, 2012, 04:26:25 PM
Will it work with Hebrew (characters, right-to-left-ness)?


Title: Re: The Spelunky 1.2 Project
Post by: TyrOvC on April 06, 2012, 05:17:05 PM
It seems to. Does this read right?

(http://i.imgur.com/fsbZM.png)

Edit:
Here's what I have so far. Could use some help testing, and the text.txt is already completely ready (minus any text I might have overlooked to add to it) if anybody wants to start translating the text.

Todo:
-Still need to replace every draw_text() with the new scrDrawText.
-Handling for new image fonts.
-config.exe code

http://www.spelunkylevels.tk/mods/spelunky1-2-translations-01.zip

Newer version below.


Title: Re: The Spelunky 1.2 Project
Post by: TyrOvC on April 06, 2012, 11:13:35 PM
Finished the configuration utility code for parsing and displaying a language selection menu. Also played the game for about an hour, bugfixing. Anybody have any ideas on how to make the language selection menu button in the configuration utility apparent as what it is so that people know to click it and choose their language?

All that's left to do is:
-Replace every draw_text() with the new scrDrawText.
-Make the configuration utility translatable

This download is ready for making translations for.

http://www.spelunkylevels.tk/mods/spelunky1-2-translations-02.zip


Title: Re: The Spelunky 1.2 Project
Post by: EdenNov on April 07, 2012, 07:07:24 AM
The characters are readable but it's still oriented backwards (as in "Paused" is "desuaP").
I guess it would work if I just write everything in reverse. Right?
Thanks for doing that btw.


Title: Re: The Spelunky 1.2 Project
Post by: TyrOvC on April 07, 2012, 12:04:29 PM
I need someone that can actually read/write in a right to left language to help me figure out what all needs to be done to make them work properly. Can code in special handling if anything else needs to be done for right to left languages.

So, anything put in text.txt for right to left languages is reversed?

Is that every character that needs to be reversed? Like:
This game is paused.
.desuap si emag sihT

Individual words reversed? Like:
This game is paused.
sihT emag si desuap.

And does the ordering of the words in the phrase need to be changed?


Title: Re: The Spelunky 1.2 Project
Post by: Moloch on April 07, 2012, 12:27:07 PM
I can't offer any help with any translations, but I haven't come across any problems while testing what you've done so far.

The only text I haven't seen in the language file is title screen "(Derek Yu) Presents", and the quit/win credits "Thanks for Playing!", "See you next adventure!"


Title: Re: The Spelunky 1.2 Project
Post by: EdenNov on April 07, 2012, 03:12:53 PM
I need someone that can actually read/write in a right to left language to help me figure out what all needs to be done to make them work properly.
Umm... I can help with that.
The entire sentence is reverse, like the first option you said (also what did you write there, cuz I read "my hovercraft is full of eels"...), but the question mark should be to the right.
Also, I could translate it to Hebrew if you want. That's why I got so exited-I finally get to contribute to the forum.


Title: Re: The Spelunky 1.2 Project
Post by: Wonkyth on April 09, 2012, 07:18:02 AM
What can I say, guys, awesome job! :D


Title: [Needs Translators!] The Spelunky 1.2 Project
Post by: TyrOvC on April 11, 2012, 06:48:29 PM
Finished converting text drawing to the new text draw script (lots of that done by Moloch!), added translations for the level editor, and now it's ready for some actual translating!

Any translators out there look at the bottom of the original post (http://mossmouth.com/forums/index.php?topic=1257.msg38731#msg38731) under "WIP Translation Release" for a download and information on the translation format. Sample translation packs for German, Hebrew, and Afrikaans are included, although they've yet to actually be translated. To start one for a different language, just copy the English translation pack over and use it as a base.


Title: Re: The Spelunky 1.2 Project
Post by: EdenNov on April 11, 2012, 11:45:31 PM
...what did you write there, cuz I read "my hovercraft is full of eels"...
Ohhh from Monty Python. I just got that.


Title: Re: The Spelunky 1.2 Project
Post by: TyrOvC on April 14, 2012, 12:15:49 PM
Small update, if anybody's working on a translation added:

Code:
TutorialEnter=PRESS UP TO ENTER!
AGameBy=A GAME BY
ThanksForPlaying=THANKS FOR PLAYING!
SeeYouNextAdventure=SEE YOU NEXT ADVENTURE!

To text.txt and the game code.


Also, is anybody working on any translations yet?


Title: Re: The Spelunky 1.2 Project
Post by: Moloch on April 14, 2012, 01:56:21 PM
Small update, if anybody's working on a translation added:

Getting a 404 with the link to 1_2_3.


Title: Re: The Spelunky 1.2 Project
Post by: TyrOvC on April 14, 2012, 02:01:52 PM
Fixed


Title: Re: The Spelunky 1.2 Project
Post by: EdenNov on April 15, 2012, 09:38:47 AM
Also, is anybody working on any translations yet?
I'm working on a Hebrew one. I'm writing it backwards so that it will be readable in the game.


Title: Re: [Translators Needed!] The Spelunky 1.2 Project
Post by: KarjamP on June 26, 2012, 01:49:36 AM
Suggestions on the way translations work:

  • Have seperate layouts ingame for right-to-left scripts like Hebrew. It might look wierd of it's formatted similarly to left-to-right scripts due to the way it works (take a look at games like OpenTTD (http://www.openttd.org) and The Battle of Wesnoth (http://wesnoth.org) free games to see what I mean. Heck, even  a translation of a Darths and Droids comic (http://www.darthsanddroids.net/episodes_he/0001_he.html) flips the screen to make it easier to read to Hebrew speakers)
  • Handle Strings the similar way that C's printf function works (ie for strings that are most likely to dynamicly to change, like the shopkeeper's greetings and Tunnelman's request for money, use %1 or whatever for the first variable, %2 for the second, etc (yeah, I know that's not exacly how C's printf function works) That way, languages with different word order than English (like Japanese, which, compared to english, is like speaking like Yoda (object-subject-verb instead of object-verb-subject or whatever) ) can be in correct grammar.).

    Example: WELCOME TO %1's %2! (where %1 is the name of the shopkeeper and %2 is the type of the shop (in case your wondering, the reason the 's is at the end of %1, is because not all languages use 's to represent that someone owns something (for example, Afrikaans use se and Japanese uses no) ) ).
  • The ability to specify external TTF fonts used in the program that contains the relevant character sets (so, for example, one could choose to have Wingdings font instead of the default one (Yeah, I know it wouldn't do any good, but it's just a example). This is so that one can specify a font that contains more synbols than the sprite could allow without making it very big be used in a similar way that the sprite works.

All to make it more powerful and more convinient.

If I was speaking in a Technibabble, then I'm sorry.  ;)


Title: Re: [Translators Needed!] The Spelunky 1.2 Project
Post by: TyrOvC on June 26, 2012, 03:02:02 AM
Excellent information, especially considering I don't have any experience with languages other than English. With regards to separate layouts for right to left languages, is there even anything in Spelunky other than maybe the configuration utility that it would make sense for, when considering the added complexity development wise? There's not much menus and text in it, when say compared to a tactical game like The Battle of Wesnoth (which I do play!).

With regards to Fonts, Gamemaker has limited functionality regarding using fonts that aren't built into the built into the game. True type fonts can't be loaded from any specified directory, it can only load fonts that are installed in Windows referenced by name. Prebaked fonts for each character set Gamemaker can support (already implemented in current code) might be the best way to go about it.


Title: Re: [Translators Needed!] The Spelunky 1.2 Project
Post by: KarjamP on June 26, 2012, 03:35:24 AM
Excellent information, especially considering I don't have any experience with languages other than English. With regards to separate layouts for right to left languages, is there even anything in Spelunky other than maybe the configuration utility that it would make sense for, when considering the added complexity development wise? There's not much menus and text in it, when say compared to a tactical game like The Battle of Wesnoth (which I do play!).

With regards to Fonts, Gamemaker has limited functionality regarding using fonts that aren't built into the built into the game. True type fonts can't be loaded from any specified directory, it can only load fonts that are installed in Windows referenced by name. Prebaked fonts for each character set Gamemaker can support (already implemented in current code) might be the best way to go about it.
Well, the screen in the room with the minigames for one (it lists how many deaths, top score on how many damsels rescued, the fastest time beaten, etc.). In fact ANY result screens (like the game over one) requires it.

Just switch the order around (like 100 = kills instead of kills = 100) and maybe make text generate like Right to Left like most apps that support those writing systems do (or else, one needs to write backwords like EdenNov is duing. :P )

I think it could also be in the same directory as the executable, as the unofficial Chinese translation of Iji (which Remar supports) has its Chinese font in the same directory as the game itself. I could be wrong, though.

Another suggestion:
Make shopkeeper names translatable (to, for example, have different names for different translations ala Pokemon, to transcribe the default names in the respective language's writing system, etc.).


Title: The Spelunky 1.2 Project [Translators Needed!]
Post by: TyrOvC on July 03, 2012, 02:48:37 PM
Updated both the base Spelunky 1.2 source code and the Translation fork.

Added new resolution setting to the config, "Fit Screen". Scales up Spelunky's drawing surface to fit the player's resolution, instead of just having static x1 x2 x3 x4 settings.

Edit:
Also, Moloch's portable Spelunky code is in both branches of the source now. Previously it was only in the Translations one.

Changed code:
oScreen Create last code block, line 1
Code:
py = 0; // player Y coord

displayheight=display_get_height();
displaywidth=display_get_width();

// screen base(view_wview and view_hview)
screen_x = 0;
screen_y = 0;
screen_w = 320;
screen_h = 240;
screen_scale = global.screenScale;

//Spelunky 1.2 7-3-2012 Scale up to resolution
if(global.screenScale==5){
    if(displayheight<displaywidth)
        screen_scale = displayheight/screen_h;
    else
        screen_scale = displaywidth/screen_w;
    global.screenScale=screen_scale;
}
//Spelunky 1.2 7-3-2012 Soft fullscreen
if(global.softfullscreen==1){
    window_set_showborder(false);
    window_set_size(displaywidth,displayheight);
    window_set_position(0,0);
}
oScreen Room Start Event
Code:
//Spelunky 1.2 7-3-2012 Soft fullscreen
if(global.softfullscreen==1){
    window_set_size(displaywidth,displayheight);
    window_set_position(0,0);
}
scrInit line 212
Code:
//Spelunky 1.2 7-3-2012 Switch to soft fullscreen if screenScale is 5 (scale up to resolutions) and fullscreen off
global.softfullscreen=0;
if(global.fullscreen==0 && global.screenScale==5)
    global.softfullscreen=1;

And config.exe code was changed too and included, but nobody mods that anyway.


Title: Re: The Spelunky 1.2 Project [Translators Needed!]
Post by: shadow1928 on July 18, 2012, 09:30:06 PM
I don't know if this is a bug or not, but in the 1.1 version and in this 1.2 version, I can't seem to jump when I'm running right. I can jump when I'm running left though.


Title: Re: The Spelunky 1.2 Project [Translators Needed!]
Post by: KarjamP on July 19, 2012, 12:01:21 AM
I don't know if this is a bug or not, but in the 1.1 version and in this 1.2 version, I can't seem to jump when I'm running right. I can jump when I'm running left though.

It's your keyboard/joystick. My keyboard at home can't register the buttons Up, left and Spacebar (I think) at the same time.


Title: Re: The Spelunky 1.2 Project [Translators Needed!]
Post by: shadow1928 on July 19, 2012, 09:28:42 AM

It's your keyboard/joystick. My keyboard at home can't register the buttons Up, left and Spacebar (I think) at the same time.

Thanks I'll try different keys for run


Title: Re: The Spelunky 1.2 Project [Translators Needed!]
Post by: arkhometha on August 31, 2012, 12:51:27 AM
The link for version 1.2 died. Can someone reupload it please?


Title: Re: The Spelunky 1.2 Project [Translators Needed!]
Post by: TyrOvC on August 31, 2012, 07:46:01 AM
Sorry about that, my webserver's broked.


Title: Re: The Spelunky 1.2 Project [Translators Needed!]
Post by: arkhometha on September 01, 2012, 10:03:23 PM
Well that sucks, but, if it isn't much work, can you (or anybody) upload 1.2 to mediafire or peeje or other place so we can download it again?
Please?


Title: Re: The Spelunky 1.2 Project [Translators Needed!]
Post by: Moloch on September 01, 2012, 10:27:20 PM
Okay. I'm 97% sure these are the same versions of the files linked in the first post:


Stable Release 2: http://www.mediafire.com/?binjj13nvj2r60v

WIP Translations Release 3: http://www.mediafire.com/?wl0lqda81cxkq74

Base Gamemaker 8 Source: http://www.mediafire.com/?o0rc9skhgdomfed

Translations Source: http://www.mediafire.com/?74ehbw06y5s68w8


Title: Re: The Spelunky 1.2 Project [Translators Needed!]
Post by: arkhometha on September 01, 2012, 10:56:12 PM
Thanks a lot, Moloch! You are a lifesaver!


Title: Re: The Spelunky 1.2 Project [Translators Needed!]
Post by: TyrOvC on September 03, 2012, 11:50:23 AM
Can I get a couple more people to test this build
https://anonfiles.com/file/2826fae77c2bd5eb02d6bb6509f46a9a

and report back on whether sound effects work?


Title: Re: The Spelunky 1.2 Project [Translators Needed!]
Post by: Moloch on September 03, 2012, 06:40:17 PM
I'll check it out shortly.

---

Here's something we should have thought of sooner - useful error messages for missing supersound.dll or sound folder? People post on the forum asking for help with this every once in a while.

Here's what I did:

oMusic > Create Event - Replace the "Execute script: SS_Init" with a piece of code:

Code:
if (file_exists("supersound.dll"))
{
    SS_Init();
}
else
{
    show_error("Unable to initialize music/sound. The supersound.dll file is missing from the game folder. Please check your installation.", true);
}

if (!directory_exists("sound"))
{
    show_error("Sound folder not found. You may ignore this error and continue to play without sound, or abort and check your installation.", false);
}

(The SS_LoadSound stuff for all the sound files follows after this.)


Title: Re: The Spelunky 1.2 Project [Translators Needed!]
Post by: TyrOvC on September 03, 2012, 06:42:15 PM
That useful error message thing is a great idea.

Background info on that build I posted: idyll and I (99% idyll) have been working on converting and editing the source to make it cross compilable on both GM4Mac and Gamemaker 8.1 with as few changes as possible. Uses the Caster extension for cross platform sound, but I'm having trouble with it on a Windows XP computer, 5.1 surround sound, previously had OpenAL installed.


Edit:
Pretty much follows the same concept as getting it cross compilable in GM Studio too, if anyone actually drops $99 on a copy.


Title: Re: The Spelunky 1.2 Project [Translators Needed!]
Post by: Nathan on September 03, 2012, 06:58:06 PM
Are you going to implement Spelunky Ease of Use with 1.2? It seems like a great idea


Title: Re: The Spelunky 1.2 Project [Translators Needed!]
Post by: Moloch on September 03, 2012, 08:06:42 PM
Can I get a couple more people to test this build
https://anonfiles.com/file/2826fae77c2bd5eb02d6bb6509f46a9a

and report back on whether sound effects work?

Worked fine here (Windows 7, 2 speakers).


Title: Re: The Spelunky 1.2 Project [Translators Needed!]
Post by: TyrOvC on September 03, 2012, 08:16:19 PM
It's worked on all eight Windows 7 test cases so far. Wonder what is wrong on this XP system. :/


Title: Re: The Spelunky 1.2 Project [Translators Needed!]
Post by: Nathan on September 03, 2012, 08:40:14 PM
I'll check on my CPU which has XP on it.


Title: Re: The Spelunky 1.2 Project [Translators Needed!]
Post by: Moloch on September 03, 2012, 08:40:53 PM
I'll try it on a shitty XP notebook at work tomorrow.  ;D


Title: Re: The Spelunky 1.2 Project [Translators Needed!]
Post by: Nathan on September 03, 2012, 08:42:45 PM
Has anyone tried with vista?


Title: Re: The Spelunky 1.2 Project [Translators Needed!]
Post by: Moloch on September 04, 2012, 07:48:18 PM
Sound worked fine on the XP notebook. The game performed better than I expected (haven't tried any other versions on it). The only issue was some horizontal tearing while the view scrolled.

Specs:
XP Professional SP3
Pentium M
512MB RAM
32MB MOBILITY RADEON 9000
SigmaTel C-Major Audio

One issue with the config program - if you lower the music/fx slider to the minimum, you can still hear it.


Title: Re: The Spelunky 1.2 Project [Translators Needed!]
Post by: TyrOvC on September 04, 2012, 08:31:49 PM
Wow, cool that it actually runs well on something with specs that low.


Title: Re: The Spelunky 1.2 Project [Translators Needed!]
Post by: Nathan on September 04, 2012, 09:04:17 PM
My CPU is worse than that :). My laptop is better though


Title: Re: The Spelunky 1.2 Project [Translators Needed!]
Post by: Moloch on September 05, 2012, 03:51:12 AM
One issue with the config program - if you lower the music/fx slider to the minimum, you can still hear it.

I see that the 1.1 config also uses "2" in the settings.cfg for the lowest position on the volume sliders.. with supersound.dll that would be inaudible. I have to edit the cfg to set them to "0" with 1.3, then the volume is off.


Title: Re: The Spelunky Community Update Project
Post by: Kegluneq on September 10, 2012, 05:48:07 PM
Figured it was about time this got stickied :D


Title: Re: The Spelunky Community Update Project
Post by: TyrOvC on December 27, 2012, 10:42:11 PM
Created a Github repository with the latest version. https://github.com/tyrovc/SpelunkyCommunityUpdateProject


Using the awesome https://github.com/Medo42/Gmk-Splitter/downloads



Also, I'm probably going to eventually end up buying Studio (though not the mobile exporters I expect) so sometime in the future I'll see how much trouble it is to get Spelunky compiling in it.


Title: Re: The Spelunky Community Update Project
Post by: Wonkyth on December 30, 2012, 10:23:33 PM
Ah cool, I'll have to give this a whirl when I get home. :)


Title: Re: The Spelunky Community Update Project
Post by: DooM Marine on January 02, 2013, 08:14:56 PM
Why is the bottom level + the left room of the score room so laggy? The challenge rooms above are unlaggy, though. Probably has something to do with the big text box on the right side of the score room.


Title: Re: The Spelunky Community Update Project
Post by: Nathan on March 31, 2013, 08:16:08 AM
His site is currently down.


Title: Re: The Spelunky Community Update Project
Post by: Moloch on April 02, 2013, 07:05:19 AM
The mediafire mirror links are still good from when the last time this happened.

http://mossmouth.com/forums/index.php?topic=1257.msg63460#msg63460


Title: Re: The Spelunky Community Update Project
Post by: Urza on July 21, 2013, 01:32:48 AM
Since this project got mentioned in another thread, it reminded my I should contribute fixes from Spelunky Natural. I'm probably forgetting some, but the only one that immediately jumps to mind as a for-sure bug is this with the parachute. If you fall an almost-dangerous distance onto a one-block thick floor, it will deploy needlessly. This is because it looks past the floor and doens't see you're about to land safely.

Fix:
In oPlayer1 step event (first code section), find this
Code:
        if (global.hasParachute and not stunned and fallTimer > 12)
        {
            if (not collision_point(x, y+32, oSolid, 0, 0))
            {
                instance_create(x-8, y-16, oParachute);
                fallTimer = 0;
                global.hasParachute = false;
            }
        }
and change the second if there to this
Code:
            if (not collision_line(x, y+16, x, y+32, oSolid, 0, 0))

Next most buggy is probably the thing with stunned/dead heroes I mentioned over here (http://mossmouth.com/forums/index.php?topic=2916.msg76484#msg76484). "Vibrating" and taking extra fall damage. But my fix for that is sloppy, and I suspect it has side effect. I'm sure there's a better way to deal with it.


Title: Re: The Spelunky Community Update Project
Post by: TyrOvC on July 21, 2013, 01:25:00 PM
Merged in the parachute fix, which is odd considering it was already in the fixed bugs list but wasn't? oh! the fix that was put in previously only fixed it deploying early in conditions where the floor isn't one block thick, I gotcha. Tried it out and it works fine now.


Will look into the fall damage after thrown thing later since you said it might have some caveats.





Something that's been bugging me, I swear I've played a version of the game where if you like blow up or mine the blocks above vines, the vines disappear. That looks like it makes way more sense with the way the vine graphics look to me, but that does have a small effect on gameplay. Thoughts on that?


Edit edit:
Guess I'm on a Spelunky binge right now. Going through cleaning up some project stuff and looking at bugs on the wiki.


Title: Re: The Spelunky Community Update Project
Post by: Moloch on July 21, 2013, 01:40:53 PM
Nope vines stay there without support. I added that they got destroyed without a block to hang from in Spelunky Breakdown because it looked cool and made sense for the mod.
You might want to consider how it will effect gameplay in vanilla Spelunky though.. for example could the player become stuck in a level without any way to get across a spike pit?
Also consider the precious monkey habitat you are potentially destroying..! :P


Title: Re: The Spelunky Community Update Project
Post by: TyrOvC on July 21, 2013, 01:44:53 PM
Yeah probably too much of a gameplay effect. It just looks ugly though! :P

Edit:
Hmm, wonder how vines work in the new spelunky.

Edit2: Maybe some sort of a graphic adjustment could be added after the block is removed though? Like any sort of a little addition to the top of the vine so it's not an ugly straight edge that looks like the vine was only connected to the block.


Title: Re: The Spelunky Community Update Project
Post by: Urza on July 21, 2013, 06:45:05 PM
So I decided this was as good a time as any to take a second look at that fall damage/vibrating bug and I think I found a solution that isn't too weird (like that "glue" business) and doesn't break anything else.

Once again in the oPlayer1 step event (first section), near the end, change this:
Code:
        // bounce
        if (yVel > 1) yVel = -yVel * 0.5;
        else yVel = 0;
to this:
Code:
// bounce
        if (isCollisionBottom(1))
        {
            if (yVel > 2.5) yVel = -yVel * 0.5;
            else yVel = 0;
        } else fallTimer -= 1;
This also fixes another bug, where a stunned character could "land" halfway through a platform, like oLadderTop. It's a little hard to explain, but try this test level (http://www.mediafire.com/view/76nay2pr4oxp0fn/stuntest.lvl) and jump or climb down the ladder to see what I mean.

The fallTimer -= 1 part is there to avoid introducing a new bug where if you fell hard on a platform it would think you were falling the entire time you were stunned, resulting in massive damage when you recovered.

P.S. Here's a vine root. (http://webpages.charter.net/manauser/images/VineRoot.png) Do with it what you will.


Title: Re: The Spelunky Community Update Project
Post by: Moloch on July 21, 2013, 08:50:41 PM
Ok, if you guys are looking for more stuff improve, maybe you're annoyed with the inconsistencies of how push blocks other objects interact.
Examples:
- Shoving a push block into the side of a snake or mantrap can cause the enemy to slide up on top of the block instead of being crushed, even if there's a wall on the other side. It's a bit more comical when it happens with boulders at high speed.
- Dropping a push block onto an item that is down in a "U" shaped alcove or corner, the item becomes stuck in the middle of the block, while generally treasure like gems and gold bars) will pop out the top of the block in this situation.


Title: Re: The Spelunky Community Update Project
Post by: TyrOvC on July 21, 2013, 10:38:37 PM
(http://webpages.charter.net/manauser/images/VineRoot.png)
<3


The way push blocks work has always annoyed the heck out of me, but I've put off messing with them because all my experiences with physics like those (I made a physics platforming game thing at one point) always turn into a hacky headache :P

Feeling productive though, so I might as well try it!



I fixed a few more bugs from the wiki list and upped them to the repository, like a situation where live piranhas would get stuck floating at the top of water.


Title: Re: The Spelunky Community Update Project
Post by: Moloch on July 22, 2013, 06:58:32 AM
The way push blocks work has always annoyed the heck out of me, but I've put off messing with them because all my experiences with physics like those (I made a physics platforming game thing at one point) always turn into a hacky headache :P
Feeling productive though, so I might as well try it!

Yeah messing with the platform engines scripts can get messy, I briefly tried at some point. Also be careful it doesn't cause items that were meant to be hidden in blocks to pop out...no worries if you pass on this one.


Title: Re: The Spelunky Community Update Project
Post by: TyrOvC on July 22, 2013, 03:06:41 PM
Added the vine roots as a background tile created in scrSetupWalls()
(http://dragit.in/j0he.png)

I like it! :D


Title: Re: The Spelunky Community Update Project
Post by: TyrOvC on July 22, 2013, 03:25:14 PM
Once again in the oPlayer1 step event (first section), near the end, change this:
Code:
        // bounce
        if (yVel > 1) yVel = -yVel * 0.5;
        else yVel = 0;
to this:
Code:
// bounce
        if (isCollisionBottom(1))
        {
            if (yVel > 2.5) yVel = -yVel * 0.5;
            else yVel = 0;
        } else fallTimer -= 1;

The whole section I'm looking at already checks isCollisionBottom(1) and looks like:
Code:
    if (isCollisionBottom(1) or isCollisionPlatformBottom(1))
    {
        // bounce
        if (yVel > 1) yVel = -yVel * 0.5;
        else yVel = 0;
       
        // friction
        if (abs(xVel) < 0.1) xVel = 0;
        else if (abs(xVel) != 0 and collision_point(x, y+16, oIce, 0, 0)) xVel *= 0.8;
        else if (abs(xVel) != 0) xVel *= 0.3;
       
        bounced = true;
    }
Just to clarify, you mean try it like :
Code:
    if (isCollisionBottom(1) or isCollisionPlatformBottom(1))
    {
        if (isCollisionBottom(1))
        {
            if (yVel > 2.5) yVel = -yVel * 0.5;
            else yVel = 0;
        } else fallTimer -= 1;
       
        // friction
        if (abs(xVel) < 0.1) xVel = 0;
        else if (abs(xVel) != 0 and collision_point(x, y+16, oIce, 0, 0)) xVel *= 0.8;
        else if (abs(xVel) != 0) xVel *= 0.3;
       
        bounced = true;
    }
right?


Edit:
Speaking of collision bugs with moving solids, I fixed this:
https://www.youtube.com/watch?v=DwwJwia-DrA

By changing in characterStepEvent():
https://github.com/tyrovc/SpelunkyCommunityUpdateProject/commit/aeba79bd4e1e16655320308d6f461ca201ecea61


Title: Re: The Spelunky Community Update Project
Post by: Urza on July 22, 2013, 05:49:41 PM
That's correct. The second isCollisionBottom(1) check is to distinguish between solids and platforms, which I found need to be handled a little differently.

Of course I'm not claiming it's authoritatively the best solution or anything, but by trial and error it seems to avoid any of the weird stuff I previously noticed. But it might do something else weird I haven't noticed. You never know.

And the vines look good! You'd think I would already know that, but I mean I never  actually tested them in the game (just by fiddling a screenshot). I was thinking of suggesting using scrSetupWalls after I initially posted it, but I guess you beat me to that thought.

EDIT: Oh yeah, I remembered another (minor) one. The arrow points the wrong way when it's going down and to the right ("southeast").

Fix: In the oArrow step event, this:
Code:
else if (xVel > 0 and yVel > 0)
{
    direction = radtodeg(arctan(yVel/xVel));
}

(the third if block) should be changed to this:
Code:
else if (xVel > 0 and yVel > 0)
{
    direction = radtodeg(arctan(-yVel/xVel));
}

The fish bone is messed up even worse I think, but no one expects that to be aerodynamic. :P


Title: Re: The Spelunky Community Update Project
Post by: TyrOvC on July 23, 2013, 06:43:46 PM
Added all that into the github repository, but I haven't gotten around to testing or working on any other bugs today.


Title: Re: The Spelunky Community Update Project
Post by: Moloch on July 28, 2013, 02:30:43 PM
I'm not sure if it's been addressed already, but is there a fix for this nonsense?

(http://i.imgur.com/QgUhNoO.png)


Title: Re: The Spelunky Community Update Project
Post by: Urza on July 29, 2013, 12:20:49 AM
I'm not sure if it's been addressed already, but is there a fix for this nonsense?

(http://i.imgur.com/QgUhNoO.png)
Oh yeah. I fixed that too... I seem to recall it involved a good bit of trial-and-error and changes in multiple places, so I'll have to see if I can figure out what all it was now.

But basically I changed the ropes to align to the grid before flying up, instead of before coming down.


Title: Re: The Spelunky Community Update Project
Post by: Moloch on July 29, 2013, 05:53:06 PM
But basically I changed the ropes to align to the grid before flying up, instead of before coming down.

Thanks, that was an easy fix - works great now! Just copied the alignment code already there to be used while the rope is moving upwards.

Code:
// top of oRopeThrow.Step
    if (armed and yVel < 0)
    {
        move_snap(16, 1);
        if (px < x)
        {
            if (not collision_point(x-8, y, oSolid, 0, 0)) x -= 8;
            else x += 8;
        }
        else
        {
            if (not collision_point(x+8, y, oSolid, 0, 0)) x += 8;
            else x -= 8;
        }
    }

See also Urza's bug fix for ropes below. (http://mossmouth.com/forums/index.php?topic=1257.msg77398#msg77398)



At the same time I thought to add something to prevent wasting ropes if launched in a confined (2 block high) space. If an 'armed' oRopeThrow hits the ceiling and has travelled less than 32 pixels from the point the player launched it, the rope fails to hook into the wall and instead falls back to the ground where it can be picked up again. This check only works if the player launched the rope while standing on the ground, as in some situations the player could be jumping out from a ledge and back to toss the rope and intentionally hit the ceiling with it.

I'm not proposing this one as necessary for the community update, but I have experience stupidly wasting ropes in such a way.

oRopeThrow.Create:
Code:
// add:
startY = 0;

scrUseItem:
Code:
// in the section that handles rope launch, look for 'holdItem.armed = true' and add:
if (platformCharacterIs(ON_GROUND)) holdItem.startY = y;

oPlayer1.Step (Action):
Code:
// in the section that handles rope launch, look for 'obj.armed = true' and add:
if (platformCharacterIs(ON_GROUND)) obj.startY = y;

oItem.Step:
Code:
// within the isCollisionTop(1) stuff
    if (type == "Rope")
    {
            if (armed and startY > 0 and startY-y < 32)
            {
                    armed = false;
                    startY = 0;
            }
    }


Title: Re: The Spelunky Community Update Project
Post by: TyrOvC on July 29, 2013, 06:53:23 PM
Thanks, that was an easy fix - works great now! Just copied the alignment code already there to be used while the rope is moving upwards.
Yay!
At the same time I thought to add something to prevent wasting ropes if launched in a confined (2 block high) space. I'm not proposing this one as necessary for the community update, but I have experience stupidly wasting ropes in such a way.
Yeah I think we probably ought to leave that out, since it could be limiting an intentional not really a bug action.


Title: Re: The Spelunky Community Update Project
Post by: Urza on July 29, 2013, 08:51:16 PM
It's entirely possible I did something different when tried to fix it, but I remember my first attempt made it so you could throw a rope through a wall. I mean like... oh like this:
:spl-mark::spl-bl01::spl-dude::000-spce:
:000-spce::spl-bl01::spl-bl01::spl-bl01:
(Or maybe it was on the right?) Anyway, you might want to quickly check that doens't happen with your fix.


Title: Re: The Spelunky Community Update Project
Post by: Moloch on July 30, 2013, 05:07:17 AM
I couldn't find such weirdness while facing left or right..thanks though!


Title: Re: The Spelunky Community Update Project
Post by: Urza on August 01, 2013, 09:41:38 AM
So this is funny, apparently the rope-through-walls bug was in the original game. I just happened to find it while testing the my rope-snapping changes. But it only happens in a specific combination of circumstances. Namely, when you use a held rope (not with the rope key) and you are ducking.

To fix this, find this code near the top of scrUseItem:
Code:
        else if (holdItem.sprite_index = sRopeEnd)
        {
            if (not kDown and colTop)
            {
              // do nothing
            }
            else
            {
            holdItem.held = false;
            holdItem.armed = true;
           
            holdItem.px = x;
            holdItem.py = y;
           
            if (kDown)
            {
                if (facing == LEFT)
                {
                    obj = instance_create(x-16, y, oRopeThrow);
                }
                else
                {
                    obj = instance_create(x+16, y, oRopeThrow);
                }
And change those two 16s to 12s.


Title: Re: The Spelunky Community Update Project
Post by: Moloch on August 01, 2013, 01:39:51 PM
I see it now...I was using a held rope but didn't try crouching.

EDIT:
I thought there was a fix posted somewhere to prevent taking damage from enemies through diagonal walls like so:
 :spl-bl01: :spl-batf:
 :spl-dude: :spl-bl01:
(imagine there is no wall gap between blocks)
But I can't find it now.


Title: Re: The Spelunky Community Update Project
Post by: Urza on August 01, 2013, 04:20:59 PM
I thought there was a fix posted somewhere to prevent taking damage from enemies through diagonal walls
I was able to fix that at least in some cases by tweaking their bounding boxes.

For the UFO, which seems to be the biggest offender:
Code:
setCollisionBounds(1, 0, 15, 14);

And the bat has the opposite problem, you can hit IT through walls.
Code:
setCollisionBounds(0, 2, 16, 14)

I haven't tried it with all the others, or tested exactly which ones suffer from this in the first place, althoguh I think frogs do.


Title: Re: The Spelunky Community Update Project
Post by: Moloch on August 01, 2013, 06:16:31 PM
With the two frogs and zombie, you can whip them through a wall, and if you are in the higher diagonal gap, they can hit you when they jump, AND you can kill them by jumping.

New bounds for frogs:
Code:
setCollisionBounds(1, 2, 14, 16)

New bounds for zombie:
Code:
setCollisionBounds(0, 2, 16, 16)

There's others but I don't feel like messing with them now.
From the upper position the player can stun a vampire and pick him up through the wall. I seem to remember hearing about that one before.


Title: Re: The Spelunky Community Update Project
Post by: Moloch on August 09, 2013, 12:47:47 PM
Using the latest revision, found an old bug that I forgot about.

Music on title screen does not loop. Not sure if this happens in all cases or only if you get the the title screen without pressing any buttons to skip the intro.

Fix:
oTitle.Alarm3 should call 'playMusic' instead of 'playSound'. The arguments are OK.


Title: Re: The Spelunky Community Update Project
Post by: Moloch on October 28, 2013, 10:10:47 PM
Likely an overlooked copy/paste error from the original version with the small gems:
The value of oEmerald is $200, but oSapphire and oRuby are both worth $400. oSapphire should probably be worth $300 to match Spelunky HD.