Open Surge Forum

A fun 2D retro platformer inspired by Sonic games and a game creation system

You are not logged in.

Announcement

Our community has moved to Discord! https://discord.gg/w8JqM7m

#76 2018-05-05 23:50:55

Alexandre
Administrator
From: Brazil
Registered: 2009-01-27
Posts: 3,300
Website

Re: Introducing SurgeScript (released! v0.5.2)

SurgeScript 0.5.1 is released!

A new version of SurgeScript is out.

Download it here cool

Besides a few tweaks, this new version brings a pre-compiled Windows version for you to play with.

SurgeScript is now ready for the engine integration.

Offline

#77 2018-05-06 00:19:15

lainz
Member
Registered: 2009-02-18
Posts: 202

Re: Introducing SurgeScript (released! v0.5.2)

Great! In Visual Studio Code, the coloring that works for your scripts is the 'Objective-C', it display no errors at all when coloring the code. You can just associate it for .ss files and voilá, your code is colored smile

Edit: Also using C# highlighter looks fine.

And is an amazing job the scripting system you made. Congratulations smile

Some things I did not read, or know how will work:
- Adding code from another unit (imports, uses, call it what you want, to use an object from another file)

Or it's not intended?

And that's all, everything else looks fine.

Last edited by lainz (2018-05-06 01:23:02)

Offline

#78 2018-05-06 16:09:45

SynfigMaster91
Member
Registered: 2017-10-10
Posts: 144

Re: Introducing SurgeScript (released! v0.5.2)

Alexandre wrote:
SurgeScript 0.5.1 is released!

A new version of SurgeScript is out.

Download it here cool

Besides a few tweaks, this new version brings a pre-compiled Windows version for you to play with.

SurgeScript is now ready for the engine integration.

I tested and looks promising smile

I'm learning with it and remembering the important things of programming such as variables. Now what I should learn next is the rest of the tutorials as well how to make a window with our game on it.

Good job on it, Alex wink

Offline

#79 2018-05-07 14:40:31

Alexandre
Administrator
From: Brazil
Registered: 2009-01-27
Posts: 3,300
Website

Re: Introducing SurgeScript (released! v0.5.2)

Thanks for the comments smile

lainz wrote:

Some things I did not read, or know how will work:
- Adding code from another unit (imports, uses, call it what you want, to use an object from another file)
Or it's not intended?

Simply run:

surgescript unit1.ss unit2.ss and_so_on.ss
SynfigMaster91 wrote:

I tested and looks promising smile

I'm learning with it and remembering the important things of programming such as variables. Now what I should learn next is the rest of the tutorials as well how to make a window with our game on it.

Good job on it, Alex wink

Yes, and also check the examples/ folder for more.

You'll be able to make things with graphics as soon as we start the engine integration. wink

Offline

#80 2018-05-10 15:49:03

lainz
Member
Registered: 2009-02-18
Posts: 202

Re: Introducing SurgeScript (released! v0.5.2)

Hi Alexandre, please add to the documentation that strings are inmutable, I know in some languages always is like that, but is better to note that on the docs.
http://opensnc.sourceforge.net/forum/vi … hp?id=1936

And I at least can't find that on the docs. Well everything else is nice and good!

Offline

#81 2018-05-11 14:57:08

Alexandre
Administrator
From: Brazil
Registered: 2009-01-27
Posts: 3,300
Website

Re: Introducing SurgeScript (released! v0.5.2)

lainz wrote:

Hi Alexandre, please add to the documentation that strings are inmutable, I know in some languages always is like that, but is better to note that on the docs.
http://opensnc.sourceforge.net/forum/vi … hp?id=1936

And I at least can't find that on the docs. Well everything else is nice and good!

Done! Commit log: https://github.com/alemart/surgescript/ … b7541bea35

Offline

#82 2018-05-12 17:06:20

lainz
Member
Registered: 2009-02-18
Posts: 202

Re: Introducing SurgeScript (released! v0.5.2)

Thanks. wink

Offline

#83 2018-05-19 17:47:12

SynfigMaster91
Member
Registered: 2017-10-10
Posts: 144

