Best language to settle with

Started by EdzUp, August 22, 2021, 15:35:02

Previous topic - Next topic

Kryzon

On desktop platforms, as far as I know, LuaJIT compiles down to machine code (so truly a binary executable, like C).

Edit: hm, but it's not all of the code. Some parts might remain interpreted if they do some specific things that I don't remember.

Pfaber11

Lua does look pretty good and with jit is quite fast . Had a look at it myself , failed to get the jit part working at the moment .
HP 15s i3 1.2 upto 3.4 ghz 128 gb ssd 16 gb ram 15.6 inch screen. Windows 11 home edition .  2Tb external hard drive dedicated to Linux Mint .
  PureBasic 6 and AppGameKit studio
ASUS Vivo book 15 16gb ram 256gb storage  cpu upto 4.1 ghz

Kryzon

#32
There's some convenient binaries over at the LuaPower project: https://github.com/luapower/luajit/tree/master/bin 
But if you use a game engine like Love2D, LuaJIT comes embedded in the engine runtime.

Edit: I use the Windows binary from LuaPower as a simple shell, to try on some Lua formulas and one-liners.

Pfaber11

#33
I ended up going with zerobrane which uses Luajit by default as it's internal engine. I noticed lua works with Raylib as well .
Lua may end up as my goto language . If and when I get to the same skill level as I'm at with AGK I'll make an evaluation , early days yet but it does look promising . Good day
HP 15s i3 1.2 upto 3.4 ghz 128 gb ssd 16 gb ram 15.6 inch screen. Windows 11 home edition .  2Tb external hard drive dedicated to Linux Mint .
  PureBasic 6 and AppGameKit studio
ASUS Vivo book 15 16gb ram 256gb storage  cpu upto 4.1 ghz

MikeHart

QuoteI ended up going with zerobrane which uses Luajit by default as it's internal engine.

Again, something using LuaJit is just for its own workflow/engine.

ZeroBane (Editor) uses LuaJit for its own plugins/functionality. If you code with ZeroBane for some engine  (raylib, Löve, Defold, Gideros Mobile, etc. ) that doesn't mean that this engine uses LuaJit automatically.

Kryzon

#35
Quote from: MikeHart on September 05, 2021, 12:45:30
Defold, Gideros Mobile
Wow, didn't know of those ones. Thanks!

Edit: looking at some itch.io games, Defold is so lightweight, damn.

Pfaber11

#36
I've just spent the last 2 days trying how to get lua to make an exe which I have had a bit of success with . the problem is it will only produce one file at a time which really isn't enough . still at least i have an idea of how it's done now . Tried loads of IDE's and text editors and the only one I like is zerobrane . I did take another look at python too and really can't get on with it . Got to sort the exe thing out though I really felt like ripping my hair out but at least I found something that works although not ideal. As far as it goes it really is pretty good to use . If anybody has a solution to the one file thing please let me know .
well thats it after spending about 3 days trying to produce a working exe on Lua I'm chucking in the towel. It's back to AGK full time unless I find a language that is procedural and I can work with and is semi professional and is a good allrounder.
The syntax of Lua is very nice but I find the problem of producing a reliable exe a bit of a swine , it's probably easy and I'm just not getting it but I ran across a few posts of people having difficulties in that area too. Anyway it's back to the serious business of writing games.
Have a nice evening .
HP 15s i3 1.2 upto 3.4 ghz 128 gb ssd 16 gb ram 15.6 inch screen. Windows 11 home edition .  2Tb external hard drive dedicated to Linux Mint .
  PureBasic 6 and AppGameKit studio
ASUS Vivo book 15 16gb ram 256gb storage  cpu upto 4.1 ghz

Kryzon

@Pfaber11 If you don't have a toolkit that handles deployment for you (eg. Defold), then you'll have to do it manually. According to the LuaJIT documentation, you're supposed to:
A) Compile your .lua scripts down to native bytecode/object files.
B) Have a C program that can invoke the Lua interpreter.
B) Link your C program together with the object files from step A.

A few resources on the topic:
- https://williamaadams.wordpress.com/2013/03/13/is-that-cool-or-what-embedding-luajit-bytecode/
- https://stackoverflow.com/questions/19416981/running-luajit-object-file-from-c
- https://github.com/jirutka/luapak

Step A could benefit from some automation, I think that's what the Makefile recipe system is for: set it up once and let it handle building your program automatically. This tool seems to be made for this: https://github.com/jirutka/luapak

Baggey

BlitzmaxNG Is great! Ive been Learning to program with it! I Started with Playbasic and have been looking at trying out Freebasic and Sokol/Wonkey as well.  :)

Kind Regards Baggey
Running a PC that just Aint fast enough!? i7 Quad core 16GB ram 1TB SSD and NVIDIA Quadro K620 . DID Technology stop! Or have we been assimulated!

ZX Spectrum 48k, C64, ORIC Atmos 48K, Enterprise 128K, The SID chip. Im Misunderstood!

Pfaber11

