Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Rocko Bonaparte
Mar 12, 2002

Every day is Friday!

TooMuchAbstraction posted:

All of the languages you listed have tradeoffs that make them less appealing in some circumstances. Lua has a tiny standard library and some kind of weird language concepts (in particular "everything is a table" and 1-based indexing). Python has weak typing and using it for game scripting poses technical challenges as, as far as I'm aware, it's basically impossible to sandbox outside of putting everything in a VM or something. C++ and C# are comparatively heavyweight languages, requiring a compilation step and lacking the expressiveness of higher-level languages.

All of which is to say that sure, inventing a new language is kind of dumb and silly, but it's still not surprising to see it happen. People want to improve on what's out there, and they don't always just want to improve things by incrementally adjusting the existing tools.

I want to use this as a springboard to bitch about embedding scripting languages. Yes, they all suck, but a lot of that is a runtime problem than a language problem. I'm working on my own Python interpreter--for as much as I need of it--for embedding. A lot of that is due to runtime constraints, and not language constraints. Those runtime constraints are problems with embedding in other situations too with other languages.

My situation with using it as a scripting language is being able to pre-empt the scripts. I think a completely acceptable thing to try to do with a script that you wouldn't do in your primary engine language is just some NPC dialog stuff:
code:
yes_or_no = ask("Yes or no?", ["Yes", "No"])
You want some box to come up with that and have the player select Yes or No. While it's waiting, you want the engine to continue playing music, draw to the screen, and accep the necessary controller input to close that dialog. You can't have the scripting engine hog the thread and kill the game. That little bit right there is so much harder than it really should be.

I tried to find if IronPython would work, but it's flat out converting Python to Linq expression trees. At that point, the .net runtime is running off with it and that's that. I couldn't figure out how to, say, cram some awaiters into it. I couldn't readily figure out how to make the code cooperative with generators or anything else without, say, spraying yield on basically every single line. If asyncio was available, I could use that, but then I'm still spraying await everywhere.

What made me kind of wake up about this was a GDC retrospective on Maniac Mansion and ScummVm. He showed how Maniac Mansion's scripting logic was basically just a pile of coroutines. Then I thought about how you can run that on an 8088. Then I got kind of frustrated.

The other little perk with grabbing the runtime by the face is you can save off all the state for the scripts you're running by serializing their interpreter stacks. I'll find out how gross this is shortly. I have this vomit up on GitHub but I don't even have the REPL working so I haven't bothered sharing.

Adbot
ADBOT LOVES YOU

Falcorum
Oct 21, 2010

CYBEReris posted:

the one language i've used that feels like it could be The One Answer to game development is Rust but I don't think it has enough support from game devs yet for that to really kick off, and it can sometimes be the epitome of an unreadable hell mess.

Rust doesn't have anywhere near the ecosystem nor the productivity benefits needed for that at the moment.

BabelFish
Jul 20, 2013

Fallen Rib

xgalaxy posted:

Unreal Engine 4.22.0 release tag was just pushed to GitHub.
Should be seeing it in the Unreal Engine Launcher some time later today.

Release notes:
https://www.unrealengine.com/en-US/blog/unreal-engine-4-22-released

I can't wait to try out these build time improvements, and hopefully Live Coding (I wonder how much they paid for the "everyone using UnrealEngine" license for Molecular Matters' Live++) scales to full size projects. It would save our studio literal man weeks.

Truspeaker
Jan 28, 2009

Polo-Rican posted:

I was afraid of some catch like this, but I think for my use-case it's fine. I'm basically just using it to load background images for the music game I'm working on. Each song has 2 fullscreen images and a few smaller ones... I doubt the total file of all of the backgrounds will end up exceeding 100mb.

edit: actually, I'm looking into the assetbundles and they seem Good. For my music game, each track has a few background images and an mp3 file, so I'm thinking it would be extremely efficient to have a bundle per track that contains its images and sounds.

Yeah, asset bundles are very good, and I had intended to get around to figuring out how to use them for years before uh...having no choice because everything else was broken. Better late than never etc

Chainclaw
Feb 14, 2009

Thanks for all the info. I'm going to check out PixiJS next, and maybe three.js after that.

GameMaker we have a license to, I ended up not liking it for myself, but it does seem like a great tool for other people. I ended up wanting to get deep into code pretty quickly, and didn't see a good path in many cases.

