Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6705621
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T07:25:30+00:00 2026-05-26T07:25:30+00:00

I am developing a game engine here: http://synodins.com/apps/tank_fight But now, for some reason, it

  • 0

I am developing a game engine here:
http://synodins.com/apps/tank_fight
But now, for some reason, it doesn’t run anymore.
I cannot initiate the Raphael module, when i run the site with mozilla web debugger, i get “Raphael is not defined”.
But that doesn’t make any sense because it’s very clearly defined in the raphael.js module.

Also, occationally the game runs fine, like, every 20th time i try.
And there’s no clear pattern to what makes it work.
I print out Hello world 1 before trying to initiate raphael, and hello world 2 after trying.
Can anybody see what the problem is?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T07:25:31+00:00Added an answer on May 26, 2026 at 7:25 am

    The block of load_script calls loads the scripts asynchronously. This is why there appears to be no clear pattern.

    There is no guarantee that raphael.js is loaded (and therefore, that Raphael is defined) by the time that the line:

    var playing_area = Raphael(0,50,1600,1600);
    

    is called.

    You should wait until the whole document is ready before attempting to use variables defined in external scripts. Under normal circumstances, this is the onload event of the document. Various libraries like jquery also offer their own “ready” event, that you could tie to if you use them.

    Is there any reason why you load the scripts in the way you do, rather than simply using markup, as below?

    <script src="raphael.js"></script>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Right now I'm developing a small canvas oriented 2D graphics engine for a game,
Some time in the near future, I will begin developing a game engine. One
I am thinking of developing of a game like this: http://www.newgrounds.com/portal/view/429799 Do you have
Im developing a game engine for iphone in C++ but im getting a crash
Can anyone recommend a good Java game engine for developing simple tile-based games? I'm
Hi i am developing game level editor.Currently I am using win32 with directX.But with
I'm developing chess game for Android ( androidchess.appspot.com ). If I want to add
I'm developing what it's turning into a cross-platform 2D Game Engine, my initial platform
Im developing a game for Android using AndEngine. As of now, I want to
I am currently developing a C# .net xna game engine. I have been trying

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.