Skip to main content

News

Recent Posts

11
Libraries / Re: box2d-sphere
Last post by DaVince -
This is nice! I want to create a platformer in miniSphere eventually, so this would come in mighty useful. :)
12
Libraries / box2d-sphere
Last post by Eggbertx -
I've been working off and on on a port of box2d.js to miniSphere, which would allow a developer working with miniSphere to make more dynamic platformers. If you aren't familiar with box2d, it's a physics engine used in games like Angry Birds, LIMBO, and Happy Wheels.
The screenshot shows the stage in "Debug draw" mode, which would be the equivalent of drawing only collision objects in miniSphere. When it's more stable, I would be able to attach a Person object's position and rotation to a box2d object.
Unlike box2d.js and the original, I'm also working on a stage object to make stage building easier. So rather than writing boilerplate code for each static and dynamic body, you can just create a JSON file and save a lot of effort. For example, this is the file that sets up the stage shown in the screenshot:
Code: [Select]
{
"name": "Test stage",
"gravity": { "x": 0, "y": 32 },
"allowSleep": true,
"border": {
"top": 5,
"bottom": 5,
"left": 5,
"right": 5
},
"objects": [
{
"type": "rectangle",
"dynamic": false,
"position": { "x": 32, "y": 32},
"size": { "w": 50, "h": 10},
"angle": 5
},
{
"type": "circle",
"dynamic": true,
"position": { "x": 55, "y": 64},
"radius": 10,
"angle": 0
}
]
}


I wanted to make an animated GIF showing it in action, but OBS studio wouldn't play nicely.
This is a somewhat low-priority project compared to the other ones, but I figure you guys might be interested. I'm going to hold off on uploading the code, since it's a bit of a mess right now. As soon as it's at least a little bit more stable, I'll probably upload it to GitHub or something.
13
Projects / Re: Project ZeC (My Zelda-esque Clone)
Last post by Miscreant -
Can you post the map script you're using?

Very small... only 2 maps to begin with.
14
Projects / Re: Project ZeC (My Zelda-esque Clone)
Last post by Rhuan -
Can you post the map script you're using?

The line 403 error is persist.js forcing an error as it can't run the code from the map script you've given it. (It has internal error handling designed to give you more sensible error messages)
15
Projects / Re: Project ZeC (My Zelda-esque Clone)
Last post by Miscreant -
I do have a map script for each map. I put the other values in to all the scripts and left them blank.

I have 3 different versions of persist.js (Wiki & Forums version are 2 different file sizes.
The wiki page: Line 403 error
The forum: SyntaxError: missing } after property list
@Radnen  analogue.js: Also returning a missing } error but with enter: function () {}

I did ask about the map script format before I attempted. I also corrected the error @Fat Cerberus pointed out. This is becoming a very confusing functionality.
16
Projects / Re: Project ZeC (My Zelda-esque Clone)
Last post by Rhuan -
I've not used persist.js but based on reading your error and the code I think it expects you to have a map script or each map AND for each of those map scripts to define all of the standard scripts for that map - if you want the script to be blank I think you still need it in the map script just have it as an empty function.

I think what's happening is that persist.js has overwritten the default on enter map script (which would be blank) with the one it has read from your map script file - but you didn't include one so instead of "" it got the value undefined which is what it's then trying to execute.
17
Projects / Re: Project ZeC (My Zelda-esque Clone)
Last post by Miscreant -
In attempting to use persist.js, I keep getting an error on startup. The program is small. 2 map one exits north, the other south. I don't have a default enter map. Just leaveNorth & LeaveSouth. I do not know enough about persist.js, Would someone be willing to look it over to determine if there actually is an error?
18
Projects / Re: Project ZeC (My Zelda-esque Clone)
Last post by Fat Cerberus -
Almost.  You have an extra spurious ( before "function" that shouldn't be there, though.
19
Projects / Re: Project ZeC (My Zelda-esque Clone)
Last post by Miscreant -
Would this be the proper formatting for a persist map javascript file?
20
Projects / Re: Project ZeC (My Zelda-esque Clone)
Last post by Miscreant -
All doors for level 2 coded and functional, including the shutter doors.