There's nothing Python based that I can use to spit out a webgl / HTML5 project, is there?

xgalaxy
Jan 27, 2004
i write code

BabelFish posted:

I can't wait to try out these build time improvements, and hopefully Live Coding (I wonder how much they paid for the "everyone using UnrealEngine" license for Molecular Matters' Live++) scales to full size projects. It would save our studio literal man weeks.

Its pretty loving cheap actually. About $100/seat/yr

roomforthetuna
Mar 22, 2005

I don't need to know anything about virii! My CUSTOM PROGRAM keeps me protected! It's not like they'll try to come in through the Internet or something!

Chainclaw posted:

There's nothing Python based that I can use to spit out a webgl / HTML5 project, is there?
GodotScript is python-like, and Godot can target web.

..btt
Mar 26, 2008

Rocko Bonaparte posted:

My situation with using it as a scripting language is being able to pre-empt the scripts.

Is there some reason you can't just run it in its own thread? You might have to provide some thread-safe API calls for interactivity, but that seems an order of magnitude simpler than writing your own non-blocking interpreter.

leper khan
Dec 28, 2010
Honest to god thinks Half Life 2 is a bad game. But at least he likes Monster Hunter.

..btt posted:

Is there some reason you can't just run it in its own thread? You might have to provide some thread-safe API calls for interactivity, but that seems an order of magnitude simpler than writing your own non-blocking interpreter.

Their gimmick in the game threads is solving problems in the most convoluted way they can think of. Which is fine; it’s a hobby.

Joda
Apr 24, 2010

When I'm off, I just like to really let go and have fun, y'know?

Fun Shoe

roomforthetuna posted:

GodotScript is python-like, and Godot can target web.

Also, with wasm, anything that is implemented in C++ or C can target the web directly (including the Python runtime,) assuming the low-level assumptions/requirements/APIs the app needs can be fulfilled (e.g. No DX/GL4/Vulkan)

Joda fucked around with this message at 12:24 on Apr 3, 2019

..btt
Mar 26, 2008

leper khan posted:

Their gimmick in the game threads is solving problems in the most convoluted way they can think of. Which is fine; it’s a hobby.

Yeah, a perfectly valid reason, I agree.

Polo-Rican
Jul 4, 2004

emptyquote my posts or die

Chainclaw posted:

There's nothing Python based that I can use to spit out a webgl / HTML5 project, is there?

Ah, the Python's curse. First you learn Python; and then you are cursed to forever roam the internet asking "can I use python for this? Can I use python for this?" only to be rebuffed at every turn,

Rocko Bonaparte
Mar 12, 2002

Every day is Friday!

..btt posted:

Is there some reason you can't just run it in its own thread? You might have to provide some thread-safe API calls for interactivity, but that seems an order of magnitude simpler than writing your own non-blocking interpreter.

Trading one problem for another. I'd have to make sure each of the calls I'm making is properly synchronized, and I'd still probably end up having to implement something like futures under the hood to make it look fairly transparent. It also doesn't help me if I want to save the state of a script with the game save.

big scary monsters
Sep 2, 2011

-~Skullwave~-

Polo-Rican posted:

Ah, the Python's curse. First you learn Python; and then you are cursed to forever roam the internet asking "can I use python for this? Can I use python for this?" only to be rebuffed at every turn,

Well if you're happy with something a little convoluted, you can use Python as a scripting language in Godot through GDNative: https://github.com/touilleMan/godot-python

..btt
Mar 26, 2008
You'll still have potential synchronisation issues regardless of the method you use to provide asynchronicity. But don't let me stop you writing your interpreter if that's what you want to do!

Rocko Bonaparte
Mar 12, 2002

Every day is Friday!
Yes kids, don't do what I'm doing if you're top priority is to have your very own game in your very own hands... especially right away. But I have some other priorities such as staying sane at work--which entails somehow going crazy at home. Touching some of this stuff is partially how I'm trying to stay sharp. If my top priority here was the game, I would have caved in to some basic state machine and been done with it.

In this particular situation, I went all-in on the Python thing half because there's a team in my company working on Python acceleration stuff and I was thinking of inserting myself over there.

..btt posted:

You'll still have potential synchronisation issues regardless of the method you use to provide asynchronicity. But don't let me stop you writing your interpreter if that's what you want to do!

