Skip to main content

News

Topic: Rabbit Adventures (Read 22898 times) previous topic - next topic

0 Members and 2 Guests are viewing this topic.
Re: Rabbit Adventures
Reply #15

Sphere shouldn't be under GPL anymore we gotta get that changed. I'm sure AegisKnight (the creator of Sphere) wouldn't mind if it was changed to something like Free BSD or MIT. The old codebase is so ancient that nobody would necessarily care if portions of its code were 'stolen'. Plus it'll clear up any legal issues with using the filetypes of Sphere in more modern implementations and licensing issues with commercialization and steam.


Well, it's more than just Chad Austin (AegisKnight), though. We'd have to find Flikky/Brian Robb (possible), DarkLich, DRosen, and several others (ranging from difficult to impossible) who contributed large amounts to Sphere to relicense it. Although it doesn't really matter if we follow Sphere's GPL at this point, it would probably matter to a company like Steam.


The sounds and music don't tend to play when you package the game as a .spk. I don't know why exactly, but in any case when you make an official release it's good to replace the files in the startup folder and repackage just the engine.exe as a standalone product.


It's because Audiere doesn't properly support streaming for all audio types (which would let you just feed it data from the SPK), and Sphere doesn't buffer the whole SPK or even individual files out of it to let Audiere statically sample the sound.

EDIT: Wow, ninja'd.

Are you using the Github version of TurboSphere? There should be a travis.yml file that gives an example of how to build Sphere, SDL2 (when not available from the package manager), and V8 from scratch.

Fair warning, do NOT expect the entire Sphere 1.x API (or even half of it) to work in TurboSphere. Sphere-SFML is a much better option for directly migrating from Sphere 1.x.

I've talked to Chad Austin in the past. But we'd need more than just his approval.
  • Last Edit: August 21, 2014, 10:14:04 pm by Flying Jester

Re: Rabbit Adventures
Reply #16

Are you using the Github version of TurboSphere? There should be a travis.yml file that gives an example of how to build Sphere, SDL2 (when not available from the package manager), and V8 from scratch.

Yes, but I was following just the readme file instructions.


Fair warning, do NOT expect the entire Sphere 1.x API (or even half of it) to work in TurboSphere. Sphere-SFML is a much better option for directly migrating from Sphere 1.x.

I know, and I had already changed some stuff to be compatible with TurboSphere. I even managed to have everything working up until the MapEngine call on that old windows version
Check out my game :) www.fantasyfarming.com

  • Radnen
  • [*][*][*][*][*]
  • Senior Staff
  • Wise Warrior
Re: Rabbit Adventures
Reply #17
My latest version of Sphere-SFML is a lot better. I would love to try your game out on it to see what crashes or not. It's map engine is like 75% done right now, and so can therefore support a vast majority of games that do not do weird things like rotating layers or using layer reflections and parallaxation (the latter two would just not show, thus not breaking your game, but not emulating it correctly either).
If you use code to help you code you can use less code to code. Also, I have approximate knowledge of many things.

Sphere-sfml here
Sphere Studio editor here

Re: Rabbit Adventures
Reply #18
Rabbit Adventures is now on github: https://github.com/Hudell/rabbit-adventures

I tried to keep everything in english, but if I missed anything, just let me know.

And there's also this: https://github.com/Hudell/euphoria

Euphoria is like a framework I created while developing this simple game.
It's basically a bunch of classes to keep the game better organized.

It works by separating the game in "flows" ( In retrospect, this might not have been the best name to give to it).
Each flow class is responsible for managing one part of the game. In rabbit adventures, there's 3: Launch, MapEngine and GameOver.

Then, in the main script file of the game, all you need to do is this:
Code: (javascript) [Select]

RequireScript("euphoria/loader.js");
RequireScript("content/flow/Launch.js");

function game()
{
mainGame.startGame(new LaunchFlow());
}


the "Launch" flow draws the start menu and background. When the user selects the "Start" option, it moves to a new flow class:
Code: (javascript) [Select]

