Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411514 Posts in 69376 Topics- by 58431 Members - Latest Member: Bohdan_Zoshchenko

April 27, 2024, 01:54:57 PM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsDeveloperTechnical (Moderator: ThemsAllTook)My Game Broke! :[
Pages: [1]
Print
Author Topic: My Game Broke! :[  (Read 1337 times)
Silhouette
Level 0
**


"Remember, no matter where you go, there you are."


View Profile
« on: December 28, 2009, 09:18:43 PM »

Hey guys... Concerned

So yeah, my game broke.

I started working on a sample game in GM.  The main reason: to learn the basic of GM8.  Everything has been going smoothly.  I haven't used any advanced features yet, and I have been mainly dealing with the drag and drop functions(because I am indeed a total newb).

So tonight, I was working on my game, updating all of the sprites.  I decided to remake my sprites for power ups.  Upon changing all of my sprites from the originals to the new ones, I ran my game to see how they looked.

Wtf?  No power ups?

Basically, the power ups ceased to spawn, and I have no idea why.  In fact, there is no reason whatsoever for the power ups to not spawn.  I've checked through the objects, events, and sprites millions of times, and everything is as it should be.  Running the game provides no error messages at all, and even remaking the events for the power ups does not work.

Something even more weird is that while 7 of the 8 power ups don't spawn, 1 does.  It's the only that spawns, and I don't understand why.  If I replace the sprite of the power up that does spawn with one of the others, it won't spawn.  How does that even make sense?

So maybe my sprites are the problem?  Nope.  When I use the sprite that does display for the spawnable power up with the ones that don't spawn, they still don't spawn.  Uhm, burn in hell you unspawnable power ups!

Desperate, I tried one last thing.  I remade the object(one of the power ups), and it's events.  I then made a sprite from scratch, and linked it to the object.  I ran the game, and it spawned fine.  Success - or so I thought.  I then opened one of the sprites I wanted to use, and did a copy.  I opened the sprite for the new power up that worked, and pasted my correct sprite in it's place.  I run the game, and...

WHERE IS MY POWER UP?  So I switch back to the sprite that did work... and... no power up spawns.  Are you kidding me right now?

This makes absolutely no sense whatsoever.  Since when do sprites brick games?  I'm pretty sure that if an object has events, they will carry out regardless of the graphic used. In my case, it seems as if my game has just simply broke.  I have tried many ways to fix it, and I am at the end of my wits.  All I want to do is have power ups that work with the sprites I want to use, and it's impossible.  I am pretty much giving up on this game, because I can not, for the life of me, figure out how to fix my problem.  Unspawnable power ups can suck my bawls.

Alas, if anyone has any info for me, or any fixes to try, let me know.  My game is without a doubt, broken.  Where's the repairman?

-Sil
Logged

<sig>Insert Generic Signature Here</sig>
Eraser
Guest
« Reply #1 on: December 28, 2009, 10:06:29 PM »

Objects ceasing to spawn? Are you, perhaps, using an alarm event? Is this alarm event ever set with the random function?

If you ever let an alarm be set to 0 in GM, unexplainable non-creations will happen from there on out. Check all of your objects if they're using alarms, and make sure you never let them get set to 0.

If you're not using alarms, I have no solution, unless you feel like handing out the source for us to look at.
Logged
Desert Dog
Level 4
****



View Profile
« Reply #2 on: December 28, 2009, 10:12:57 PM »

You remade your sprites, huh? Hmmm.. A thought that comes to mind, is that maybe you renamed them, causing a resource clash. To check, go to Scripts -> Check Resource Names and see if it says if there are any conflicts.

Also, what do you mean by "Don't spawn"? You mean the objects you place in the level editor, don't appear when you run the game?

Logged

Silhouette
Level 0
**


"Remember, no matter where you go, there you are."


View Profile
« Reply #3 on: December 28, 2009, 11:57:55 PM »

@Eraser
I use alarm events in my game, but none are set to 0.  The power ups, in this case, are spawned once the game is underway, using a step event with the following actions:
With chance # out of #
Create instance of (an object)
The chances are set to occur frequently, so that isn't the problem.  To be honest, I don't think I made any errors in the game creation, it just decided to  break.  o.O

@Desert Dog
I didn't rename them.  I did the check resource names option and there were no conflicts.
By don't spawn, I mean that I have an object that acts as a controller.  In it's step event it has:
With chance # out of #
Create instance of (an object)
So by spawn I mean, it creates the instance.  As said above, the chances are set to occur frequently, that isn't the problem.

Keep in mind that my game function 100% fine until I replaced the sprites.  I didn't rename anything, I just simply redrew the sprites.

The .gmk and .gb1 are uploaded here, in a compressed zip folder, for those that wish to take a look:
Filefactory link:
http://www.filefactory.com/file/a15heg7/n/planegamething.zip

Filedropper link:
http://www.filedropper.com/planegamething
Logged

<sig>Insert Generic Signature Here</sig>
Eraser
Guest
« Reply #4 on: December 29, 2009, 02:35:36 PM »

@Eraser
I use alarm events in my game, but none are set to 0.  The power ups, in this case, are spawned once the game is underway, using a step event with the following actions:
With chance # out of #
Create instance of (an object)
The chances are set to occur frequently, so that isn't the problem.  To be honest, I don't think I made any errors in the game creation, it just decided to  break.  o.O

@Desert Dog
I didn't rename them.  I did the check resource names option and there were no conflicts.
By don't spawn, I mean that I have an object that acts as a controller.  In it's step event it has:
With chance # out of #
Create instance of (an object)
So by spawn I mean, it creates the instance.  As said above, the chances are set to occur frequently, that isn't the problem.

Keep in mind that my game function 100% fine until I replaced the sprites.  I didn't rename anything, I just simply redrew the sprites.

The .gmk and .gb1 are uploaded here, in a compressed zip folder, for those that wish to take a look:
Filefactory link:
http://www.filefactory.com/file/a15heg7/n/planegamething.zip

Filedropper link:
http://www.filedropper.com/planegamething
Oh hey silly, I found your problem. You're creating the instances with a y of -16, which is outside of the room. You have an event in your powerups which destroys them when they're outside of the room, so when they're created they're immediately destroyed.

You could instead in the step event check if the y is > room_height, then destroy it.
(edit: An alternative to the above would be to use the sprite editor to change your sprite's origins to the height of the sprite, then change the spawn code from -16 to 0, and keep the outside room event)
« Last Edit: December 29, 2009, 02:40:26 PM by Eraser » Logged
Silhouette
Level 0
**


"Remember, no matter where you go, there you are."


View Profile
« Reply #5 on: December 29, 2009, 02:58:26 PM »

My gosh I'm dumb.

Thanks so much Eraser, I wouldn't have figured that out for the life of me.  The problem was so misleading because some sprites worked and others didn't.

I was about to give up on the game, but you saved it.

Repairman found.  Thanks.

-Sil
Logged

<sig>Insert Generic Signature Here</sig>
Pages: [1]
Print
Jump to:  

Theme orange-lt created by panic