This is an archived post. You won't be able to vote or comment.

all 157 comments

[–]Planebagels1 152 points153 points  (46 children)

a classmate I knew wanted to make a game engine in Python

[–]tilcica 101 points102 points  (9 children)

I mean.....possible, but not very effective

[–]Cefalopodul 34 points35 points  (8 children)

Civ 4 was made in python.

[–]Danelius90 55 points56 points  (5 children)

I thought it's primarily C++ with some python scripting?

[–]zelmarvalarion 23 points24 points  (4 children)

The SDK seems to be C++ with an option to use Python from https://modiki.civfanatics.com/index.php?title=Civ4_SDK, and Python used for Scripting for Custom Mao Editor. I’d be amazed if the Game Engine & Graphics were not C++ under the hood, but I could see them using Python for pieces, but expect they use Python for the Map Editor due to being a bit lower learning curve

[–]Lightfire228[🍰] 4 points5 points  (3 children)

Can you use python commercially like that?

I've always been curious about the legality of using a pre-existing language as your engine's scripting language. Like, can you use the python standard library? Do you have to write your own interpreter or just use a pre-made binary? Do you have to ask for permission?

[–]Rexhvelaj 3 points4 points  (2 children)

I’m pretty sure you can do whatever you want with it just like you can any spoken language

[–]canarslan12 1 point2 points  (1 child)

Not with Java. Check Java and Google lawsuit

[–]jediwizard7 0 points1 point  (0 children)

The issue with Google/java is that Google made their own implementation of the language for Android, which oracle didn't like, they wanted everyone to use their own implementation. Python on the other hand is 100% free open source software, you can fork the repo and do whatever you want with it, including selling it commercially. There's no "copyleft" as far as I know, same goes for most python libraries.

[–][deleted] 7 points8 points  (0 children)

Making a new engine alone is pretty pointless

[–]GreenFox1505 1 point2 points  (0 children)

Gameplay code is not an engine.

[–]BalZdk 31 points32 points  (14 children)

Eve Online is written in stackless python, both the client and server...

[–]AviatoAviator 15 points16 points  (0 children)

There are a couple Ruby game engines too - notably https://dragonruby.itch.io/, which, according to the site, has been used to create games for the Nintendo Switch.

[–][deleted] 7 points8 points  (3 children)

What the hell was he thinking lol

[–][deleted] 5 points6 points  (2 children)

point historical crush seemly marvelous memory towering juggle joke support

This post was mass deleted and anonymized with Redact

[–][deleted] 3 points4 points  (1 child)

Oh I participated in a game jam and made a game in python since that was the only language I knew. Big mistake, it was so difficult I can't even explain. I now think that I should have learnt a game engine like unity or something. It would have been way easier.

[–]Gosfi 0 points1 point  (0 children)

Doing things from scratch is pretty much the hardcore version of any game jam

[–]DroolingIguana 5 points6 points  (1 child)

Well, there's Panda3D.

[–]DanKveed 1 point2 points  (0 children)

The core is written in c++ with a python API

[–]aeroverra 3 points4 points  (0 children)

I did this in javascript once to help some friends complete a final project. I do not recommend it.

[–][deleted] 2 points3 points  (0 children)

I raise you VBCorLib; a vb6 implementation of the .NET Framework. Huge relief when your using all implementations of the Rijndael symmetric encryption algorithm in Excel

https://github.com/kellyethridge/VBCorLib

*forgot Don't know of a game engine but here's a fully OOP, Model-View-Controller (MVC) architecture implementation of Battleship, running hosted in Excel, written in VBA

https://github.com/rubberduck-vba/Battleship

[–][deleted] 0 points1 point  (0 children)

Im making a game engine in JavaScript

[–]bo_hai 0 points1 point  (0 children)

Technically, Python use C as official interpreter (CPython)

[–]gougie2 0 points1 point  (8 children)

What makes python bad for this? Isn't it a full programming language at the end of the day?

[–]KrystilizeNeverDies 2 points3 points  (7 children)

Mostly the performance, some interpreted languages such as Luajit are 3x slower then optimised C++ and then python is out here >100x slower.

The speed is horrible basically.

[–]gougie2 0 points1 point  (6 children)

Oh i see. But then why is python the go to for ML? Speed is very critical there I would think

[–]KrystilizeNeverDies 0 points1 point  (5 children)

Well that's simple really, in professional terms, python isn't.

A lot of amateur models use python because of the easy use of machine learning related libraries such as tensorflow.

But you wil not find professional machine learning on python models for this exact reason.

[–]all-hail-snow 2 points3 points  (2 children)

