Impact

This forum is read only and just serves as an archive. If you have any questions, please post them on github.com/phoboslab/impact

1 decade ago by keanudicap

Hey,

I bought ImpactJS and try to start Weltmeister following book <Introducing HTML5 Game Development>. By using XAMPP, I tested http://localhost/residentraver, and it works, while I tested http://localhost/residentraver/weltmeister.html, I can see bottoms written Save, Save as ... and plus icon, but by clicking, nothing happened.

The console errors using chrome are as follows:

----------------------------------------------------------------
Uncaught Failed to load entity list via glob.php: SyntaxError: Unexpected token <
<%@ Page Language="C#" %>

<%@ Import Namespace="System.Collections.Generic" %>
<%@ Import Namespace="System.Configuration" %>
<%@ Import Namespace="System.IO" %>
<%@ Import Namespace="System.Web.Script.Serialization" %>

<script runat="server">
//___________________________________________________________________________ PRIVATE MEMBERS
private string _appRootURL = string.Empty;
private string _appRootPath = string.Empty;

//______________________________________________________________________ PROTECTED PROPERTIES
/// <summary>
/// The root of the application in web/URL form.
/// </summary>
protected string AppRootURL
{
get
{
if (_appRootURL.Equals(string.Empty))
{
_appRootURL = Request.ApplicationPath + ConfigurationManager.AppSettings["fileRoot"];
if (_appRootURL[_appRootURL.Length - 1] != '/')
{
_appRootURL += "/";
}
}

return _appRootURL;
}
}

/// <summary>
/// The root of the application in filesystem/path form.
/// </summary>
protected string AppRootPath
{
get
{
if (_appRootPath.Equals(string.Empty))
{
_appRootPath = Server.MapPath(this.AppRootURL);
}

return _appRootPath;
}
}


//____________________________________________________________________________ EVENT HANDLERS
/// <summary>
/// Code that needs to run as the page is loading.
/// </summary>
/// <param name="sender">The object that triggered this event.</param>
/// <param name="e">Any arguments passed to the event.</param>
protected void Page_Load(object sender, EventArgs e)
{
string urlPath = this.AppRootURL;
if (!String.IsNullOrEmpty(Request["dir"]))
{
urlPath += Request["dir"].Replace("..", "");
}

if (!String.IsNullOrEmpty(Request["glob"]))
{
urlPath += Request["glob"].Substring(0, Request["glob"].LastIndexOf('/'));
}

string dir = Server.MapPath(urlPath);
string pattern = Request["glob"].Substring(Request["glob"].LastIndexOf('/') + 1);

string[] files = Directory.GetFiles(dir, pattern);
for (int i = 0; i < files.Length; i++)
{
files[i] = files[i].Substring(this.AppRootPath.Length).Replace("\\", "/"); ;
}

JavaScriptSerializer serializer = new JavaScriptSerializer();
Response.Write(serializer.Serialize(files));
}
</script> entities.js:50


Uncaught Unresolved (circular?) dependencies. Most likely there's a name/path mismatch for one of the listed modules:
weltmeister.weltmeister (requires: weltmeister.edit-entities)
weltmeister.edit-entities (requires: weltmeister.entities) impact.js:288
-----------------------------------------------------------------------

I searched forum for solutions, testing php using <?php phpinfo(); ?> written in info.php. I can see the version of php, but I don't know whether php is working. And I tried to upgrade php in xampp manually, but failed.

I have no idea what is wrong. Hope you guys can give me an reply.

1 decade ago by stahlmanDesign

I use MAMP (on a Mac) and it requires the port number after localhost, like this:
http://localhost:8888/yourImpactGame/weltmeister.html

1 decade ago by keanudicap

Yes, using mac need to put 8888 behind, but I am using win 8, this should not be the problem

1 decade ago by Joncom

Are you sure your server has PHP?

Create a file called phpinfo.php and give it the following content:

<?php
phpinfo();
?>

Then try viewing the file in your browser. If you get another error, you probably don't have PHP installed.

1 decade ago by keanudicap

Yup. As I said, I used this trick. I can see the version of PHP and other information. How can I make sure PHP is working?

1 decade ago by Joncom

If you can see the version of PHP via that file, then PHP is working.

1 decade ago by Joncom

If you could upload your example as a zip somewhere like http://upease.se it would be easier for people help you - just be sure to exclude the /lib/impact folder.

1 decade ago by keanudicap

I don't have any work folder or example. I am just testing Weltmeister in ImpactJS.

1 decade ago by Joncom

You're saying that the contents of the http://localhost/residentraver folder contain only the unmodified Impact library and nothing else?

1 decade ago by keanudicap

Yes, I added some images in folder media and want to load these images using weltmeister.

1 decade ago by Joncom

Please zip up your entire project folder and upload it to http://upea.se/
Make sure you exclude the lib/impact/ folder though.
Then share the file here so we can take a look.

1 decade ago by keanudicap

OK, the link is below:


http://upea.se/get?hash=bdf5f49fb2d25ae6dc8c8d0ebc4e365d&file=impact.rar

1 decade ago by Joncom

The files in lib/weltmeister appear to be outdated.
I was able to fix the issue by using the latest Impact files instead.
Page 1 of 1
« first « previous next › last »