1
Show Posts
This section allows you to view all Show Posts made by this member. Note that you can only see Show Posts made in areas you currently have access to.
Messages - scojin
2
Libraries / Re: MapEngine for Sphere v2
I created a new project, copy-pasted the code, adjusted for custom map and sprite, and still got the same result. I'll post some pics and a link to the smaller project I made.
Spoiler (click to show/hide)
Spoiler (click to show/hide)
3
Libraries / Re: MapEngine for Sphere v2
Bleh. Thanks for the quick response!
4
Libraries / Re: MapEngine for Sphere v2
uncaught JavaScript exception
RangeError: Invalid read size '-929892776'
at TileBuffer (@/src/MapEngine/PixelBuffer.mjs:171:9)
at MEngine.prototype.setMap (@/src/MapEngine/MEngine.mjs:380:9)
at Generator.prototype.next (native code)
at MapEngine.prototype.start (@/src/MapEngine/map-engine.mjs:168:9)
at Generator.prototype.next (native code)
at Anonymous function (@/src/main.mjs:199:1)
at module (@/src/main.mjs:2:1)
I followed the template for cellscript and the mainscript and made the file path adjustments where necessary.
I'm using .rmp maps. I tried making a new map, and I also tried making a map with only a single layer, but still get the error. My tile sizes are 16x16, but that isn't what comes back in the debugger. Is there something I'm missing? Probably something simple...
Thanks in advance!
5
Engine Development / Re: miniSphere 5.0.1
Issues were file extensions(.js to .mjs) and getting rid of the tutorial changes.
I'll start a new thread if I have anymore questions.
6
Game Development / Re: robotfindskitten, back from the dead
7
Engine Development / Re: miniSphere 5.0.1
I'm sure there is a lot of nuance and order that is over my head, so is there an example demo that I could view? I've looked at the getting started tutorial and it helped a little bit, but I've got a small rat's nest that's gotta be sorted through.
Any tips on updating projects from the older version of minisphere? Any recommended reading would be great, too!
Thanks!
8
Script Support / Re: Surface Questions
9
Game Development / Re: The Screenshot Thread
The only thing that catches my eye is the brick wall, but that was really only because you mentioned it.
It all looks really good!
10
Script Support / Re: Surface Questions
Works like a charm.
11
Script Support / Re: Surface Questions
I was just puzzled on why the text would appear correctly but not the images.
I was able to test around and recreate the situation. If I create the surface as an image, it displays whatever image was loaded, however if I 'add' an image afterwards, it doesn't. I'm able to have text appear and I can get graphic primitives to display(line,circle,fill,etc.), but images do not.
If it helps, my menu is basically a loop that 'refreshes' after a key is pressed.
Let me know if you need anymore info.
12
Script Support / Re: Surface Questions
My actual code has a bit more to it, so I made a brief example.
13
Script Support / Surface Questions
Like so:
Store
A
B
C
House
A
B
C
D
Forest
A
C
D
So basically I have a function that checks, orders, and creates the selections for the menu and then returns the selection order and the selection display in an object. The display is created basically like so:
Code: [Select]
object.image = new Surface(w,h);
//draw header
prim.blit(object.image,x,y,header);
//draw quests
font.drawText(object.image,x,y,whateverquest.title); //draw title
prim.blit(object.image,x,y,whateverquest.status); //draw icon
//--------------------------------------------
object.selection = selection_array;
object.display = object.image.toImage();
return object
The problem is when I call the menu to be displayed, it only displays the title(from drawText) and not the header or icon(from prim.blit). This is my first go with surfaces, so maybe I'm just not using them right, or maybe I'm missing something?
Thanks in advance.
14
Site Comments / Re: New front page in development
15
Engine Development / Re: minisphere 4.4.2
I've got my globals marked with global., so guess I'll have to study up on using modules.
Basically, I've got my scripts organized by the objects they are i.e. character.js has a character object and functions that go along with it(stat updates,etc), items.js has item objects, creates items, uses, etc., menu.js the menu and all of its functions, blah, blah
Since I know they're loaded as modules I can start trying to figure out how to properly structure everything.
I want to continue with the v2 to take advantage of all the capabilities, even though it's over my head right now.
Thanks for the quick reply.

