Skip to main content

News

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - East

16
Sphere Support / Re: Distributing Question
Thanks! It works.

Seems kinda obvious - I did try this but it was after I changed the directory structure from the old 1.5 layout into the new layout, and didn't really know what to do next - I then copied the whole game directory into miniSphere, and so the engine didn't recognize it. I should have only copied the "dist" folder and renamed it "startup" (I think... right? That's what I tried now and it works).
17
Sphere Support / Distributing Question
Hey guys!

I feel kinda silly asking this, but I'm just so used to Sphere 1.5 that everything in miniSphere is a struggle for me. So here's the thing:

I'm used to just copying my game's folder into Sphere's (1.5) folder, renaming it "startup", deleting, renaming some stuff and it's pretty much good to go. What's the protocol now with miniSphere for this? I searched the forums for a good hour and didn't find anything, and I can't seem to find the solution myself.

18
I couldn't remember exactly what I did that caused the crash so it took me a while to find it, but there it is:

Code: [Select]
var mixer = new Mixer(44,16);
mixer = new Sound;


It causes an error message on test (obviously), and then when I close the engine I get the crash.

19
... So apparently the crash was because of me using the sound mixer in some very bad way. I managed to fix it and even managed to make the sound effects work using the mixer! I actually love how easy it is to configure now.

I saw you guys speak about JSON in a lot of the miniSphere and Sphere Studio threads here, so I went and learned me a bit of JSON (had no clue what that is at all), and it helped me understand how some of the things in the v2 API work.

But... my game's battle system still doesn't work smoothly in the new engine. Lots of entity-movement stuff that I guess I need to rewrite. So for the moment I'm back at the 1.5 editor, I just don't have enough free time to make the upgrade AND work on the game right now, as much as the new editor looks good and comfy.
20
Sphere Support / Making the upgrade to miniSphere
Hi guys. So I recently came back to my Sphere game after a pretty long break (~7.5 years). I haven't been coding anything during this time so it takes me a while to get back but I think I'm starting to get the hang of things.

Anyways, I made my game back then in Sphere 1.5, and now when I got back and tried to upgrade it to miniSphere, I ran into some problems.

There are a number of old 1.5 functions which I used a lot in my code, that now don't work. For example, LoadSoundEffect(), which I changed into LoadSound() to not get an error message , but now whenever I use sound.play(), nothing happens I can only play one sound at a time. Another issue is, whenever I exit the engine, I get a crash message from windows telling me "miniSphere engine has stopped working". There are other things in the code that now just don't seems to work but I won't specify them, and instead I'll just ask, what do I need to learn in order to use miniSphere correctly. As someone who is not a coding expert (switched to sphere from RM2k, learned pretty much everything on the fly from the API and online guides), it feels almost like a different programming language.

I looked in the Sphere 2 API but I just don't know how to use most of what's in there. To use the sound example again, I saw in the API something about a mixer, with some dots and some hashtags and all I could think about is this.

TL;DR: after upgrading to miniSphere I'm back to being a complete noob, where can I learn how to Sphere?

Thanks :)
21
Game Development / Re: RPG Events in Sphere
Allrighty then. Off to try it out! ;D
22
Game Development / Re: RPG Events in Sphere
A quick question about miniSphere - is the LoadSoundEffect function gone? I actually tried it last night but whenever I tried to test/debugg my game, I got a message telling me that LoadSoundEffect is undefined. Haven't had time to try and fix it, should I just change every LoadSoundEffect into LoadSound?
23
Game Development / RPG Events in Sphere
Hi guys! Came back here after a long, long hiatus from Sphere and developing in general and for the past few days I've been scripting and photoshoping like crazy, after I found my Sphere project while cleaning up my old PC.

I came into the Sphere world after a few years of working with RPG Maker 2000, and one of the things that I found most difficult is creating events for a story-driven game. I got used to RM2k's quality of life and the task of scripting every event from scratch in Sphere made me give up on the idea and instead, just focus on creating gameplay elements like a battle system, movement system, etc.