RequireScript("content/flow/Map.js");
mainGame.moveToNewFlow(new MapFlow());


and this one is responsible for everything that happens while the MapEngine is running.

All game files are organized in five folders:

  • AI

  • Flow

  • Items

  • Maps

  • Objects



The AI folder holds different Artificial Intelligence classes, used for the enemies and objects. The "Swirl" AI is used to keep objects changing direction. I use it to animate crystals and hearts.

I won't be talking about items for now because I didn't really use it on rabbit adventures and it may not be working anymore. I had just started an inventory and item class before starting the sample game.

Maps are classes responsible for handling the different maps on the game. You create one different class for each map and use it to configure the objects and events of the map.
Code: (javascript) [Select]

RequireScript("euphoria/classes/Map.js");

function Map2Class() {
var me = this;

me.superClass = MapClass;
me.superClass("map2.rmp");
me.twoDimensional = true;

me.doInitialize = function()
{
me.createObject("crystal2", "Crystal").flagName = 'stage2';
me.createBatchOfObjects("redball", "Ball", 90);
me.createBatchOfObjects("heart", "Heart", 2);
me.createObject("carrot2", "Carrot");
};

me.doFirstFrame = function()
{
var playerObject = mainGame.globalDb.getObject("playerObject");
mainGame.player.setPerson(playerObject);
};
}

mainGame.globalDb.registerMapClass("Map2", Map2Class);


Objects are responsible for controlling the sphere entities.
Code: (javascript) [Select]

RequireScript("euphoria/classes/Person.js");

function GrootClass(name) {
var me = this;

me.superClass = PersonClass;
me.superClass(name);

me.onTalk = function()
{
me.speak("I AM GROOT", null, me);
};
}

mainGame.globalDb.registerObjectClass("Groot", GrootClass);


Code: (javascript) [Select]

RequireScript("euphoria/classes/MovableObject.js");

function HeartClass(name) {
var me = this;

me.superClass = MovableObjectClass;
me.superClass(name);

me.obeyGravityLaws = false;
me.setAi("Swirl");

me.onTouch = function(){
mainGame.player.addLives(1);
me.destroyEntity();
};
}

mainGame.globalDb.registerObjectClass("Heart", HeartClass);


The Object class has some events to be inherited:
onTalk = sphere's onTalk script
onTouch = fired by Euphoria when it detects the player touched the object
onUntouch = fired when the player is no longer touching the object


And there's more. I'll write more about it some other time.
Check out my game :) www.fantasyfarming.com

  • N E O
  • [*][*][*][*][*]
  • Administrator
  • Senior Administrator
Re: Rabbit Adventures
Reply #19
Regarding Sphere's license, I believe the reason it was previously set to GPL was to prevent Tivo-ization of the engine itself but still allow users to legally create commercial projects. I do understand the desire to make it more libre to, among other things, increase interest in working on the code of the engine itself and make it easier (at least, philosophically and legally) to fix issues more quickly.

The question of changing Sphere's license to a more open one like BSD or MIT has been brought up a few times over the years, at least one of those was within the 2014 calendar year, but usually a more senior engine dev was actually around to give their opinion on it. Getting approval to change the license would likely involve at a minimum the following people:

  • Chad Austin/AegisKnight (who I believe I can reliably get in touch with as needed)
  • Brian Robb/Flikky (less reachable, but probably still reachable nonetheless)
  • Anatoli Steinmark/kyuu (for recent 1.5/1.6 stuff)
  • Tung Nguyen/tunginobi (for recent 1.5/1.6 stuff)
  • Nilton Castillo/FBNil (for as-of-yet-unfinalized 1.6 stuff, randomly unreachable sometimes)
  • Rhuan (for Mac stuff)
  • and...myself as I'm still officially the current maintainer and project manager

If tie-breaking opinions are needed after that, then alpha123, Jester, Radnen, and Rahkiin shall provide them as they've contributed (however major or minor) to the progress of the official engine most recently.