Re: Introducing SurgeScript (released! v0.5.2)

Hi! How is the integration of SurgeSript going? smile

Offline

#84 2018-05-20 00:49:52

Alexandre
Administrator
From: Brazil
Registered: 2009-01-27
Posts: 3,300
Website

Re: Introducing SurgeScript (released! v0.5.2)

SynfigMaster91 wrote:

Hi! How is the integration of SurgeSript going? smile

I'm about to disclosure information about the upcoming Plugin system. You'll be able to extend the language the way you see fit, pretty much the same way modders can extend the game. I'll be using the new Plugin system to build the bridge between Open Surge and SurgeScript.

If you can't wait, I've already published documentation about a new thing called Factory. It's an advanced thing, and an application of the Plugin system. Read more at: https://alemart.github.io/surgescript/t … s/#factory

Also, get in touch with me on GitHub (and YouTube!) to see more.

I'm gonna release new information soon. smile

Offline

#85 2018-05-20 02:24:43

CharlyTx
Member
From: Wesnoth
Registered: 2011-01-15
Posts: 144
Website

Re: Introducing SurgeScript (released! v0.5.2)

Alexandre wrote:
SynfigMaster91 wrote:

Hi! How is the integration of SurgeSript going? smile

I'm about to disclosure information about the upcoming Plugin system. You'll be able to extend the language the way you see fit, pretty much the same way modders can extend the game. I'll be using the new Plugin system to build the bridge between Open Surge and SurgeScript.

If you can't wait, I've already published documentation about a new thing called Factory. It's an advanced thing, and an application of the Plugin system. Read more at: https://alemart.github.io/surgescript/t … s/#factory

Also, get in touch with me on GitHub (and YouTube!) to see more.

I'm gonna release new information soon. smile

I really want to start coding custom characters, objects and enemies with the new scripting system.

Currently using SurgeScript without the bridge between it and OpenSurge it's like writing code in plain C: is hard to see the results of your work. When the plugin system is up and ready to use, we could have a better perspective how to write objects or adapt already written ones.

By now we can only write the barebones of algorithms to use in custom objects, and once after OS gets SS, we could complete the remaining code.

---------------

I am working in a old project I've left abandoned years ago (custom character, levels with custom bricksets) and I would like to know how sprites/levels/bricksets/etc. definition syntaxes will change, so I could adapt my old scripts as soon as possible.

Offline

#86 2018-05-20 13:24:10

lainz
Member
Registered: 2009-02-18
Posts: 202

Re: Introducing SurgeScript (released! v0.5.2)

Alexandre wrote:
SynfigMaster91 wrote:

Hi! How is the integration of SurgeSript going? smile

I'm about to disclosure information about the upcoming Plugin system. You'll be able to extend the language the way you see fit, pretty much the same way modders can extend the game. I'll be using the new Plugin system to build the bridge between Open Surge and SurgeScript.

If you can't wait, I've already published documentation about a new thing called Factory. It's an advanced thing, and an application of the Plugin system. Read more at: https://alemart.github.io/surgescript/t … s/#factory

Also, get in touch with me on GitHub (and YouTube!) to see more.

I'm gonna release new information soon. smile

Cool smile

Offline

#87 2018-05-20 22:12:39

Alexandre
Administrator
From: Brazil
Registered: 2009-01-27
Posts: 3,300
Website

Re: Introducing SurgeScript (released! v0.5.2)

CharlyTx wrote:

I am working in a old project I've left abandoned years ago (custom character, levels with custom bricksets) and I would like to know how sprites/levels/bricksets/etc. definition syntaxes will change, so I could adapt my old scripts as soon as possible.

I don't plan to modify the syntax of sprites, bricksets, etc. These are likely to stay the same. I just do not know about the levels yet. Too early to tell.

Offline

#88 2018-05-24 22:25:32

Alexandre
Administrator
From: Brazil
Registered: 2009-01-27
Posts: 3,300
Website

Re: Introducing SurgeScript (released! v0.5.2)

Plugins

In this video, I talk about the new plugin system: https://youtu.be/NyFhw7hrpJ0

