[SOLVED] Sudden problems after not changing game's code?


(Jonathan Stoler) #1

(tl;dr version: the game I’ve been working on for a long time suddenly is having problems on the last leg of development despite me not changing any code and I’m looking for ways to fix it, back the way it was before)

This is a really weird problem that I’ve never seen before, and it’s also really frustrating to me. It’s not exactly a FlashPunk problem per-sé and more of a general Flash problem, but I thought you guys could probably help me anyway.

So I’ve been working on a game, little-by-little, since around January or so. It’s not a very big game, but I’ve been putting in a few minutes here, a few minutes there, etc.

It’s super close to being done now, and I’m really excited to release it. I have been working on it pretty seriously over the past few weeks, but I took a break a few days ago to work on another project.

So today I decided I would try to wrap up the last bit of code if I could, and found that when I compiled and launched my game (which was working fine a few days ago afaik), it’s kinda… messed up.

My code is exactly the same, so it hasn’t been corrupted or anything. The game seems relatively functional, but a few pretty crucial objects aren’t working properly. (This includes the player character not being able to move.) The problem seems to be related to tweens. The tweens are being started but they aren’t causing any change in the objects they refer to. Some tweens are okay. It seems like maybe it’s tweens that are inside Entitys that are having problems, but tweens in Worlds are okay? Also, some Entitys appear unaffected for some reason.

If something like this has ever happened to you, did you fix it? How?

Computer Changes I’ve Made Since A Few Days Ago

(that I can remember, anyway)

  • updated a few programs, unrelated to Flash
  • bought a drawing tablet and installed its drivers (if it’s drivers are messing with Flash, then something is seriously wrong here)
  • updated Adobe AIR in order to install tablet drivers

Computer Changes I’ve Made Since Discovering This Problem

  • rebooted my computer (ol’ reliable there, but didn’t work this time)
  • uninstalled/reinstalled Adobe Flash Player (first checked for updates, there were none)
  • deleted localstorage/sharedobject files for my game
  • started a new project and copied the source code over in case my project was corrupted somehow (I’m using IntelliJ IDEA, if it matters)
  • switched to FlashPunk 1.6, which I was using when I started this project, until recently switching to 1.7 and having no problems until today
  • restored a backup of the project from a few days ago - this backup is potentially from before the last time I touched the code, but it was the latest backup I had, and the problem persisted

I’ve run out of ideas. It appears to me this is a Flash problem and has nothing to do with my code or FlashPunk’s, but frankly, I’m just really confused and frustrated that my game is suddenly nonfunctional after I didn’t do anything to it.

If anyone has any tips or suggestions, please let me know! I’ve put a lot of effort into this game and I’m really at a loss about what to do at this point.

I tried to be as thorough as possible in this (rather lengthy, sorry!) post, but if anyone wants more information about my game, my computer, my code, or whatever, I’d be happy to give it to you.

Thanks! I was hoping my first post wouldn’t be so desperate and depressing, but oh well… :confused:

I’ll continue to troubleshoot and post any updates here.


(Ultima2876) #2

Perhaps consider sending it to someone else to test on their computer (or on another computer you have access to) and see if the problems are still persisting there? That’d at least help eliminate your computer as the issue and perhaps to help diagnose whether it’s a compile-time or run-time issue.


(Jonathan Stoler) #3

Alright, so I tried a few things:

First, I removed the tablet drivers from my computer. Even though there’s almost no way they caused the problem, they were basically the only thing I installed today, so I had a nasty feeling they were the problem. They weren’t.

Then, I tested the compiled swf on my brother’s laptop and it showed the same problems that I was having.

Next, I booted up Windows in a VM on my Mac, and tried compiling the same code using FlashDevelop (which is hooked into an older version of the flex sdk, and I believe an older version of Flash as well). Same problems.

I restored the project to my backup from (where unless I’m going through some serious memory loss or something, I swear it was working fine). This time, instead of rebuilding the project with the old code, I ran the Monday-compiled swf. It had the same problems.

Lastly, just as a test, I re-downloaded FlashPunk from github to see if my FlashPunk install was broken. I recognize FlashPunk as the common element between all these tests, since the way my setup is configured, FlashPunk is considered as a global library, and is not relative to projects, but shared between them.

I also ran a quick test to see if the problem would continue with all new code that works similarly to my problematic code. Obviously my test was a whole lot simpler than the game I’ve been working on for months now, but it did not exhibit any of the same issues.

Then I restored a backup from Sunday and it ran fine (albeit a bit slow…)! SUCCESS! I also opened the project, compiled it, and it still ran fine! I compared Sunday’s code to today’s and there are a few differences, so I’m going to try to re-implement all the changes and see if I can catch what caused the problem in the first place. I’ll report back here, but this looks promising. :slight_smile:


(Jonathan Stoler) #4

Quick update: there was a problem in my code! (big shock - when your code doesn’t work, turns out your code is broken!)

Somehow this didn’t come up in testing on Monday - even though it totally broke the game, I’m guessing I made the change and didn’t test it. Anyway, I restored to Sunday’s code and went through the changes, found one that looked suspicious, removed it, and presto! It worked just as before! :smiley:

I don’t know if you guys lock solved problems or not, but I’m gonna edit the title of this thread to show that it’s solved. Do whatever you normally would do as a result.

Problem: SOLVED.


(Ultima2876) #5

Glad to hear you managed to track the problem down and fix it :slight_smile:


(Zachary Lewis) #6