News for hackers. Stuff that matters.
Re:Ambient: The Multiplayer Game Engine by ambientqtns on Wednesday February 22, 2023 @10:30PM (#34906385)
"Why not Rust?" is a question I ask about game development a lot these days.

I'm an engineer with a decade of experience as a web services engineer, and 5 years of game development engineering. Rust seems like the right direction for game developers -- safer code, faster compile times, more portable binaries.

Ambient looks very cool, but I had some questions --

1) WebAssembly, but no native web player? One of the most powerful things a game dev can do is provide a link to a game and just let people play it on itch or other space. Having a binary you have to download to play is a major turn off for small time games. It looks like it's on the roadmap, but without a clear target?

2) No editor/tooling yet? What's the plan for a unity-like editor interface? How do non-developers (designers, artists, audio folks) interact with a game made with ambient? Is that in the plans for the future? Could you expand on it a bit more?

3) Sustainability? A five person crew working on a free product, how do you plan on monetizing it?

4) Single executable? One concern that jumps out right away is the single executable for server and client. Often in multiplayer games you want to avoid shipping server binaries (for cheat protection, for instance, or to avoid the cost of deploying a large client to a headless server environment). Are there plans to provide the ability to separate client and server builds?

5) HTML for front end? Games are increasingly moving to HTML to power their UI. Given you are already using WebAssembly, it seems like it wouldn't be that far off to enable an interface so that UI could be handled in JS/HTML. (Yes, this is performant enough for games. Yes, it's being done in AAA games. No, you aren't the first commenter who thinks that UI shouldn't be done in HTML. No, I'm not interested in hearing complaints about it.)

Nevertheless, this looks neat,

Re:Ambient: The Multiplayer Game Engine by aww_dang on Wednesday February 22, 2023 @10:59PM (#34906586)
>1) WebAssembly, but no native web player? One of the most powerful things a game dev can do is provide a link to a game and just let people play it on itch or other space. Having a binary you have to download to play is a major turn off for small time games. It looks like it's on the roadmap, but without a clear target?

Appstores, antiviruses and gatekeepers of every sort. Employees want to play games without installing.

>HTML...

The problem is with CSS and the ever evolving HTML standard. Feels a bit heavy and the implemented features will always be incomplete.