#39
I've spent the last 10 days trying to do the Lua thing again  and this time I did get further than last time . I wanted to use it with raylib but could not get it to work . My code was running ok until I try using require raylib  and then it all went to crap . So I'm back to the tried and tested AGK Studio. I'm half way through a project right now and when I'm done I might just take a look at PureBasic again . Ogre is very nice to work with and similar to AGK when using 3D . The only thing I don't care for is DX9.0c as it is no longer included with windows 11 however when they get around to releasing PureBasic 6 I am going buy it . Happy Easter.

The only thing I don't care for with AGK is it's a bit slow don't get me wrong I really like it and with a bit of optimizing I do hit the 60 frames per second from one end of my map to the other so I have to say that speed hasn't been an issue yet but my projects are getting more complicated as I go along . Sorry for the long message .
HP 15s i3 1.2 upto 3.4 ghz 128 gb ssd 16 gb ram 15.6 inch screen. Windows 11 home edition .  2Tb external hard drive dedicated to Linux Mint .
  PureBasic 6 and AppGameKit studio
ASUS Vivo book 15 16gb ram 256gb storage  cpu upto 4.1 ghz

Shardik

#40
Quote from: Pfaber11 on April 18, 2022, 17:29:20
The only thing I don't care for is DX9.0c as it is no longer included with windows 11 however when they get around to releasing PureBasic 6 I am going buy it .

As far as I know you had already bought PureBasic before starting with AGK. Since PureBasic has unlimited updates you may load every new PureBasic version (and even beta versions):
Quote from: https://www.purebasic.com/pricing.phpThe updates are unlimited, unlike most other software out there. That means when you buy PureBasic you will get all future updates for free, on this web site. Better still, you get the four versions of PureBasic (Amiga, Linux, Windows and OS X) for the same price !

So you may just download the current PureBasic 6.00 Beta 6 for Linux (x86 and x64), MacOS (x64 or M1 arm64), Raspberry Pi (arm32 and arm64) or Windows (x86 and x64) and try it out. Click onto "Login" on the top right of the download site and after successful login you will be able to load the current LTS (Long Term Support) versions and the current beta versions. You are even able to load all older PureBasic versions ever published by clicking onto the "museum" link.

Pfaber11

No just used the free copy but am going to get it very soon . could you please tell me is it still using the old ogre DX9.0c or have they upgraded it . I think these guys have got the right idea by supporting their basic for all this time as some bring out a nearly the same thing and charge again.

HP 15s i3 1.2 upto 3.4 ghz 128 gb ssd 16 gb ram 15.6 inch screen. Windows 11 home edition .  2Tb external hard drive dedicated to Linux Mint .
  PureBasic 6 and AppGameKit studio
ASUS Vivo book 15 16gb ram 256gb storage  cpu upto 4.1 ghz

Coder Apprentice

Quote from: Pfaber11 on April 19, 2022, 21:03:26
No just used the free copy but am going to get it very soon . could you please tell me is it still using the old ogre DX9.0c or have they upgraded it . I think these guys have got the right idea by supporting their basic for all this time as some bring out a nearly the same thing and charge again.

They charge you once! But you know that right? How many years this has been going on with you? Fretting about which language to use, worried about people won't think you're a real programmer since AppGameKit sounds like a toy, suggesting to The Game Creators to use JIT instead of byte code interpreter meanwhile you have a very limited understanding about these things. You need Vulcan and Metal...you have all these demands while you don't have a strong basic concept about general hardware requirements for certain look and feel of a game. Look around and study what visuals games deliver with certain hardware requirement and try to make games that are in sync with that. Just check AppGameKit's showcase page to see what others making with the same tool. And if something doesn't work the way you think it should, first assume it's your fault, and try to find the cause instead of running to the forums open a new topic about a bug...   

When it comes to what to use I suggest one thing. Choose one tool and learn it properly and learn to think efficiently. So your fairly simple games won't end up being ten thousand lines of code while they should be below a thousand, and they won't be slow like they are now.


Pfaber11

Well Kris the way I see it is this , there are plenty on here who try out new languages because they like to try them out it's fun . And yes I am still searching for the holy grail  . Maybe I have found it .
HP 15s i3 1.2 upto 3.4 ghz 128 gb ssd 16 gb ram 15.6 inch screen. Windows 11 home edition .  2Tb external hard drive dedicated to Linux Mint .
  PureBasic 6 and AppGameKit studio
ASUS Vivo book 15 16gb ram 256gb storage  cpu upto 4.1 ghz

Pfaber11

Yes Kris I think that AGK could be extended to use a jit compiler why not .and with not too much effort could be become excellent for games programming and also excellent for general purpose programming . Could be in the pipeline. I doubt it but you never know. 
HP 15s i3 1.2 upto 3.4 ghz 128 gb ssd 16 gb ram 15.6 inch screen. Windows 11 home edition .  2Tb external hard drive dedicated to Linux Mint .
  PureBasic 6 and AppGameKit studio
ASUS Vivo book 15 16gb ram 256gb storage  cpu upto 4.1 ghz