Yes I could have an issue with deadlocks regardless, but I would be more worried about accidentally modifying engine state across two threads and having God-knows-what erupt. I could try to make every command I expose basically synchronize on a queue ticked by the main engine thread or something to get around it, but I chose cooperative multithreading instead.

Nolgthorn
Jan 30, 2001

The pendulum of the mind alternates between sense and nonsense
Where is the best godot discussion happening? It seems their forums are down and have been for as long as I've been checking. I'm not a huge fan of reddit. What about gamedev forums, are there others?

Tendales
Mar 9, 2012

Chainclaw posted:

Is Phaser.io the go-to HTML5/Javascript engine? I'm looking for something that I can easily deploy to web to share prototypes. I've been linking it so far, but I wanted to see what else was available.

Well, it would be more ideal if there was an engine with both good web deployment and mobile deployment options, but right now it seems to be go Unity for mobile and something else for web.

Also, does anyone have any guides to hosting Phaser games? I tried shoving a bunch of files into an S3 bucket, but that didn't really work. Searching just gives me a bunch of results on some HTML5 game devleopment forums where people just say "If you search you'll find it, so go search for it"

If you're more comfortable with a C#-like language, Haxe is designed with cross-deployment in mind. With openFL, you can use most of the same development pipeline that used to get used for Flash games.

big scary monsters
Sep 2, 2011

-~Skullwave~-

Nolgthorn posted:

Where is the best godot discussion happening? It seems their forums are down and have been for as long as I've been checking. I'm not a huge fan of reddit. What about gamedev forums, are there others?

There's an official Discord, but tbh I've not found it that great. Other than that I'm not sure either, as you say the forums have been down for a while. Let us know if you find anything good!

xgalaxy
Jan 27, 2004
i write code

Tendales posted:

If you're more comfortable with a C#-like language, Haxe is designed with cross-deployment in mind. With openFL, you can use most of the same development pipeline that used to get used for Flash games.

Isn't Heaps.io and Hashlink the new hotness in Haxe-land?
EDIT: Missed the 'deploy to web part'

xgalaxy fucked around with this message at 00:33 on Apr 7, 2019

Veni Vidi Ameche!
Nov 2, 2017

by Fluffdaddy

Polo-Rican posted:

I built a game with Phaser to help an author promote his book (here), and it worked fine, but at the end of the day I regretted not simply going with Pixi instead.

Pixi is basically the full rendering engine that Phaser is built on... all Phaser does is take that and add a ton of "gamey" methods that make it slightly faster and easier to construct games. But Phaser also a bit heavyweight and limiting, because when you make a Phaser game you kind of need to use the Phaser methods. So basically, if you have experience with code, I'd highly recommend trying to work directly with Pixi before loading Phaser on top.

As for hosting, I just use Dreamhost and manually toss up an HTML file with the related game files.

Pacminotaur is such an obvious mashup in retrospect.

The March Hare
Oct 15, 2006

Je rêve d'un
Wayne's World 3
Buglord
Hello game thread. If I am a programmer but not a mobile or game programmer, is there an engine or framework or whatever that is reasonably good that will allow me to build a (2D) game for iOS and Android?

For whatever reason I trust the opinion of people on this forum more than I trust the 8,000 clickbait "well actually you should use this framework" articles out there.

roomforthetuna
Mar 22, 2005

I don't need to know anything about virii! My CUSTOM PROGRAM keeps me protected! It's not like they'll try to come in through the Internet or something!

The March Hare posted:

Hello game thread. If I am a programmer but not a mobile or game programmer, is there an engine or framework or whatever that is reasonably good that will allow me to build a (2D) game for iOS and Android?