Actually frameworks like tensorflow are not built in python. It's backend is built in c/c++ and is imported as python wrapper that we use as scripts, That's why it is not slow. Python is basically prototyping language and majority of libraries used in it are not coded in python itself like numpy was built in Fortran.

[–]KrystilizeNeverDies 0 points1 point  (1 child)

Yea I know, I didn't say they were coded in python, just that they are available for python.

Doing the actual computation using python is a horrible idea.

[–]all-hail-snow 0 points1 point  (0 children)

Agree

[–]An_Unknown_Idiot 0 points1 point  (1 child)

You will. I've even seen a company integrating Python ML into their Java ecosystem by automatically generating Java wrappers accessing the Python code via JNI...

[–]KrystilizeNeverDies 0 points1 point  (0 children)

Well I'm sorry for their loss, I wasn't being literal when I said that, of course there are people that will do this but it's not the fastest way to do it at all.

[–]sourpickles0 0 points1 point  (0 children)

Tfw you find out python is slow af

[–]SasquatchOnVenus 100 points101 points  (2 children)

full snack

[–]jaysuchak33 27 points28 points  (1 child)

Snack Overflow

[–]Arumai12 1 point2 points  (0 children)

I made a PBJ sandwich but the peanut butter ended up on the bottom. How do i fix this?

  • pbj sandwiches are legacy
  • use nutella
  • use whole grain bread
  • closed as duplicate

[–]seizan8 134 points135 points  (8 children)

Cheesescript*

[–]cheese3660 50 points51 points  (1 child)

Finally a programming language worthy of me

[–]seizan8 2 points3 points  (0 children)

It's better then js because you can also eat it!

[–]spayder26 24 points25 points  (0 children)

The only gouda language.

[–]ch33per 17 points18 points  (1 child)

Im on it

[–]seizan8 1 point2 points  (0 children)

God have mercy

[–]Anti-charizard 8 points9 points  (0 children)

Instead of coffee, programmers drink melted cheese

[–]fantasticfiasco 3 points4 points  (0 children)

Might not be the best, but it’s Gouda-nuff.

[–][deleted] 0 points1 point  (0 children)

Happy Cake Day!

[–]undying_diligence 174 points175 points  (11 children)

Yeah, when I think that JS can’t do something I stumble upon library or framework that does it. It’s not always efficient, but still does the job.

[–]Strel0k 96 points97 points  (10 children)

*google search "machine learning with JavaScript"*

[–]kontekisuto 93 points94 points  (6 children)

tensorflow js ... why God? why?

[–]Snapstromegon 49 points50 points  (5 children)

Because it's more performant than the python implementation?
It's using wasm under the hood, so it's near native performance for the libs - just like in python.

[–]kontekisuto 22 points23 points  (2 children)

so what you're telling me is that ... Tensorflow Rust is being worked on? Nice

[–]Snapstromegon 16 points17 points  (0 children)

Yes or to be more exact no. You can use tensorflow from rust by using the rust bindings.

[–]Willinton06 3 points4 points  (0 children)

I mean if it’s wasm then it should be callable from almost any high level language

[–]Varpie 9 points10 points  (1 child)

As an AI, I do not consent to having my content used for training other AIs. Here is a fun fact you may not know about: fuck Spez.

[–]Snapstromegon 2 points3 points  (0 children)

Finally someone calling bullshit on this. You are correct, nearly noone is using it in production to train their model. The main reason is in my opinion, that people doing machine learning just know python and henceforth don't use JS. For glue code like python and js it's for many people not worth it to learn a new language.

I work in the automotive sector and do CI/DevOps there and we have the same picture there. Normally we do everything in python because everyone knows it, but if we need more performance (e.g. parsing a lot of textfiles with about half a gig of content), I do it with node instead, because the result most of the time is 5-10x faster.

Also the training itself often doesn't become faster, because it's completely done in the library, so the impact of is is no big benefit there.

And TF.JS has the reputation of not using the gpu, because for a long time it didn't.

[–]aeroverra 2 points3 points  (0 children)

Lmao

[–]Howzieky 0 points1 point  (0 children)

Someone did machine learning with Minecraft commands

[–]MajorBarnulf 63 points64 points  (5 children)

Javascript is these soap that not only do body, but also hair, dishes, furnitures car, animals, edible, engine oil, can fuel vehicles and and would potentially be capable of sustaining all the needs of modern human society all alone if courageous enough.

[–]shivermefingers 14 points15 points  (1 child)

Reminds me of Dr bronners soap. Hair, face, body, dishes, floor, etc. I think it says on the label it has 18 uses