Now that I came back I've tried to come up with a way to create an event system that will allow me to create new events on the fly, that won't feel like some dirty job that will put me off after a while.

At first I had a single "events(switch)" function with a switch inside of it, that I could call whenever I wanted for simple events. The actual event code was right inside the case section that was called. The problem was that I could only make it work with very simple events, such as changing variables or objects, a single box of dialogue, etc. It was nice for a start but I couldn't do anything substantial with it and it actually put me off for a while as I didn't feel like I could script any narrative using it.

Yesterday I had the idea of integrating an events system into the update script of my active battle system. The update script is active almost all the time, even when combat is toggled off, and I figured that if I can use it to create complex skills with multiple phases, I can probably use it with some kind of loop system to create events.

What I came up with was once again, an event(switch) function, but this time each switch case called a secondary function, and inside that function was the actual event script.

The first function is called from inside the update script whenever var event_taking_place says so, and the secondary function is built from sections of if cases, checking a main "event step" variable and a secondary "event loop" one. After each step, the first variable gets +1 and the loop variable gets reset. I tried to mimic what I used to do with RM2k and I look at every "step" section like a line of "code" in RM.

It looks something like this:

In the update script:
Code: [Select]

if (event_taking_place) events(event_title);

So that when I want to call an event, I set the "event title" variable to the one I want to call and then turn on the "event taking place" one.

In event.js:
Code: [Select]
function events(event_title) {
switch (event_title) {

case "RaditzShowsUp":
// Raditz shows up at Master Roshi's House, freaks everyone out, takes Gohan and flies off
event_raditzshowsup();
break;

}
}

(Yep. It's a DBZ game)

And then:
Code: [Select]
function event_raditzshowsup() {
++event_loop;

// Step 1: Raditz shows up and steps forward
//---------------------------------------------------------------------------
if (event_loop == 0) {
DetachInput();
SE_choose.play();
CreateMapPerson({ name: "Raditz", spriteset: "enemies/raditz.rss", x: 19, y: 27, layer: 0 });
QueuePersonCommand("Raditz", COMMAND_FACE_NORTH, true);
MoveNPC({ name: "Raditz", command: COMMAND_MOVE_NORTH, tiles: 1 });
SetPersonScript("Gohan", SCRIPT_COMMAND_GENERATOR, ""); // gohan stop moving
event_step = 1;
}
if (event_loop >= 50 && event_step == 1) {
event_dialogue_done = false;
event_talker = "Raditz";
dialoguelist[0] = new msg(event_talker,"Ah, there you are, Kakarot!",event_talker, true);
convo = true;
event_step = 2;
}

// Step 2: Move 2
//---------------------------------------------------------------------------
if (event_loop >= 100 && event_step == 2) {
if (event_dialogue_done){
if (!convo) {
QueuePersonCommand("Raditz", COMMAND_FACE_NORTH, true);
MoveNPC({ name: "Raditz", command: COMMAND_MOVE_NORTH, tiles: 1 });
event_loop = 0;
event_step = 3;
} else { event_loop = 0; }
}
}

... And so on, when the last step calls an "end_event()" function to reset everything and close things up.

AAAnd... after all that, and considering I'm kind of a coding noob, I just want to ask, is this an OK system to have? What I was worrying about is if the act of calling a function inside a function inside a function, etc. etc., with a loop variable, from an update script, may be too much on the game engine and will cause problems down the road when I have more systems running? Right now it seems fine but I don't wanna find out too late that I broke something beyond repair.

Also, I would love to hear suggestions and ideas for a - maybe - better event system, and feel free to correct me/notify me/tip me about weird things in my code, as I said, I'm pretty much a noob in coding but somehow I do know how to get things to work, using functions from the API (and that's what I'm afraid of  ;D :P).

This turned out to be quite the wall of text so thanks if you've made it this far!  :)
(Attached: screenshot of said event taking place)