For whatever reason I trust the opinion of people on this forum more than I trust the 8,000 clickbait "well actually you should use this framework" articles out there.
Godot and Unity can both work for that goal, Godot has a Python-like scripting language, Unity likes C#. They'll both build a game that eats battery while running.
There are HTML5 wrappers if your game is the sort of thing that can be done in HTML5, which opens up Javascript or Typescript options.
Flutter is an option for the UI side of things (which is the only part that really needs to be "for iOS and Android") that'll get you decent performance but it has a steep learning curve and you'd have to use Dart as your language (it's an okay language, but that probably makes it two learning curves). It's not especially geared towards games, but if your game is more UI-shaped, like a trading card game or something, it might be a better fit than Godot/Unity that are more geared to the game and less to the UI.

Which is to say "not enough information, what sort of a programmer are you and what sort of game do you have in mind?"

Mr Shiny Pants
Nov 12, 2012
Anyone seen those Unity Megacity demos? They are pretty rad: https://unity.com/megacity

The only problem I have with them is: it only took us a couple of months with two guys.... Yes and a company in Shanghai and another company.

Nolgthorn
Jan 30, 2001

The pendulum of the mind alternates between sense and nonsense
I'm still in love with godot for it's simplicity. In unity I felt like I was spending a lot of time figuring out how to do things and then deciding the best way to do it. In godot/gdscript I don't really have that problem because it feels intuitive. Like if there's a feature I want I tell it to do that.

I don't really know how to explain it.

I am definitely one of those people it "just clicks" with.

Nolgthorn
Jan 30, 2001

The pendulum of the mind alternates between sense and nonsense
Although I haven't quite deciphered not supporting circular dependencies, it seems so simple. But if I make a few scripts into resources and they use another resource or preload one or two things there ends up being a circular reference where I didn't expect it, and then to add to the confusion the game builds and runs anyway.

Lamont
Mar 31, 2007
Who knows what evil lurks in the hearts of men?
Hi all, I'm a self-taught beginner programmer (I have completed Harvard's CS50 Intro to CS course) looking to move up into learning some intermediate skills. I will never ever get a job in the dev industry, but I would like to make awesome stuff on the side, and would like to start getting into games.

My question is, what should I learn if I want a decent foundation in the essential skills? I know that learning some data structures and algorithms will be beneficial, but if I just want to make stuff, do I really need all the formal proofs and maths that goes into the 1300-page "Introduction to Algorithms" CLRS textbook?

I have a part-time job at the local university and have access to the CS departments syllabus and lecture notes, so that may give me an idea of where to start. If anyone who has a CS degree could tell me what courses they did that they've found useful for actually making stuff as opposed to being for high-level CS theorists who invent new algorithms and stuff, that would be useful. Cheers!

TooMuchAbstraction
Oct 14, 2012

I spent four years making
Waves of Steel
Hell yes I'm going to turn my avatar into an ad for it.
Fun Shoe
A good understanding of data structures so you can handle your game data in a way that's not a total clusterfuck. Basic graph theory is useful for relating data and for things like A* pathfinding. Trigonometry is useful if you ever get anywhere near physics (including e.g. if you want to calculate headings/trajectories/etc.). Matrix math is useful for understanding transformations and cameras.

I'd also throw in some runtime ("big O") analysis, just on the basis that it's surprisingly easy to make awful runtimes if you aren't paying attention and decide to e.g. read a 5MB file on every single frame, or try to relate every one of 10k objects to every other of those objects.

Polo-Rican
Jul 4, 2004

emptyquote my posts or die
it's kind of backwards to try to become an competent games programmer before making a sample game - like trying to memorize the concepts of music theory before learning a simple song on the piano. Part of the problem is that there's no singular, best way of programming games, because every project and every technology stack is different. By far the best way to learn this stuff is just to pick a framework and pump out some small (VERY SMALL!) projects.

There are some basic concepts that might be worth reading about in advance such as object pooling, garbage collection, and smart ways of storing references - but even those aren't really worth worrying about until you've gotten your feet wet.

Polo-Rican fucked around with this message at 16:10 on Apr 11, 2019

Surprise T Rex
Apr 9, 2008

Dinosaur Gum

Polo-Rican posted:

(VERY SMALL!) projects.

All good info in the last couple posts, but this is honestly the most important bit.

Yes, pong is boring, but try to make something on that level, to at least familiarise yourself with the tools and concepts you're learning, in a practical way.

It's basically the equivalent of life drawing for games programming.

The March Hare
Oct 15, 2006

Je rêve d'un
Wayne's World 3
Buglord

Thanks for this post. My day job is just software dev, "web" for some reasonably complex projects that involve much more than what people think of when they think web and some hardware stuff. I write mostly Python at my day job but I've also written some C, Rust, Go, list goes on.

I ended up giving Godot a shot and it has been pretty smooth sailing so far, super intuitive stuff and the docs seem like they were at least partially made for programmers, which is nice. Simple enough to look up what methods I have available on things and such.

To contribute to the above discussion: small is absolutely your friend. I've limited the scope of my first project to a single player platformer with no enemies just sort of exploration and some menus and dialogue/music with point and click style stuff.

