Novice learning 'Starling' discussion

@Bink

Good afternoon, may I ask what development techniques are available for “Starling”? Can you share your experience?

That’s a rather broad question. Are you able to clarify what sort of guidance you’re after?

@Bink

Good morning, what I want to say is, can you share the skills you have mastered during your years of development? Novice exploration in advance

Honestly, one of the most valuable skills I have developed in my years of doing this, has been a process of development.

The how of how you get from idea to product.

For most of 2011-2019, I was working for a marketing agency, providing technology solutions, most of them involving development. The turn-around time on any project was usually ridiculous, some of them very complex.

We can waste a lot of time in the planning stage of any project, over thinking every little thing. But we had no time for that.

What I needed to develop, was a way of streamlining and structuring the development process so I knew how to proceed, and others in my team (which grew and shrunk as projects needed), knew how to proceed and how to collaborate.

There’s a lot to this, but I’ll sum it up.

  1. Read Jeff Sutherland’s book on Scrum. I’ve read lots of books on project management, and most of them were a waste of time. This one has everything you need to know and it’s presented in an interesting and entertaining way. It’ll give you a structured yet simple way of approaching project management, team communication and task lists that are meaningful (unlike typical project management), that can work on individual and team projects.

  2. Develop an architectural pattern that you can use and reuse on all your projects. Simply put, a way of structuring your code and its processes, so any time you’re developing, it is clear to you exactly how things should be structured and where code should go. I believe it’s important that you develop a system that makes logical sense to you, and any team you might be working with. Personally I believe any architectural pattern that requires a university degree to explain or understand, has over baked its usefulness. Keep it simple, make it make sense. MVC was a popular design pattern back in the day, and my approach takes its cues from that, although I have simplified that right down:

  1. Don’t get too hung up on the details. If you’re trying to make a product, there’s probably dozens of different ways you could go about it, and all of them good. Don’t let the nitty gritty details get in the way of making the thing! Is option A technically 5% more performant than option B, even though both maintain 60fps on modest hardware? That’s interesting information, but don’t sweat it. Get the product made using the method that’s going to provide the least resistance for you.
  2. And lastly, nothing is forever. The development world is always changing. There will come a time when the younger developers are using new technologies that your ageing brain is no longer able to adapt to as it once could. That’ll also probably happen sooner than you expect. Keep your mind active, dabble in other technologies, don’t paint yourself into a corner focusing entirely on a single language or framework. Prepare for a time when you’ll be managing developers, and taking a less active roll in actual development.
1 Like

@Bink

Thank you for your reply.
I just came back,
I just saw your reply,
You are so knowledgeable ..
I still need to work hard,
Thank you for sharing your experience

By the way,
The filters in OpenFL and Starling,
Which one has higher performance?

I’m not sure off the top of my head. Starling is GPU first, which is something in its favour, but OpenFL is also well optimised for GPU usage, but with a bit more variability.

If knowing is important, perhaps producing a side-by-side benchmark of sorts, against your specific target, is something to consider.

@Bink

I thought you had already done these tests,
After all, you have over 10 years of experience in starling development ..

If filters are being heavily relied on for a project, essentially above all other requirements, then perhaps I can see the value in investing time to create a benchmark to test and compare these things.

I’ve personally not needed to rely on filters in this way. Where possible, I avoid them, opting instead for static assets, which are going to undoubtedly be the fastest option overall.

As a principal though, Starling is a framework for making games that on top of focus on GPU acceleration, offers additional helpers and features. If those features are valuable to your project, then whether or not OpenFL may be as fast at rendering filters or not, is kinda beside the point. This applies in reverse too.

Select the framework that’s best able to help you get the thing made.

@Bink

I remember you saying,
You never use any ‘filters’,
Did you directly apply the ‘filter effect’ to the image?

Have you noticed this issue?

@Bink
@joshtynjala

Have you ever used modern game engines such as “Unity, UE, Godot”? How do these compare to the performance of ‘openfl starling’?

@Bink
@joshtynjala

Why don’t people choose to use modern game engines,
But instead choose to use ‘openfl’

@Bink
@joshtynjala

Has “openfl” fully implemented “as3 socket tcp udp”?

TCP: openfl.net.Socket - OpenFL API Reference
UDP: openfl.net.DatagramSocket - OpenFL API Reference

TCP and UDP sockets are available on native targets only. They are not available on the HTML5 target. However, openfl.net.Socket implements web sockets for the HTML5 target instead.

You mean with respect to accessing specific type information at runtime?

Using the -final build flag (eg: openfl build cpp -final) can greatly optimise your output code, stripping out unused code, debugging code and reflection features. It’s these cross-platform reflection features that provide type detection, but they come with overhead.

So where possible, I try to avoid using things like reflection and be careful with dynamic objects. That can be difficult at times, like if you were needing to differently handle multiple possible data types through a single function. I touched on this issue with you previously.

I have used Unity for some projects, but that’s going back some years. Back then (2016-2018’ish), I noted the output bundle was considerably bigger than Starling for AIR’s, and had more GPU compatibility quirks than Starling for AIR on desktop targets. Unity development was also complicated by Unity updates, which often introduced breaking changes to a project, causing everyone to have to sync to a specific version of Unity for the duration of a project. Whereas dropping in an updated AIR SDK or Starling framework was largely trivial.

In comparison to Starling for AIR, I personally found Unity bloated, expensive and bound by restrictive licensing. Despite its cost and bulk, it lacked the fullness and richness of features the free AIR SDK provided, instead relying on sometimes questionable 3rd party add-ons, with inconsistent implementations. Developing in Starling felt highly streamlined by comparison.

I’ve dabbled in UE, but nothing really worth mentioning. Godot has interested me for a while, and if I was to pick one of the three, that’d be my focus, but that’s primarily because of my leaning towards open-source projects.

If you’re looking at that sort of engine though, then you might also take a look at Heaps.io. This is the game engine made by the folk who make Haxe.

Why might some people prefer simple Hainan ji fan over nian ye fan? I know I do!

Sometimes the simpler option is exactly what you need, and all you need :wink:

In the context of your HTML5 based game, as @joshtynjala noted, that means it would be communicating using the WebSockets protocol, not raw TCP sockets.

I’ve used OpenFL for a number of HTML5 based projects now communicating over WebSockets for real-time interactivity over WAN. It works well.

I’ve implemented the server in a couple of different ways, but so far always leveraging Node.js with the ws library. If you need to support both HTML5 (WebSocket) and desktop/mobile (TCP Socket) clients, you can manage both with a Node.js server. Node.js can natively handle TCP Socket clients via net.

I put the Node.js server behind an Nginx reverse proxy, which provides some filtering (a layer of security) and TLS termination, which is important. If your website is delivered over HTTPS (which it should be), then most browsers will block access to mixed content (non-HTTPS), including access to non-secure WebSockets (ws://). It means your WebSockets must communicate securely over wss:// in order not to be blocked by the user’s browser. Nginx provides this, so long as you’ve sourced a domain name and security certificates for it (like those provided free from Let’s Encrypt via certbot).

[WebSocket client]wss://[Nginx reverse proxy]ws://[Node.js]

This is by no means an in-depth how to, if anything it’s just a vague overview. There’s a lot more that could be said on this.

@Bink
@joshtynjala

What is the difference between AS3 and OpenFL versions of Starling?
Which rendering performance is higher in win.exe?

Since OpenFL can target AIR very efficiently, it doesn’t really matter :wink:

2 Likes

The “demo” sample project includes a simple benchmark. You should compare the results between the AS3 version and the Haxe version yourself. Let us know what you discover!

1 Like