Skip to main content

News

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

0 Members and 15 Guests are viewing this topic.
  • Fat Cerberus
  • [*][*][*][*][*]
  • Global Moderator
  • Sphere Developer
Re: miniSphere 4.5.11
Reply #1620

Just noticed - Sully works fine here too. I once tried to modify the game so it shows the intro and stuff, and it has to load different files for that, and that is what is failing. To be exact, it fails trying to show images/intro/retro.gif - a file that wasn't used in the original Sully Sphere demo.


It seems I was wrong and Allegro doesn't officially support GIF:
http://liballeg.org/a5docs/5.2.2/image.html#al_init_image_addon

I think earlier Windows builds used to support it because that was when I was compiling Allegro myself, and I configured it to use GDIplus to keep the .exe size down.  Windows itself of course supports GIF, so everything worked under that configuration.  On Unix platforms though (and now Windows, using the official Allegro binaries), Allegro uses libpng and libjpeg instead, so no GIF support to speak of.  This is a compatibility issue for sure, but at the end of the day I'm not convinced it's worth going out of my way to fix, since it's a lot of work and few 1.x games seem to use GIF images anyway.
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 4.5.11
Reply #1621
Yeah, that makes sense. I don't foresee any future use happening either, so I'll just convert the files then. Thanks for looking into it.

  • Fat Cerberus
  • [*][*][*][*][*]
  • Global Moderator
  • Sphere Developer
Re: miniSphere 4.5.11
Reply #1622
By the way, this is neither here nor there, but GetVersion() in miniSphere returns 2.  It's the true Sphere 2.0 ;)
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 4.5.11
Reply #1623
While going through the downloads repo, I found this spec about info.txt that I wrote back when I wanted to archive every single game onto it, for later use.

But I got to thinking... No one really uses that file, and we have the s2gm file format now. Stuff like the release date, version and contact/forum links are still useful, however, so I wondered if it wasn't a good idea to extend the s2gm format to include these, as well as having an easy interface to enter this data (support in Sphere Studio, Cell). Any thoughts on this?

  • DaVince
  • [*][*][*][*][*]
  • Administrator
  • Used Sphere for, like, half my life
Re: miniSphere 4.5.11
Reply #1624
Also (and this might have gotten lost somewhere in the thread), is there a way to run Cell to generate an empty project for me? Something like cell --new foldername.

Edit: okay, so I found the template in the source code (minisphere/assets/template). I assume there's a way to still have this generated through the command line, but what is it?
  • Last Edit: June 11, 2017, 03:36:50 am by DaVince

  • Fat Cerberus
  • [*][*][*][*][*]
  • Global Moderator
  • Sphere Developer
Re: miniSphere 4.5.11
Reply #1625
The template is only used by Sphere Studio right now.  Majin is meant to be the command line tool to generate projects, but I haven't started working on it yet.  That'll be one of the new features for 5.0 :)
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 4.5.11
Reply #1626
Ahh, okay! It seems like the most useful thing. Any reason why doing something like cell --new wouldn't be sufficient? I guess you'll be going all out with what it can do?

As long as in the end you can do majin projectname and it will (or optionally won't) ask you a few basic questions about the project, I'm happy. Heck, I'm happy that running cell is a matter of just... running cell.

In the meantime, I'm writing a whole new "Getting Started" article for the wiki and just linking to a basic template project. Would this Cell.mjs work?

Code: (javascript) [Select]
/* Basic game template */

import { transpile } from 'compiler';

//In the future, this line will change into:
//Object.assign(Sphere.Game, {
describe("Game Name", {
version: 2,
saveID: 'unique-identifier-for-saving-the-game',
author: "Your name here",
summary: "Summary of the game",
resolution: '1280x720',
main: 'src/main.js',
logPath: '~/log.txt',

othervariables: 'any value you would like',
});

transpile('@/scripts/', files('src/*.mjs'));
transpile('@/scripts/', files('src/*.js'));

install('@/images',      files('images/*.*', true));
install('@/music',       files('music/*.*', true));
install('@/spritesets',  files('spritesets/*.rss', true));
install('@/sounds',      files('sounds/*.*', true));
install('@/maps',        files('maps/*.rmp', true));
install('@/maps',        files('maps/*.rts', true));
install('@/windowstyles',files('windowstyles/*.rws', true));
install('@/',            files('icon.png'));
install('@/',            files('README.txt'));


edit (fatcerberus): Add JavaScript formatting and remove extra curly braces from code
  • Last Edit: June 11, 2017, 10:33:38 am by DaVince

  • Fat Cerberus
  • [*][*][*][*][*]
  • Global Moderator
  • Sphere Developer
Re: miniSphere 4.5.11
Reply #1627
Yep, that template should work.  Just remove the extra curly braces first - the reason they are there is because I use .NET String.Format() to fill in the values, which uses {0} etc. to indicate placeholders, so you need to double them to get a literal curly brace.

As for Majin, the other idea I had for that tool was for it to be used to upgrade existing Sphere v1 projects, besides making new ones from scratch.  But maybe that's overkill these days... I'll think about it.  It would definitely be less work to integrate the functionality into Cell.
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 4.5.11
Reply #1628
Thanks. I tweaked it a little more (a string was being terminated and I changed the folder and file inclusion a little). I'll be putting up the new wiki article pretty soon too.

Re: miniSphere 4.5.11
Reply #1629
and we have the s2gm file format now


Really? I've never heard of that, and Radnen's Sphere Studio doesn't seem to use it.

  • Fat Cerberus
  • [*][*][*][*][*]
  • Global Moderator
  • Sphere Developer
Re: miniSphere 4.5.11
Reply #1630

and we have the s2gm file format now


Really? I've never heard of that, and Radnen's Sphere Studio doesn't seem to use it.


game.json.  I originally used an .s2gm extension but changed it to standard JSON.
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 4.5.11
Reply #1631
Yeah, I got a little confused while looking up stuff, but it's a json now. A little more difficult to associate specifically to miniSphere, but I can understand why it was done.

  • Fat Cerberus
  • [*][*][*][*][*]
  • Global Moderator
  • Sphere Developer
Re: miniSphere 4.5.11
Reply #1632

But I got to thinking... No one really uses that file, and we have the s2gm file format now. Stuff like the release date, version and contact/forum links are still useful, however, so I wondered if it wasn't a good idea to extend the s2gm format to include these, as well as having an easy interface to enter this data (support in Sphere Studio, Cell). Any thoughts on this?


The nice thing about a JSON-based format is that you can enter any arbitrary properties into it and the engine will just ignore anything it doesn't understand.  Of course, game.json generation being automated (via Cell) complicates matters.  I'll give this some thought--yet another thing to think about for miniSphere 5.0.
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 4.5.11
Reply #1633
I definitely agree with the json thing. Giving it its own extension just makes it a little easier to associate and recognize, I guess.

  • Fat Cerberus
  • [*][*][*][*][*]
  • Global Moderator
  • Sphere Developer
Re: miniSphere 4.5.11
Reply #1634
Huh, so 4.5.11 was released on April 27.  I'll try to finalize 4.6 by the 27th, then it'll be two months since the last update.
neoSphere 5.9.2 - neoSphere engine - Cell compiler - SSj debugger
forum thread | on GitHub