RPG Maker is a different beast from Sphere altogether. From the beginning it had different goals from Sphere - commercial in scope and nature, a closed-source editor, initially limited possibilities for creation (until the introduction of editable Ruby scripts), and single-OS (Windows) binary packaging of final product. Sphere was GPL'ed in an attempt to be open on all sides without being nearly as limited (which was mostly successful) and also force useful direct engine changes to be provided freely to be folded back into the main source as needed. Commercial possibilities for the engine are still theoretically available, but no one has so far provided evidence of successfully attempting such. Modifying the engine itself to be Steam-capable wouldn't require inclusion of the Steam SDK itself into Sphere's source, but would require the direct edits to the Sphere engine that allow Steam integration to be provided back to us free of charge and that code (or whatever edits it may need to generalize it) would theoretically be owned by the Sphere engine project from then on.

  • Radnen
  • [*][*][*][*][*]
  • Senior Staff
  • Wise Warrior
Re: Rabbit Adventures
Reply #20
Hudell, sweet, your code rocks! It's some of the best code I've seen for a Sphere game. Euphoria is kinda like my RadLib library as in it tries to make Sphere games easier.

Instead of Flows, though I use GameStates and a GameState Manager. This is how a lot of big indie games are made. There are also scene managers for larger games, but my RadLib library does not have a scene manager (yet). A GameState is similar in concept to your Flow concept. My GameStates in basic form, live on a stack. GameStates are things like menus or even actual gameplay. They are pushed on to the stack when required and then popped off when finished. This organizational detail can be used to great affect. Now, all game states have separated render and update loops. This is critical for two reasons: 1, input only works on the top-most state, and 2, it's not process intensive. However, the render loop runs for all states at all times. Now, you may want to have background states update too and that is also a possibility, they just need to be set to update anyways if not top-most and the GameState Manager will try to detect and run those, but generally this is only useful for pure effect states and not input states.

And then I have a lot of other scripts for just making coding in general easier. As of note, my Link.js library in particular can help you write game loop logic and other computational things for your game while still being pretty fast (In Chrome it's exceptionally fast). /shameless-plug

How long have you been programming JS? I seems to me you are very good at it, and so... where were you 7 years ago? :P The community has died down a lot since then and hopefully with code like yours we can attract more people to use Sphere. Can you tell me what parts you do not like or had to work around? Anything frustrating? Because while Sphere itself won't change anytime soon, my engine and Jester's engine are still in constant flux.
  • Last Edit: August 22, 2014, 07:42:45 pm by Radnen
If you use code to help you code you can use less code to code. Also, I have approximate knowledge of many things.

Sphere-sfml here
Sphere Studio editor here

Re: Rabbit Adventures
Reply #21

Hudell, sweet, your code rocks! It's some of the best code I've seen for a Sphere game.

8)


Instead of Flows, though I use GameStates and a GameState Manager. This is how a lot of big indie games are made. There are also scene managers for larger games, but my RadLib library does not have a scene manager (yet). A GameState is similar in concept to your Flow concept. My GameStates in basic form, live on a stack. GameStates are things like menus or even actual gameplay. They are pushed on to the stack when required and then popped off when finished. This organizational detail can be used to great affect. Now, all game states have separated render and update loops. This is critical for two reasons: 1, input only works on the top-most state, and 2, it's not process intensive. However, the render loop runs for all states at all times. Now, you may want to have background states update too and that is also a possibility, they just need to be set to update anyways if not top-most and the GameState Manager will try to detect and run those, but generally this is only useful for pure effect states and not input states.

That really seem like a better way of doing it. I initially thought about using a flow for the menus too, but I hadn't thought about stacking them and ended up doing it differently.
I guess I will switch to this GameState concept too.


