Pages: [1] 2 3 ... 9
  Print  
Author Topic: The Spelunky Community Update Project  (Read 60460 times)
TyrOvC
Mossbaby
*
Posts: 424


This text is not random :(


View Profile WWW
« on: July 31, 2010, 08:30:22 AM »

Spelunky Community Update Project
For Players:
Windows Stable Release 2:
Mirror 1
Mirror 2
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
« Last Edit: July 21, 2013, 01:43:56 PM by TyrOvC » Logged

halibabica
Bossy
Mossy
*
Posts: 2037


old guard


View Profile Email
« Reply #1 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...
Logged

Sometimes I wonder if I like Spelunky too much.
ManTrap mod - Tastes Like Spelunky
Hand-drawn comic - Spelunkying
Moloch
Mosskid
*
Posts: 561


View Profile WWW
« Reply #2 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.
Logged

Moloch
Mosskid
*
Posts: 561


View Profile WWW
« Reply #3 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.
Logged

Moloch
Mosskid
*
Posts: 561


View Profile WWW
« Reply #4 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.


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

halibabica
Bossy
Mossy
*
Posts: 2037


old guard


View Profile Email
« Reply #5 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!
Logged

Sometimes I wonder if I like Spelunky too much.
ManTrap mod - Tastes Like Spelunky
Hand-drawn comic - Spelunkying
TyrOvC
Mossbaby
*
Posts: 424


This text is not random :(


View Profile WWW
« Reply #6 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.
Logged

Pteriforever
Mosskid
*
Posts: 564



View Profile Email
« Reply #7 on: July 31, 2010, 06:34:00 PM »

No thank you.  Grin My 1.0b is perfectly good.
Logged
Patrick
Bean
*
Posts: 219



View Profile
« Reply #8 on: July 31, 2010, 06:52:42 PM »

No thank you.  Grin 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.
Logged
eguee
Mosskid
*
Posts: 889


HYAAAAH!


View Profile
« Reply #9 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.
Logged
halibabica
Bossy
Mossy
*
Posts: 2037


old guard


View Profile Email
« Reply #10 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.
« Last Edit: July 31, 2010, 07:41:55 PM by halibabica » Logged

Sometimes I wonder if I like Spelunky too much.
ManTrap mod - Tastes Like Spelunky
Hand-drawn comic - Spelunkying
TyrOvC
Mossbaby
*
Posts: 424


This text is not random :(


View Profile WWW
« Reply #11 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?
Logged

halibabica
Bossy
Mossy
*
Posts: 2037


old guard


View Profile Email
« Reply #12 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 +.
Logged

Sometimes I wonder if I like Spelunky too much.
ManTrap mod - Tastes Like Spelunky
Hand-drawn comic - Spelunkying
grieck
Mossy
*
Posts: 1042



View Profile Email
« Reply #13 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.
Logged
eguee
Mosskid
*
Posts: 889


HYAAAAH!


View Profile
« Reply #14 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.
Logged
Pages: [1] 2 3 ... 9
  Print  
 
Jump to: