Skip to main content

News

Topic: neoSphere 5.9.2 (Read 523043 times) previous topic - next topic

0 Members and 19 Guests are viewing this topic.
  • Fat Cerberus
  • [*][*][*][*][*]
  • Global Moderator
  • Sphere Developer
Re: minisphere 1.0.7
Reply #285
This just in: I got the minisphere engine binary down to under 1.5MB without sacrificing any functionality. :)  Compiling Allegro myself was totally worth it, I can leave out all the useless stuff I don't need (like OpenAL, which Allegro doesn't even really take advantage of).  This means the engine is less than a third the size of Sphere 1.5! (By my count, 6.5MB, including the config utility and video plugins and excluding the editor)

minisphere truly lives up to its name! 8)

Also fixed: The audio deadlocks.  I may not have mentioned it, but after the Allegro upgrade I started seeing random hangs when playing sounds.  I'm guessing these were caused by OpenAL, since that's the biggest thing I excised from Allegro and the lockups have since stopped happening. *crosses fingers*
  • Last Edit: April 10, 2015, 02:43:16 am by Lord English
neoSphere 5.9.2 - neoSphere engine - Cell compiler - SSj debugger
forum thread | on GitHub

Re: minisphere 1.0.8
Reply #286
@Lord English:
It's at least a valid application now, but it crashes on opening it.


  • Fat Cerberus
  • [*][*][*][*][*]
  • Global Moderator
  • Sphere Developer
Re: minisphere 1.0.8
Reply #287
Hm, I might have to set up a virtual machine with XP for testing.  Not sure why it's crashing like that, if you click for more details (the Click Here link), what does it say?
neoSphere 5.9.2 - neoSphere engine - Cell compiler - SSj debugger
forum thread | on GitHub

Re: minisphere 1.0.8
Reply #288
It comes up with the screenshot below... but when I click technical details I can't copy&paste the information there, and it's got all the modules and some hex data.

  • Fat Cerberus
  • [*][*][*][*][*]
  • Global Moderator
  • Sphere Developer
Re: minisphere 1.0.8
Reply #289
That's helpful, actually--it's a null pointer dereference.  All the zeroes under address are a dead giveaway.  Something isn't being initialized properly for whatever reason...

I'll investigate.
neoSphere 5.9.2 - neoSphere engine - Cell compiler - SSj debugger
forum thread | on GitHub

  • N E O
  • [*][*][*][*][*]
  • Administrator
  • Senior Administrator
Re: minisphere 1.0.8
Reply #290
Re MP3 (and certain other file types) support - would you like to give a try to using JS loaders like mp3.js for these?

  • Fat Cerberus
  • [*][*][*][*][*]
  • Global Moderator
  • Sphere Developer
Re: minisphere 1.0.8
Reply #291
That would of course be an option, although it would require me to expose some sort of raw stream object to script, which would deviate pretty sharply from the Sphere 1.x API.  Maybe for minisphere 2.0 (the planned Pegasus edition), but certainly not in this first version.
neoSphere 5.9.2 - neoSphere engine - Cell compiler - SSj debugger
forum thread | on GitHub

Re: minisphere 1.0.8
Reply #292
it would require me to expose some sort of raw stream object to script


An ArrayBuffer. The word you are looking for is ArrayBuffer.  :P  But It should be possible even with ye olde ByteArrays, though, shouldn't it?

We need to do a lot of work on Pegasus still. Right now it's still just an early draft. I agree with most of it, but there are lots of little points to iron out, and lots of stuff I don't think should be a part of the core API but rather an extension.

  • Fat Cerberus
  • [*][*][*][*][*]
  • Global Moderator
  • Sphere Developer
Re: minisphere 1.0.8
Reply #293
The ArrayBuffer is only part of it. That's just data after all--the engine itself still has to be able to know what to do with it. It's like saying you could implement networking entirely in script with just ByteArrays. :P

Also, I'm pretty sure Duktape doesn't support ArrayBuffers. (Not yet anyway.  The developer is working on it from what I understand...)

As for Pegasus and not being finalized: let me just say I despise design-by-committee.  I'd rather forge ahead now and work out the specifics later.  I don't really mind refactoring and we want to get people excited about Sphere 2.0, which isn't going to happen unless they see concrete evidence in the form of a working engine.

I mean look at ES6.  That's still a draft, but a lot of JS engines went ahead and implemented parts of it anyway.  Duktape has the Proxy object for example--which I took advantage of to implement ByteArrays in minisphere.  And seeing that in action in turn got me more excited about ES6.  I don't see why we can't do the same with Pegasus.
neoSphere 5.9.2 - neoSphere engine - Cell compiler - SSj debugger
forum thread | on GitHub

Re: minisphere 1.0.8
Reply #294

The ArrayBuffer is only part of it. That's just data after all--the engine itself still has to be able to know what to do with it. It's like saying you could implement networking entirely in script with just ByteArrays. :P



Fair enough. I still need to actually expose this from my audio plugin, too.



As for Pegasus and not being finalized: let me just say I despise design-by-committee.  I'd rather forge ahead now and work out the specifics later.  I don't really mind refactoring and we want to get people excited about Sphere 2.0, which isn't going to happen unless they see concrete evidence in the form of a working engine.