It's helpful to do this kind of thing (not just w/ game programming) because, on top of everything you already need to learn just to get going, there's going to be so much other complexity that you won't anticipate in the way of "why won't this compile?" or "where did all of my images go???" or whatever. So keeping your friction relatively low in the face of that can help you to not peter out.

TooMuchAbstraction
Oct 14, 2012

I spent four years making
Waves of Steel
Hell yes I'm going to turn my avatar into an ad for it.
Fun Shoe
It's absolutely helpful to just dive in and start making things. You learn way more when you're working on a project that you care about than when you're just doing coursework. That said, it's also easy to get stuck in your personal projects because you don't know how to solve a problem, because of lack of training in standard software development techniques. Software being as flexible as it is, you'll probably be able to figure something out, but it'll take a lot more work and frustration, and not work as well, as what you could easily produce if you had more background.

Basically you have to figure out what your tolerance level is for studying vs. doing. And if you do get stuck with something, ask questions. Odds are good someone will say "oh yeah, you just need to apply This Algorithm You've Never Heard Of", and once you know the name you can go read how it works and it'll make your life way easier.

Polio Vax Scene
Apr 5, 2009



Surprise T Rex posted:

All good info in the last couple posts, but this is honestly the most important bit.

Yes, pong is boring, but try to make something on that level, to at least familiarise yourself with the tools and concepts you're learning, in a practical way.

It's basically the equivalent of life drawing for games programming.

Not only this but also practice the 'beginning' and 'end' of your game dev as well, making intro/title screens, UI, polishing and committing to a final product. Otherwise you'll be stuck in the middle forever.

Rocko Bonaparte
Mar 12, 2002

Every day is Friday!

Lamont posted:

My question is, what should I learn if I want a decent foundation in the essential skills? I know that learning some data structures and algorithms will be beneficial, but if I just want to make stuff, do I really need all the formal proofs and maths that goes into the 1300-page "Introduction to Algorithms" CLRS textbook?
People have said plenty of things but I wanted to add to that a little bit of object-oriented stuff or design patterns. You don't have to become a hippy about them, but knowing what some of that is will make it less scary to use somebody else's framework. It would give you a certain sense of street smarts when navigating, say, Unity and you can more easily BS your way around it ("They're using these words here so that implies certain things with certain names... yeap there they are.")

Nolgthorn
Jan 30, 2001

The pendulum of the mind alternates between sense and nonsense
Design patterns will save you so much time you will not believe it

Kibbles n Shits
Apr 8, 2006

burgerpug.png


Fun Shoe
Can anyone recommend what data structure or techniques I should be researching to make a convincing galactic map where the stars are connected via warp lanes in a logical manner, as seen in Stellaris or Space Empires IV for example. I've been experimenting with connecting them based on distance but not only is it god awfully slow, the results usually look like a cluster gently caress



Actually Stellaris might be a bad example because I don't necessarily want a uniform distribution of lanes. It would be desirable to have clusters of distant stars that are approachable by fewer lanes, for example.

Kibbles n Shits fucked around with this message at 20:36 on Apr 14, 2019

leper khan
Dec 28, 2010
Honest to god thinks Half Life 2 is a bad game. But at least he likes Monster Hunter.

Kibbles n Shits posted:

Can anyone recommend what data structure or techniques I should be researching to make a convincing galactic map where the stars are connected via warp lanes in a logical manner, as seen in Stellaris or Space Empires IV for example. I've been experimenting with connecting them based on distance but not only is it god awfully slow, the results usually look like a cluster gently caress



Actually Stellaris might be a bad example because I don't necessarily want a uniform distribution of lanes. It would be desirable to have clusters of distant stars that are approachable by fewer lanes, for example.

Voronoi diagrams?

HappyHippo
Nov 19, 2003
Do you have an Air Miles Card?
I think what you have there actually looks pretty cool

Tann
Apr 1, 2009

Put some restrictions on the generation of it. Don't make so many in a tight area, keep removing nodes until there are no path overlap.

Adbot
ADBOT LOVES YOU

Kibbles n Shits
Apr 8, 2006

burgerpug.png


Fun Shoe

HappyHippo posted:

I think what you have there actually looks pretty cool

I've been tweaking the parameters, I think if I can just figure out a cheap way to remove the intersecting lanes, it will be exactly what I want.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply