Skip to main content

News

Topic: Sphere SFML v0.90 (Read 106817 times) previous topic - next topic

0 Members and 2 Guests are viewing this topic.
  • N E O
  • [*][*][*][*][*]
  • Administrator
  • Senior Administrator
Re: Sphere SFML
Reply #45
You know what? I feel the need for a tutorial article on the wiki Developing a Sphere-compatible engine. Engine devs edit as needed with your personal experience on creating the thing :)

Also, stickying the topic.
  • Last Edit: July 16, 2013, 04:17:42 pm by N E O

  • Radnen
  • [*][*][*][*][*]
  • Senior Staff
  • Wise Warrior
Re: Sphere SFML
Reply #46
I don't want it stickied. In fact I'll make a stickied topic that points to the forum posts, in this way the stickied topics don't clutter this subforum.

Edit: I can't do that.. I remember doing that here before. Weird.
  • Last Edit: July 16, 2013, 06:26:59 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

  • DaVince
  • [*][*][*][*][*]
  • Administrator
  • Used Sphere for, like, half my life
Re: Sphere SFML
Reply #47
I unstickied it for you, Radnen. :)

I'm thinking... Would it be better to have a special subforum for engine-related projects? That way, we don't have to have this many sticky threads.

  • Radnen
  • [*][*][*][*][*]
  • Senior Staff
  • Wise Warrior
Re: Sphere SFML
Reply #48
Oh, I found out where to do that now XD. Okay, thanks DaVince. +1 on the subforum idea for engines. I'll hold off on making a post until god, ahem, Neo decides. :P
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

  • Radnen
  • [*][*][*][*][*]
  • Senior Staff
  • Wise Warrior
Re: Sphere SFML
Reply #49
I have finished Spritesets.

Now I am working on the FileSystem functions, File and RawFile objects.

Then I'll do general game loading (to run startup games correctly). How about this guys: starting a game opens it in a new window; keeping your current window open. That way all strange bugs are eliminated, and there were plenty: invalid screen size, sounds going forever, crashes, etc.

Finally, I'll do the map engine last.

Edit: Guys, with Jurassic it will one day be possible to compile JS to a file and use compiled JS straight-up when you launch your game. This can greatly increase execution speed in some cases.
  • Last Edit: July 16, 2013, 10:35:59 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

  • N E O
  • [*][*][*][*][*]
  • Administrator
  • Senior Administrator
Re: Sphere SFML
Reply #50

Finally, I'll do the map engine last.


Isn't that indeed often the case? Map engine implementations always go last ;)

  • Radnen
  • [*][*][*][*][*]
  • Senior Staff
  • Wise Warrior
Re: Sphere SFML
Reply #51
Wait for it.... Networking will be the very last to do in fact. I swear! :)

I just finished file reading/writing. Interesting thing I found out about Sphere: If you save a double, make sure to read back a double. It sounds stupid but it's true.

Code: (javascript) [Select]

file.write("test", 1.568);
file.read("test", 5); // returns 1
file.read("test", 7.2); // returns 1.568


So that explains why I had numbers screw up in my early years w/ sphere's file object. :P Also you can't run the above test in Sphere 1.5/1.6, because you need to flush, save, and reopen the file. But in sphere-sfml you can.
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: Sphere SFML
Reply #52
You generally have to make sure the default value you give a read is the same type you want to read out if it exists. I ran into a couple issues with that and strings before.

  • Fat Cerberus
  • [*][*][*][*][*]
  • Global Moderator
  • Sphere Developer
Re: Sphere SFML
Reply #53

You generally have to make sure the default value you give a read is the same type you want to read out if it exists. I ran into a couple issues with that and strings before.

Indeed, but JS makes no distinction at the language level between an integer and a double--a number is a number (in other words, 1 === 1.0 === true).  So I can see why it's weird in this case to have them treated differently.
  • Last Edit: July 18, 2013, 12:36:28 am by Lord English
neoSphere 5.9.2 - neoSphere engine - Cell compiler - SSj debugger
forum thread | on GitHub

  • Radnen
  • [*][*][*][*][*]
  • Senior Staff
  • Wise Warrior
Re: Sphere SFML v0.65alpha
Reply #54
So I forgot to link the latest release here, v0.65. It introduces all manner of file objects and the ByteArray class Have fun!
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: Sphere SFML v0.65alpha
Reply #55
Question, bit confused with all the other engine releases being worked on.

Is the goal of sfml Sphere to be cross-platform, or to forward web development for sphere (access from browser)?

Know that TurboSphere is to increase performance (originally to achieve ability to make mode7 games).
The others though I'm a bit lost on as well.

  • Radnen
  • [*][*][*][*][*]
  • Senior Staff
  • Wise Warrior
Re: Sphere SFML v0.65alpha
Reply #56
It is intended as a multi-platform, and web-based solution that is also really fast and error-free. It's supposed to be a silver bullet.

But, it's not currently cross-platform since Jurassic is not. It is also not web-based yet since I haven't ran JSIL on it. But once those problems are resolved it will be.

Currently you can make games that do not use the map engine or networking features.
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

  • Radnen
  • [*][*][*][*][*]
  • Senior Staff
  • Wise Warrior
Re: Sphere SFML v0.65alpha
Reply #57
MAP ENGINE.

I'm surprised how little effort it took to get this far. I basically copied and pasted the map file code straight from the editor (thank god I used the MVC design). That means I just wrote a quick SFML wrapper for the graphics and there you have it. Maps.

Ignore the fps, that's stuck on from the last frame. It's more like 800ish

Edit: I optimized the drawing to use surfaces. It's now back to 6000 fps on maps. :)
Well, now the hard part is doing this for very large maps. Luckily I have an implementation for that in my sphere editor. :)
  • Last Edit: July 19, 2013, 01:57:40 am 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

  • Fat Cerberus
  • [*][*][*][*][*]
  • Global Moderator
  • Sphere Developer
Re: Sphere SFML v0.65alpha
Reply #58
Hmm, I really need to try running Specs on this now and see what happens. :)
neoSphere 5.9.2 - neoSphere engine - Cell compiler - SSj debugger
forum thread | on GitHub

  • Radnen
  • [*][*][*][*][*]
  • Senior Staff
  • Wise Warrior
Re: Sphere SFML v0.65alpha
Reply #59
So the largest error I cannot solve easily in Sphere-Sfml is the use of const. Many older games used it everywhere, but it's not ECMA standard as of today (the latest standard v6 may add it in). Because it's not standard only SpiderMonkey can run const. If it works in v8 it's because they borrowed/stole that functionality as because it strictly is not standard compliant...

I'm going to have to do one of two things:
1. Preprocess all files so that const will act as var (via string replace).
2. Modify the Jurassic lexer to recognize const and treat it as a var if I'm quick 'n dirty, or as a privileged var if I have time.

Since I do *not* want to lose focus of my goal I will just do #1 and then do #2 down the road.

Edit:
Also .__defineGetter__ and .__defineSetter__ are not ECMA standard, and quite a lot of games use them. :/
  • Last Edit: July 20, 2013, 04:56:14 am 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