Sure. Most of my concerns could even be fixed just by changing what is required to be called an extension and what isn't :)

  • Fat Cerberus
  • [*][*][*][*][*]
  • Global Moderator
  • Sphere Developer
Re: minisphere 1.0.9
Reply #295
1.0.9 is now available, now with FollowPerson(), function support for Set*Script, and a couple small fixes.
neoSphere 5.9.2 - neoSphere engine - Cell compiler - SSj debugger
forum thread | on GitHub

  • DaVince
  • [*][*][*][*][*]
  • Administrator
  • Used Sphere for, like, half my life
Re: minisphere 1.0.9
Reply #296
I see you made FollowPerson() behave exactly like in Sphere 1.5, which is to say it takes the follower a bit of walking before suddenly warping in behind the leader. I always thought the FollowPerson() function was useless exactly *because* it behaves this way. Could you make it instead that the follower will try to catch up to the leader from whatever position they were already in when the FollowPerson() command was called?

  • Fat Cerberus
  • [*][*][*][*][*]
  • Global Moderator
  • Sphere Developer
Re: minisphere 1.0.9
Reply #297
The problem there is that doing that requires built-in pathfinding, something I'm not too keen on building into the engine. I don't think that's really the function's intended purpose anyway--it's just a minimal implementation you can use to make your party members follow each other around.  Anything more advanced is left up to the game developer to do in script.

TL;DR incoming: See, I've learned something while working on this project, it's the thing that makes Sphere such an awesome engine: It provides a lot of built-in functionality, which allows you to get a game up and running very quickly, but it's also quite deliberately designed to get out of the way when you decide you want to step outside of its provided parameters.  You generally don't appreciate this as someone on the outside looking in developing a game, but seeing the finer points of how the engine does things under the hood, I've started to appreciate the little subtleties.

A great example: I had to fix edge script triggering not once, but twice because of this.  When I first implemented edge scripts, a cursory glance at the reference implementation (i.e. Sphere) yielded this code:
Code: (c++) [Select]
if (input_valid)
{
    if (!UpdateEdgeScripts())
        return false;
}

I naturally interpreted this to mean that edge script activation requires a valid input attachment (AttachInput).  I later found out this wasn't the case when the Trial and Error intro turned out to be broken in minisphere, and, after another quick look--this time at the UpdateEdgeScripts() function--changed it to require an active camera attachment instead.  This fixed T&E, but was still incorrect, which I didn't find out until Radnen sent me his Blockman game and I couldn't move between maps.  The game manages the camera itself in script, so there's no AttachCamera() calls to be found.  In other words, the edge script activation logic only cares about where the camera actually *is*, not who's holding it.  Realizing this was an epiphany: I suddenly understood that the engine was deliberately designed this way so that you could replace AttachCamera() with your own implementation if you wanted to, and that doing so wouldn't break other things that you might not necessarily want to replace.

Sphere doesn't look like much, but it's actually a pretty well-engineered little engine. :D

As for that input_valid variable?  Turns out what it actually means is whether the map engine is currently accepting input at all (i.e. are we inside the main MapEngine() loop), regardless of whether there's a current input attachment or not.  Poor choice of naming, which I of course rectified in minisphere (it's called is_main_loop there :P).
neoSphere 5.9.2 - neoSphere engine - Cell compiler - SSj debugger
forum thread | on GitHub

  • DaVince
  • [*][*][*][*][*]
  • Administrator
  • Used Sphere for, like, half my life
Re: minisphere 1.0.9
Reply #298
Quote
The problem there is that doing that requires built-in pathfinding, something I'm not too keen on building into the engine. I don't think that's really the function's intended purpose anyway--it's just a minimal implementation you can use to make your party members follow each other around.  Anything more advanced is left up to the game developer to do in script.


Well, I honestly was just thinking about solving it like "move toward player at twice or thrice the normal speed without regarding any collision" (since it disregards collision anyway) just so the transition of a character being where it is to arriving near the player makes more sense. I never expect FollowPerson() to be used when the follower isn't already at least near the leader, and there wouldn't be a point to the function at all when it's implemented with its current looks-like-it-is-bugged behavior. And I rather like the simple function and would use it if it wasn't for this one small nagging thing.

Also, that is an extremely cool story! Pretty neat way for the engine to figure out the right thing. :D
  • Last Edit: April 12, 2015, 01:09:14 pm by DaVince

  • Fat Cerberus
  • [*][*][*][*][*]
  • Global Moderator
  • Sphere Developer
Re: minisphere 1.0.9
Reply #299
Well to be fair, it doesn't have to deal with collision since the followers just follow the exact path the leader does and outside of edge cases with vastly different base dimensions, they're guaranteed not collide with anything either.  This improves performance, which is important since the follow tracking has to move a lot of data around every frame itself.

But I do agree with the sentiment here.  I'll see what I can do.  Post an issue on GitHub about it so we can track it. :)
neoSphere 5.9.2 - neoSphere engine - Cell compiler - SSj debugger
forum thread | on GitHub