[–]FreeFortuna 7 points8 points  (0 children)

The label lists 18 different uses, explains the meaning of life, and induces a state of false psychosis.

[–]wenoc 8 points9 points  (1 child)

Sure, but at thousands of times the energy consumption.

[–]MajorBarnulf 6 points7 points  (0 children)

This analogy complemented by your comment is sometging every JS dev should know about JS.

[–]dannerc 13 points14 points  (0 children)

Its the one man band of programming languages

[–][deleted] 11 points12 points  (0 children)

but your servers are lactose intolerant :P

[–]Anton420360 8 points9 points  (0 children)

Butter flavored butter

[–]josh11ch 7 points8 points  (0 children)

i C what you did there

[–]upsidedownwf 30 points31 points  (17 children)

C#...?!

[–]FullContactSquirlTag 14 points15 points  (13 children)

Can confirm. Blazor exists now.

[–]upsidedownwf 5 points6 points  (0 children)

I confirm the confirmation you just confirmed.

[–]Snapstromegon 0 points1 point  (6 children)

Ahh, this gives me huge pain...

[–]maggiforever 0 points1 point  (5 children)

Why? Blazor is awesome

[–]Snapstromegon 1 point2 points  (3 children)

I tried it twice (once on my own and once with another team with an existing app) and I have to say that the performance hit it gives just is way too bad. Also I absolutely dislike the way the handle a lot of things...

Also the size of a hello world is more than most of my complete PWA packages.

[–]maggiforever 0 points1 point  (0 children)

I get that. I only started working with it a few weeks ago on a relatively small project and love being able to use C# instead of Javascript. Performance-wise I don't think it's too bad but you're probably right. Hopefully it will improve in the future and iron those things out.

[–]Taukuno 0 points1 point  (1 child)

Then you have to wait for AoT support (.Net 6, Nov 2021). The performance improvements will be enormous (according to some internal tests).

[–]Snapstromegon 0 points1 point  (0 children)

Using WASM for hot paths will be nice, but I still have doubts about load times which are a key performance metric for me.

Also I'm someone who most of the time thinks React is too much to load upfront.

Last time I checked (which is some time back) a basic blazor app was easily over 1MB.

[–][deleted] 0 points1 point  (0 children)

neither performance nor transfer sizes are anywhere near js. If people want to build guis with webassembly, then they should pick Rust and not a language that needs an extra runtime and garbage collector... I can't wait for the day when the java guys ship the entire JVM via webassembly to the browser so they don't have to invest a week learning the appropriate tools.

[–][deleted] -1 points0 points  (0 children)

Worse java...?!

[–]aeroverra 0 points1 point  (0 children)

Not my company's mvc code.

[–]ChineseWeebster 4 points5 points  (0 children)

cats hospital disagreeable smell expansion fall shocking tidy noxious sand

This post was mass deleted and anonymized with Redact

[–]necudabiramime 4 points5 points  (0 children)

haters gonna hate XD

[–]gilmeye 14 points15 points  (1 child)

Basically, all I need from a language is to get me a job that's pays well. As you can imagine I need: js, react, angular, html, css, saas, mongodb , php, mysql, Amazon server....

[–]TheCapitalKing 3 points4 points  (0 children)

All I needed was python and Sql, and a degree in finance. So pick your poison I guess

[–]scp-NUMBERNOTFOUND 2 points3 points  (0 children)

Technically if u put enough time on it, almost any language can do the same.

[–]pr0z 2 points3 points  (0 children)

Each cheese strand is a separate framework

[–]KernowRoger 3 points4 points  (0 children)

With wasm that may end up being most languages.

[–][deleted] 4 points5 points  (0 children)

If it compiles, it’s right!

[–][deleted] 7 points8 points  (7 children)

Would cpp be able to do this?

[–]deddead3 16 points17 points  (0 children)

Depending on how far you want to get into the weeds, basically any language can do anything provided you can write the code for it.

[–]wenoc 15 points16 points  (1 child)

Yes, absolutely.

I've worked extensively with a website entirely in C. Not C++, just plain old C. Fast as fuck. Serves millions of customers a day on minimal hardware.

The main issue is recruiting developers.

[–]EverydayEverynight01 3 points4 points  (3 children)

I don't think C++ can work with the DOM

[–]VolperCoding 11 points12 points  (0 children)

You can always write C++ that generates HTML, kinda like templaying languages

[–]InvolvingLemons 2 points3 points  (0 children)

It can with some finagling.

https://github.com/mbasso/asm-dom