And then I have a lot of other scripts for just making coding in general easier. As of note, my Link.js library in particular can help you write game loop logic and other computational things for your game while still being pretty fast (In Chrome it's exceptionally fast). /shameless-plug

Nice! I will check your code out. I had noticed you had made Radlib and that it was similar to Euphoria when I was midway through it, but haven't checked it yet.


How long have you been programming JS? I seems to me you are very good at it, and so... where were you 7 years ago? :P The community has died down a lot since then and hopefully with code like yours we can attract more people to use Sphere.

I first used sphere in the first quarter of 2006, that was just a few weeks before I got my first real job as a programmer. At the time, I only used Delphi and knew next to nothing of javascript. I worked as a Delphi and/or PHP programmer until 2011, when I got my current job where sometimes I wake up not knowing what language I will use that day. I've used a lot of javascript in the last two years, on a few projects based on ExtJS.


Can you tell me what parts you do not like or had to work around? Anything frustrating? Because while Sphere itself won't change anytime soon, my engine and Jester's engine are still in constant flux.

One thing that comes to mind is that I didn't find any way to get the map's Entry Point float position through script.
And the old version of javascript sometimes may end up being a limitation, but for now I've been able to work around it.
Check out my game :) www.fantasyfarming.com

  • Radnen
  • [*][*][*][*][*]
  • Senior Staff
  • Wise Warrior
Re: Rabbit Adventures
Reply #22
Ext.js seems to be like Angular in a way. Angular.js added dependency injection which is sweet since I'd love to see that implemented in a Sphere game. I was able to do a quick dependency injection demo in Sphere, but it was hackish. Unfortunately Sphere's JS makes it harder to do neat things with the prototype object.


One thing that comes to mind is that I didn't find any way to get the map's Entry Point float position through script.
And the old version of javascript sometimes may end up being a limitation, but for now I've been able to work around it.


There are a lot of things like the entry point you can't access. This is a limitation that can hopefully be fixed in newer editions of Sphere. My SphereSFML implements Javascript 1.6 (ECMAScript v5.1), and so has the newer features like Array.forEach and the strict mode.

One thing I hated about sphere is that Load* methods do not return proper JS objects. Even CreatePerson is not an object. It'd be neat to natively have this in Sphere:

Code: (javascript) [Select]

var person = CreatePerson("name", "ss.rss", false);
person.talk = function() {
    Msg.show("Hi! I am " + this.name + " how do you do?");
}

// later...

person.talk();


To do that today you'd have to create your own JS wrappers for such objects. But even then, for LoadImage you were not allowed to extend it in any way. In my SphereSFML, you can extend it since now all resources are proper JS objects.

... wait a minute...

You were Slack0228 (or something like that)? The guy who wanted to create a code editor for Sphere? If so it was you who encouraged me to make a proper Sphere Editor (which you can check out and download). In fact I exclusively use my new editor, have not touched the old editor in a very long time (I only use it if I'm doing something that I hadn't implemented yet).
If you use code to help you code you can use less code to code. Also, I have approximate knowledge of many things.

Sphere-sfml here
Sphere Studio editor here

Re: Rabbit Adventures
Reply #23

There are a lot of things like the entry point you can't access. This is a limitation that can hopefully be fixed in newer editions of Sphere. My SphereSFML implements Javascript 1.6 (ECMAScript v5.1), and so has the newer features like Array.forEach and the strict mode.

One thing I hated about sphere is that Load* methods do not return proper JS objects. Even CreatePerson is not an object. It'd be neat to natively have this in Sphere:

Code: (javascript) [Select]

var person = CreatePerson("name", "ss.rss", false);
person.talk = function() {
    Msg.show("Hi! I am " + this.name + " how do you do?");
}

// later...

person.talk();


To do that today you'd have to create your own JS wrappers for such objects. But even then, for LoadImage you were not allowed to extend it in any way. In my SphereSFML, you can extend it since now all resources are proper JS objects.


Yes :/
I used wrappers in Euphoria, it would be so much better if I could work directly with native objects.


... wait a minute...

You were Slack0228 (or something like that)? The guy who wanted to create a code editor for Sphere? If so it was you who encouraged me to make a proper Sphere Editor (which you can check out and download). In fact I exclusively use my new editor, have not touched the old editor in a very long time (I only use it if I'm doing something that I hadn't implemented yet).