Re:Ambient: The Multiplayer Game Engine by krapp on Wednesday February 22, 2023 @11:07PM (#34906637)
Steam and the app stores seem to be doing just fine. Maybe there's a popular indie title only released for browsers but I can't think of it.
Re:Ambient: The Multiplayer Game Engine by prophesi on Wednesday February 22, 2023 @11:34PM (#34906802)
The trick is to use itch for an easily accessible early build, then transition to Steam / mobile stores once you have monetization in place.
Re:Ambient: The Multiplayer Game Engine by tormeh on Wednesday February 22, 2023 @11:19PM (#34906715)
There's this small one called Farmville. Though granted I don't know if it's still printing cash the way it used to. It's possible smartphones killed that sort of game.
Re:Ambient: The Multiplayer Game Engine by nickstinemates on Thursday February 23, 2023 @01:18AM (#34907402)
My wife has been playing the same farmville farm for 12 years, since I met her. Hasn't spent a penny, but they release updates all of the time. I'm amazed at her dedication and theirs to this game.
Re:Ambient: The Multiplayer Game Engine by squeaky-clean on Thursday February 23, 2023 @12:33PM (#34913660)
Wasn't Farmville shut down in 2020? It was flash based. The versions I can find now are all mobile apps in the app store.
Re:Ambient: The Multiplayer Game Engine by sarchertech on Wednesday February 22, 2023 @11:23PM (#34906736)
Rust faster compile time? Faster than what? The terrible compile time is a big reason why I avoid rust for game dev.
Re:Ambient: The Multiplayer Game Engine by vvanders on Thursday February 23, 2023 @01:14AM (#34907372)
Last game engine(C++) I worked on was a full hour to build if you touched a core header, and that was with Incredibuild that farmed out the compile across the studio.

If you care about compile/iteration times you can get them down to a reasonable level, Bevy does a good job splitting the heavy lift part into a section that is linked dynamically[1] which leads to pretty reasonable compile times even in something Rust based.

That said most of the high-churn areas I've seen drop to some scripting language(ex: Lua or others) for both hot-reload and avoiding compile times. Usually the heavy compute pieces are out in native with orchestration in scripting or something more flexible.

[1] https://bevyengine.org/learn/book/getting-started/setup/#ena...

Re:Ambient: The Multiplayer Game Engine by pjmlp on Thursday February 23, 2023 @01:27AM (#34907450)
That is why we now have incremental linking, hot-code reloading and for the lucky ones on VC++, modules.

This toy application https://github.com/pjmlp/gwc-rs takes about 15 minutes to compile from scratch on a humble Asus 1215B, whereas the C++ original (thanks to having Gtkmm available as binary), takes about 2 minutes.

Re:Ambient: The Multiplayer Game Engine by echelon on Thursday February 23, 2023 @01:17AM (#34907396)
> The terrible compile time is a big reason why I avoid rust for game dev.

Compile times are the least of your worry.

The big problem is lack of tools and libraries in Rust gamedev. You can't even achieve PS2-era graphics with Rust right now. Neither Bevy nor FyRox support blend shapes / morph targets, and that's a two decades old and absolutely essential animation tool.

Rust for gamedev is going to take a decade to really get going.

Re:Ambient: The Multiplayer Game Engine by Ygg2 on Thursday February 23, 2023 @01:51AM (#34907593)
Same with any OSS software, you get what you give.
Re:Ambient: The Multiplayer Game Engine by pjmlp on Friday February 24, 2023 @01:47AM (#34921643)
Depends if one is Amazon, among many other similar examples.
Re:Ambient: The Multiplayer Game Engine by Ygg2 on Friday February 24, 2023 @05:26AM (#34923057)
I meant as a person. Corporation aren't people.
Re:Ambient: The Multiplayer Game Engine by shmerl on Thursday February 23, 2023 @01:53AM (#34907604)
> You can't even achieve PS2-era graphics with Rust right now.

Don't you have access to Vulkan from Rust? So you should be able to do whatever you want, same as doing it in any other language I assume that can plug into it.

Re:Ambient: The Multiplayer Game Engine by habitue on Thursday February 23, 2023 @01:09PM (#34914176)
I think the point being made is about the tooling being available to do it easily.
Re:Ambient: The Multiplayer Game Engine by shmerl on Thursday February 23, 2023 @01:37PM (#34914562)
Haven't looked into it, but I think there were a bunch of projects for Vulkan bindings for Rust. Not sure how much harder it's to use that vs using it from C++.
Re:Ambient: The Multiplayer Game Engine by habitue on Thursday February 23, 2023 @01:56PM (#34914784)
So ambient uses WebGPU, which on rust usually means the wgpu library, which has a vulkan backend for platforms that support vulkan. It's possible that's what you're thinking of.

The issue is that vulkan is really low level. So while it's possible to do whatever you want, you need tooling to make it worth the effort to do in rust. For example, let's say this morph thing is a click and drag difficulty level operation in Unreal engine, but in ambient there's no specific tool for it so you have to write 10K lines of code to do the same thing. In this case, the issue isn't what's possible through the gpu, but rather how much work a developer has to do.

If you have to choose between writing big portions of code to do what other engines nice you for free vs. spending that time on your game, many developers will opt for the more mature engine.

(I say this as someone who is not a game developer, I've never used Unreal engine, and I have no idea what this morph operation is, but this is the shape of the issue at play here)

Re:Ambient: The Multiplayer Game Engine by shmerl on Thursday February 23, 2023 @02:04PM (#34914876)
This sounds to me like an engine issue, it has nothing to do with it being in Rust. Same can apply to engine in any language. I.e. whether it provides certain features for you or not and you need to implement them yourself.
Re:Ambient: The Multiplayer Game Engine by echelon on Thursday February 23, 2023 @04:24PM (#34916684)
> you need to implement them yourself

This is a massive amount of work before animators can make any use of it. Teams or indie devs that want to use modern animation in their games can't make use of Bevy/Fyrox(/Ambient?) until they develop these tools, which may take years at this rate.

Tickets for more modern animation have been filed in both projects for quite some time, but they lack the staffing and engineering headcount to work on it.

These engines are in a place where they can do rigid bone animation, but that's it. No faces, no breathing, no talking. You can hack your way forward with bones, but it's not as good and it's hard to build/maintain.

I'm doing my part by donating to many of the engineers building these systems in Rust, but I can't expend extra engineering help from myself or my team - we're too busy building things, and sadly I'll probably have to start launching web-facing stuff with Godot due to its incredible maturity. Our entire stack is almost entirely Rust, so it's a bit sad for us.

Re:Ambient: The Multiplayer Game Engine by pjmlp on Friday February 24, 2023 @01:46AM (#34921636)
Using from C++ means already having Unreal C++, Ogre3d, Godot, Open 3D, CryEngine tooling, today.
Re:Ambient: The Multiplayer Game Engine by MindSpunk on Thursday February 23, 2023 @05:48AM (#34908983)
> You can't even achieve PS2-era graphics with Rust right now

That's just straight up false:

https://github.com/EmbarkStudios/kajiya https://github.com/BVE-Reborn/rend3

Re:Ambient: The Multiplayer Game Engine by echelon on Thursday February 23, 2023 @06:22AM (#34909149)
You didn't respond to the substance of my comment, and your links solve none of my problems.

Where are my PS2-era shape keys? Bones aren't going to cut it.

Re:Ambient: The Multiplayer Game Engine by jalbertoni on Thursday February 23, 2023 @01:50AM (#34907590)
> Yes, this is performant enough for games. Yes, it's being done in AAA games.

Every time someone says something mildly controversial about weird technology being used for UI in games, I like to point out Skyrim used Flash for its UI. Bunch of .swf files inside the packed data file. It used some weird non-100%-standard player, but it was still Flash.

Re:Ambient: The Multiplayer Game Engine by msk-lywenn on Thursday February 23, 2023 @03:35AM (#34908266)
Probably used scaleform. It was used by many games. It was a massive headache for engine programmers. The thing really had very very poor performance... I think it was always heavily hacked so that it could run decently, both the actionscript side and the scaleform side. At least that's what a programmer did for a year to get something decent. I can't believe it could have ended up anywhere else with that tech. Still, it was amazing for artists.
Re:Ambient: The Multiplayer Game Engine by pjmlp on Thursday February 23, 2023 @04:01AM (#34908422)
Most likely Skyrim used Scaleform, https://en.wikipedia.org/wiki/Scaleform_GFx.

Arena Wars was one of the first games using .NET already in 2004, years before Managed Direct X or XNA came to be, with direct bindings to OpenGL. [0]

Then we have quite a few sucessful ones in XNA, some of them them ending up as quite relevant IP franchises.

Minecraft being a success, regardless of being written in Java.

Runescape, a plain Java applet that kept legions of gamers occupied.

Or for that matter the 1990's game development literature trying to move the ecosystem from raw Assembly to C, and how long C++ needed to gain traction over C in most studios. Even today many of them rather code in "C with C++ compiler" style.

Which shows that even C++ had quite an uphill being adopted by the industry.

Tech doesn't matter if game design and IP is compeling enough to make people enjoy the game.

A great engine, with a top language and bad game design, doesn't go far.

[0] -- https://en.wikipedia.org/wiki/Arena_Wars

Re:Ambient: The Multiplayer Game Engine by chillfox on Thursday February 23, 2023 @01:53AM (#34907606)
"Why not Rust?"

Well, if you have got access to a language designed for making games like Jai, then that would presumably be better than Rust.

Re:Ambient: The Multiplayer Game Engine by spicyusername on Thursday February 23, 2023 @09:06AM (#34910726)
Is there a road map for when Jai might be available.
Re:Ambient: The Multiplayer Game Engine by chillfox on Thursday February 23, 2023 @11:31PM (#34920779)
Not as far as I am aware
Re:Ambient: The Multiplayer Game Engine by FredrikNoren on Thursday February 23, 2023 @05:15AM (#34908787)
Hi, Ambient CPTO here.

1) Yes, we're currently working on this and progress is good, so stay tuned for that! 2) We actually built a collaborative editor for this, which we've been using in-house for a year now. We choose to not release it right now, as there's still some things we need to work out with it, but it's coming too! 3) We plan to monetize services around this, such as game server hosting and tools for people to monetize what they create. 4) So the runtime is completely open source, so anyone can look into the code anyway. If you build something on top of this, you will also be able to choose if your own code should live on the server, client or both. If it's server only it won't be sent to the clients. 5) We've experimented with partial html UIs, but support for it on Rust native isn't great yet. We do have a fairly decent UI implementation (see examples here: https://github.com/AmbientRun/Ambient/tree/main/crates/ui/ex...) though it's not exposed to user code yet, but yeah I hear you that there's a lot of people who know html based UI tech. We'll see exactly where we end up there, but most likely the first step will be to expose the UI library we've built already to users.

Thanks!