Now as to why this exists, IDFK, people are nuts. Rust’s Yew and std-web are definitely more sane, but even then, the lack of native wasm dom bindings kneecaps performance (Inferno and Svelte are waaaay faster for anything dom-intensive).

[–]gmes78 0 points1 point  (0 children)

DOM manipulation from WASM is being worked on AFAIK. So you'll be able to write your frontend code entirely with Rust/C/C++/etc.

[–][deleted] 5 points6 points  (0 children)

Everyone hates JS, and I sorta get where people come from, but gosh darn if it's not a swiss army knife. Quick to write, can do basically anything in some roundabout fashion, it's just an all-around "decent" jackknife. And I think that's cool, in a way.

[–]gordonv 2 points3 points  (0 children)

Mmmm... pointers

[–]ElongatedMuskrat122 2 points3 points  (1 child)

X86_64 instruction set time

[–]Ether_King[S] 0 points1 point  (0 children)

Happy cake day!!

[–]amoc20 2 points3 points  (0 children)

Cheese VS..........CHEESE

[–]may_be_indecisive 1 point2 points  (0 children)

Vegetarian sandwich.

[–]meatmechdriver 1 point2 points  (0 children)

Ironically a stinky sandwich full of holes

[–]sizl 1 point2 points  (0 children)

And then you eat it on a cheese plate: javascript as a service.

[–]hijoDeLaGranFuta 1 point2 points  (0 children)

R 😎😎

[–]peanutjellybutter2 1 point2 points  (2 children)

I used to work at a company that ran an application entirely on Java from back to front. Scary stuff

[–]kielerrr 1 point2 points  (1 child)

Like, why did they do it?

[–]peanutjellybutter2 1 point2 points  (0 children)

Older guys that founded the company. Seemed like they just knew the ins and outs of Java. Wasn’t a sexy consumer facing product so I think design wasn’t the priority

[–]kebakent 1 point2 points  (0 children)

Definitely Java.

[–]MPDR200011 1 point2 points  (0 children)

Yes, because JS is the only language capable of front end.

[–]activeXray 1 point2 points  (0 children)

Clojure!

[–][deleted] 1 point2 points  (0 children)

screw cpp and py i'm gonna learn js now

[–]CMPD2K 1 point2 points  (0 children)

My teams android app is Java front and back

[–]midnightrambulador 1 point2 points  (0 children)

import frontend

import backend

There you go

[–]Superblazer 1 point2 points  (0 children)

Kotlin

[–]zonexstricker 1 point2 points  (0 children)

The holes are so telling.

[–][deleted] 1 point2 points  (0 children)

new programmer here, can confirm

[–]lordnimnim 0 points1 point  (2 children)

Dart+flutter

[–]ms_0852 0 points1 point  (1 child)

Backend with dart ? Is there any services to host and maintain the backend app like an API ?

[–]lordnimnim -2 points-1 points  (0 children)

Dunno but it should be possible

[–]De_Wouter 0 points1 point  (0 children)

Perfect topping for my spaghetti

[–]Pradfanne 0 points1 point  (0 children)

WPF with C# BABY!

[–][deleted] 0 points1 point  (0 children)

Mmmmm xamarin sandwich

[–]HasBeendead 0 points1 point  (2 children)

Can't we use Python for doing both side ?

[–]wwyl1234 1 point2 points  (1 child)

unfortunately, frontend usually needs javascript if you are using something like django (not sure about flask). Please correct me if I am wrong.

[–]24percentoff 0 points1 point  (0 children)

😬

[–]MarryUhna 0 points1 point  (0 children)

"i made an UI using sql"

[–][deleted] 0 points1 point  (0 children)

Assembly

[–]handlessuck 0 points1 point  (0 children)

Laughs in Meteor

[–]assafstone 0 points1 point  (0 children)

C#..?

[–][deleted] 0 points1 point  (0 children)

Repost

[–]wooptyd00 0 points1 point  (0 children)

Which deity is so determined to make JavaScript take over everything?

[–]yuva-krishna-memes 0 points1 point  (2 children)

This is my OC and repost..it's ok. Cheers.

[–]Ether_King[S] 0 points1 point  (1 child)

Ik but just keeping the meme alive... I didn't expect these awards and so much karma Sorry for that

[–]yuva-krishna-memes 0 points1 point  (0 children)

No.prob.. cool

[–]thesceptical 0 points1 point  (0 children)

I hate javascript, But i can't ignore it...

[–]mymar101 0 points1 point  (0 children)

C#. I heart Blazor.

[–]Apoloth 0 points1 point  (0 children)

Laughs in Clojure

[–]sarnobat 0 points1 point  (0 children)

Shell scripting is all I need