Yes, my username was Slack2028, but my signature had the name "Flick Hudell" with this image:


And it is amazing to know this. I still want to switch to Sphere Studio, but lately I've only been working on the scripts, and for that I use Sublime Text Editor.
Check out my game :) www.fantasyfarming.com

Re: Rabbit Adventures
Reply #24

Instead of Flows, though I use GameStates and a GameState Manager. This is how a lot of big indie games are made. There are also scene managers for larger games, but my RadLib library does not have a scene manager (yet). A GameState is similar in concept to your Flow concept. My GameStates in basic form, live on a stack. GameStates are things like menus or even actual gameplay. They are pushed on to the stack when required and then popped off when finished. This organizational detail can be used to great affect. Now, all game states have separated render and update loops. This is critical for two reasons: 1, input only works on the top-most state, and 2, it's not process intensive. However, the render loop runs for all states at all times. Now, you may want to have background states update too and that is also a possibility, they just need to be set to update anyways if not top-most and the GameState Manager will try to detect and run those, but generally this is only useful for pure effect states and not input states.


Changes in Euphoria:

  • Completed the transition to the GameStates concept;

  • Made a few inheritable GameStates

  • Created ScriptManager.

  • Player movement on platforming maps are now completely controlled by Euphoria instead of default attachInput

  • Added support for slopes, but it still needs more work on it



ScriptManger:
It allows functions like BindKey and SetDelayScript to receive a function reference instead of an string. I made it completely independent of Euphoria.

Changes in the game:

  • Continues

  • New enemies (on stages 3 and 4)

  • Small changes to stage 1 and 6

  • Added collectibles on stage 4



Game downloadable here:
http://hudell.com/downloads/rabbit.zip
Check out my game :) www.fantasyfarming.com

Re: Rabbit Adventures
Reply #25
I haven't updated this since august because I've been working in a different project: http://orangeseasongame.com/
Rabbit Adventures was just a way to "test the waters" for Orange Season. I ended up not using Sphere for that one because I was concerned with the license, as I hope to be able to sell the game on steam at some point, but I still want to develop something like that on sphere one day.

The game is being made with RPG Maker Vx Ace as a map engine, but I'm doing everything through scripts (It already has over 25k lines of scripts). It is a farm simulation game inspired by the harvest moon series. There's a lot of stuff done, even though the maps are still raw and my english translation is bad.

So if anyone feels like checking it, it would mean a lot to me :D
Check out my game :) www.fantasyfarming.com

  • Fat Cerberus
  • [*][*][*][*][*]
  • Global Moderator
  • Sphere Developer
Re: Rabbit Adventures
Reply #26
Looks awesome, but does Steam even accept RPG Maker games?  Not that VX Ace isn't awesome (discounting that it's long overdue for a resolution bump), but it seems like it might be considered too amateurish for a platform like Steam.  I'm not Valve though, so who knows.
neoSphere 5.9.2 - neoSphere engine - Cell compiler - SSj debugger
forum thread | on GitHub

Re: Rabbit Adventures
Reply #27

Looks awesome, but does Steam even accept RPG Maker games?  Not that VX Ace isn't awesome (discounting that it's long overdue for a resolution bump), but it seems like it might be considered too amateurish for a platform like Steam.  I'm not Valve though, so who knows.

If the game is greenlit by the community, they accept it. I've seen a few in there already.
Check out my game :) www.fantasyfarming.com

Re: Rabbit Adventures
Reply #28
My understanding is that as long as your game uses a few bits of the Steam SDK, anything engine-wise is fine. I think there is a dynRPG plugin that does that for RM?

  • DaVince
  • [*][*][*][*][*]
  • Administrator
  • Used Sphere for, like, half my life
Re: Rabbit Adventures
Reply #29

My understanding is that as long as your game uses a few bits of the Steam SDK, anything engine-wise is fine. I think there is a dynRPG plugin that does that for RM?

You don't even need to use the Steamworks SDK (see this FAQ), but it's there for you to enhance your game if you do.