The plugin system will be the bridge between SurgeScript and Open Surge.

Plugins will be available in the next release - it's just around the corner wink

Offline

#89 2018-06-01 03:44:48

Alexandre
Administrator
From: Brazil
Registered: 2009-01-27
Posts: 3,300
Website

Re: Introducing SurgeScript (released! v0.5.2)

SurgeScript v0.5.2 released!

https://www.youtube.com/watch?v=FkqB4UnVzOk

In this video, I talk about the new release
... and show how you can use SurgeScript to connect to a web page via WebSockets. cool

Please like the video. roll

Offline

#90 2018-06-09 18:09:02

svgmovement
Member
Registered: 2011-11-24
Posts: 209

Re: Introducing SurgeScript (released! v0.5.2)

I have a question (not really a request).
Will there be a way to make objects local to a source file, or no?
The idea is that the objects would not be accessible (spawnable) outside the
source file, and then would be private to the source file.

I ask because of the Plugin example in the documentation, which seems to suggest that the other
objects would not be easily accessible outside of the source file.

I also have a comment.
There is a typo in the documentation for functions:

// This function will return the double of input parameter x
function double(x)
{

should be

// This function will return the double of input parameter x
fun double(x)
{

Looking forward to more progress for the scripting language.

Last edited by svgmovement (2018-06-09 18:11:58)


-- svgmovement

Offline

#91 2018-06-09 20:42:54

Alexandre
Administrator
From: Brazil
Registered: 2009-01-27
Posts: 3,300
Website

Re: Introducing SurgeScript (released! v0.5.2)

svgmovement wrote:

I have a question (not really a request).
Will there be a way to make objects local to a source file, or no?
The idea is that the objects would not be accessible (spawnable) outside the
source file, and then would be private to the source file.

That would be neat, although I don't have it planned. Perhaps you can adopt a naming convention. Like starting the names of the internal objects with a dot ('.').

Also, you can enforce in your script that a particular object can only be spawned by some other specific object. All you have to do is check the name of the parent in your constructor(). That would give you a restriction similar to the one in the question.

svgmovement wrote:

I ask because of the Plugin example in the documentation, which seems to suggest that the other
objects would not be easily accessible outside of the source file.

That's a good point. What's not easily accessible is a particular instance.

Just as a side note, what you talked about (objects local to the source file), and also what CharlyTx said the other day (objects requiring a particular engine version) can be done via metaprogramming. I believe it's too much of an overkill to implement this now, but the possibility is there:

@internal(__FILENAME)
object "Foo" { ... }

@require("0.5.0")
object "Bar" { ... }

svgmovement wrote:

There is a typo in the documentation for functions:

Thank you smile

Offline

#92 2018-06-23 02:00:03

Alexandre
Administrator
From: Brazil
Registered: 2009-01-27
Posts: 3,300
Website

Re: Introducing SurgeScript (released! v0.5.2)

Early demo

Here's an early demo of SurgeScript integrated to Open Surge:

https://www.youtube.com/watch?v=qFeCN_mPpp0

This and more will be available in the next build of the game engine. cool

Offline

#93 2018-06-23 09:54:40

TheSeventhEmerald
Member
From: Spain
Registered: 2010-04-19
Posts: 302

Re: Introducing SurgeScript (released! v0.5.2)

It's marvelous!

Better organized, more powerful than the old API, and, in my opinion, clearer syntax. This is really going to increase the possibilities with items and bosses.

Nice video, and please keep the nice work big_smile


Piece of cake...!

Offline

#94 2018-06-28 16:49:04

Alexandre
Administrator
From: Brazil
Registered: 2009-01-27
Posts: 3,300
Website

Re: Introducing SurgeScript (released! v0.5.2)

New video

In this video, I show how to make Surge run after a battery that is controlled by the mouse. You can see how SurgeScript compares to the old API in terms of scripting logic.

https://youtu.be/PAeonS5KR1s

I intended to keep the new API as simple as possible. A new build of the engine will be available within the next few days, so you can play with it. wink

Offline

Board footer

Powered by FluxBB  hosted by tuxfamily.org