video game programming languages

Started by zelda64bit, February 03, 2023, 20:34:03

Previous topic - Next topic

Amon

Quote from: Steve Elliott on February 04, 2023, 21:04:43
Quote
Currently blitzmax is free, if I remember correctly you were designing a language with "c" and "c" is free.

Well that wasn't always the case for BlitzMax now was it?! With attitudes like I would love a game programming language, to add features I want - but it must be free. You must work hard and do that for me for no money. In what other industry would that be acceptable?!

Do you even know how much work it is for a person to design a new computer language from scratch and write the Vulkan routines to gift you on a plate the built-in graphics, sound and input? No. It's not just about designing a really nice simple syntax that you will not get with C++ and you certainly won't get bloody Vulkan routines that run on Windows, Linux and mac built-in. C is just logic, and with some security pitfalls that must be addressed.

It's this kind of attitude that makes me think I'm wasting my time with my computer language. I think I might just go to the Spectrum Next and Z80 Assembly (initially at first) so people like you might actually give me some credit and not kinda stealing anything from C.

What is this?

round157

#16
QuoteI would like to know what languages oriented to video game programming there are currently or are being designed and that are free. Something like bliztmax, coolbasic etc..

Dark Basic Pro

angros47

#17
There are no "languages" oriented to videogames. For example, Blitz3D was oriented to 3d games, BlitzPlus was oriented to GUI applications, but actually they were the same language, they were just linked to different libraries. Most programming languages are generic purpose, and the game-oriented stuff is inside the libraries (and many libraries are designed to work with many languages)

Also, different games require different tools: a card game would likely require a different library than a racing game, for example. If you are not sure about what kind of game you will be make, there is no way to recommend a language, or a library. A game can be made even in pure HTML, with no JavaScript at all (if you want to make a Choose Your Own Adventure game, all you need are hyperlinks)


lucidapogee

Quote from: angros47 on February 05, 2023, 17:30:11
There are no "languages" oriented to videogames. For example, Blitz3D was oriented to 3d games, BlitzPlus was oriented to GUI applications, but actually they were the same language, they were just linked to different language. Most programming languages are generic purpose, and the game-oriented stuff is inside the libraries (and many libraries are designed to work with many languages)

Also, different games require different tools: a card game would likely require a different library than a racing game, for example. If you are not sure about what kind of game you will be make, there is no way to recommend a language, or a library. A game can be made even in pure HTML, with no JavaScript at all (if you want to make a Choose Your Own Adventure game, all you need are hyperlinks)

Anything is a game programming language if you have a good enough imagination!
People today are spoiled with the expectation that everything should come easy.

Although it is nice to have language such as Blitz Basic which turn libraries into built in commands specifically useful for games. While BB is great for all kinds of applications, it is best for anything that requires DirectX. It's not the best option for anything that doesn't need double buffering. Other compilers are capable of producing much smaller exes.

For example. A game in BB comes with Directx built in. My oldest BB compiler puts out about 600kb exes at smallest. By comparison, Emergence Basic compiles to less than 50kb and around 200kb with DirectX.

Check out this game written in batch that I found on Rosetta code:

:: 2048 Game Task from RosettaCode
:: Batch File Implementation v2.0.1

@echo off
setlocal enabledelayedexpansion

rem initialization
:begin_game
set "size=4"   %== board size ==%
set "score=0"   %== current score ==%
set "won=0"   %== boolean for winning ==%
set "target=2048"   %== as the game title says ==%
for /l %%R in (1,1,%size%) do for /l %%C in (1,1,%size%) do set "X_%%R_%%C=0"

rem add two numbers in the board
call :addtile
call :addtile

rem main game loop
:main_loop
call :display
echo(
echo(Keys: WASD (Slide Movement), N (New game), P (Exit)

rem get keypress trick
set "key="
for /f "delims=" %%? in ('xcopy /w "%~f0" "%~f0" 2^>nul') do if not defined key set "key=%%?"
set "key=%key:~-1%"

set "changed=0"   %== boolean for changed board ==%
set "valid_key=0"   %== boolean for pressing WASD ==%
rem process keypress
if /i "!key!" equ "W" (set "valid_key=1" & call :slide "C" "1,1,%size%" "X")
if /i "!key!" equ "A" (set "valid_key=1" & call :slide "R" "1,1,%size%" "X")
if /i "!key!" equ "S" (set "valid_key=1" & call :slide "C" "%size%,-1,1" "X")
if /i "!key!" equ "D" (set "valid_key=1" & call :slide "R" "%size%,-1,1" "X")
if /i "!key!" equ "N" goto begin_game
if /i "!key!" equ "P" exit /b 0
if "%valid_key%" equ "0" goto main_loop

rem check if the board changed
if %changed% neq 0 call :addtile

rem check for win condition
if %won% equ 1 (
    set "msg=Nice one... You WON^!^!"
    goto gameover
)

rem check for lose condition
if %blank_count% equ 0 (
    for /l %%R in (1,1,%size%) do for /l %%C in (1,1,%size%) do set "LX_%%R_%%C=!X_%%R_%%C!"
    set "save_changed=%changed%" & set "changed=0"   %== save actual changed for test ==%
    call :slide "C" "1,1,%size%" "LX"
    call :slide "R" "1,1,%size%" "LX"
    if !changed! equ 0 (
        set "msg=No moves are possible... Game Over :("
        goto gameover
    ) else set "changed=!save_changed!"
)
goto main_loop

rem add number to a random blank tile
:addtile
set "blank_count=0"   %== blank tile counter ==%
set "new_tile="   %== clearing ==%
rem create pseudo-array blank_tiles
for /l %%R in (1,1,%size%) do (
    for /l %%C in (1,1,%size%) do (
        if !X_%%R_%%C! equ 0 (
            set "blank_tiles[!blank_count!]=X_%%R_%%C"
            set /a "blank_count+=1"
        )
    )
)
if %blank_count% equ 0 goto :EOF
set /a "pick_tile=%random%%%%blank_count%"
set "new_tile=!blank_tiles[%pick_tile%]!"
set /a "rnd_newnum=%random%%%10"
rem 10% chance new number is 4, 90% chance it's 2
if %rnd_newnum% equ 5 (set "%new_tile%=4") else (set "%new_tile%=2")
set /a "blank_count-=1"   %== to be used for checking lose condition ==%
goto :EOF

rem display the board
:display
cls
echo(2048 Game in Batch
echo(
set "wall=+"
for /l %%C in (1,1,%size%) do set "wall=!wall!----+"
for /l %%R in (1,1,%size%) do (
    set "disp_row=|"
    for /l %%C in (1,1,%size%) do (
        if "!new_tile!" equ "X_%%R_%%C" (set "DX_%%R_%%C=  +!X_%%R_%%C!") else (
            set "DX_%%R_%%C=!X_%%R_%%C!"
            if !X_%%R_%%C! lss 1000 set "DX_%%R_%%C= !DX_%%R_%%C!"
            if !X_%%R_%%C! lss 100 set "DX_%%R_%%C= !DX_%%R_%%C!"
            if !X_%%R_%%C! lss 10 set "DX_%%R_%%C= !DX_%%R_%%C!"
            if !X_%%R_%%C! equ 0 set "DX_%%R_%%C=    "
        )
        set "disp_row=!disp_row!!DX_%%R_%%C!|"
    )
    echo(%wall%
    echo(!disp_row!
)
echo(%wall%
echo(
echo(Score: %score%
goto :EOF

rem the main slider of numbers in tiles
:slide
rem %%A and %%B are used here because sliding direction is variable
for /l %%A in (1,1,%size%) do (
    rem first slide: removing blank tiles in the middle
    set "slide_1="
    set "last_blank=0"   %== boolean if last tile is blank ==%
    for /l %%B in (%~2) do (
        if "%~1" equ "R" (set "curr_tilenum=!%~3_%%A_%%B!"
        ) else if "%~1" equ "C" (set "curr_tilenum=!%~3_%%B_%%A!")
        if !curr_tilenum! equ 0 (set "last_blank=1") else (
            set "slide_1=!slide_1! !curr_tilenum!"
            if !last_blank! equ 1 set "changed=1"
            set "last_blank=0"
        )
    )
    rem second slide: addition of numbered tiles
    rem slide_2 would be pseudo-array
    set "slide_2_count=0"
    set "skip=1"   %== boolean for skipping after previous summing ==%
    if "!slide_1!" neq "" for %%S in (!slide_1! 0) do (
        if !skip! equ 1 (
            set "prev_tilenum=%%S" & set "skip=0"
        ) else if !skip! equ 0 (
            if %%S equ !prev_tilenum! (
                set /a "sum=%%S+!prev_tilenum!"
                if "%~3" equ "X" set /a "score+=sum"
                set "changed=1" & set "skip=1"
                rem check for winning condition!
                if !sum! equ !target! set "won=1"
            ) else (
                set "sum=!prev_tilenum!"
                set "prev_tilenum=%%S"
            )
            set "slide_2[!slide_2_count!]=!sum!"
            set /a "slide_2_count+=1"
        )
    )
    rem new values of tiles
    set "slide_2_run=0"   %== running counter for slide_2 ==%
    for /l %%B in (%~2) do (
        if "%~1" equ "R" (set "curr_tile=%~3_%%A_%%B"
        ) else if "%~1" equ "C" (set "curr_tile=%~3_%%B_%%A")
        for %%? in ("!slide_2_run!") do (
            if %%~? lss !slide_2_count! (set "!curr_tile!=!slide_2[%%~?]!"
            ) else (set "!curr_tile!=0")
        )
        set /a "slide_2_run+=1"
    )
)
goto :EOF

rem game over xD
:gameover
call :display
echo(
echo(!msg!
echo(
echo(Press any key to exit . . .
pause>nul
exit /b 0
Ebox Thin Client with Windows 95
EEE PC 701SD with Windows XP
Atari 1040STFM with GEM/TOS
Playstation 2 with FreeMcBoot Yabasic
Keyboard Famiclones with GBasic and FBasic
Xerox Sunrise 1800 with MSBasic and CP/M

Hotshot

There is AOZ Studio where you can make Flappy Bird in just 18 Lines of Codes(Yes, it is in Amos Codes with bit new code commands things in it!)

angros47

Flappy Bird can also be written in pure assembly in less than 512 bytes:



Also, there are several tools that allow to create a game with very few coding, or even with no coding (anyone remembers Klik&Play?). Unfortunately, the less you code, the less chances you have to make an original games. Because if you don't write the code yourself, the only thing you can do is pick the code someone else wrote, so the easiest to use tools are basically just customizable pre-made engines.  RPG maker is easy to use, and allows to create great games, but they are all similar, for example.

Steve Elliott

Quote
it's only in your imagination but if one day you release something I'm not going to use it because I'm not going to test it for free to find a bug.

Before writing you have to think if you don't write many absurd things, and I no longer waste my time answering you.

And people wonder why members leave the now toxic SB, so very sad.

Win11 64Gb 12th Gen Intel i9 12900K 3.2Ghz Nvidia RTX 3070Ti 8Gb
Win11 16Gb 12th Gen Intel i5 12450H 2Ghz Nvidia RTX 2050 8Gb
Win11  Pro 8Gb Celeron Intel UHD Graphics 600
Win10/Linux Mint 16Gb 4th Gen Intel i5 4570 3.2GHz, Nvidia GeForce GTX 1050 2Gb
macOS 32Gb Apple M2Max
pi5 8Gb
Spectrum Next 2Mb

Amon

Quote from: Steve Elliott on February 06, 2023, 18:18:33
Quote
it's only in your imagination but if one day you release something I'm not going to use it because I'm not going to test it for free to find a bug.

Before writing you have to think if you don't write many absurd things, and I no longer waste my time answering you.

And people wonder why members leave the now toxic SB, so very sad.



The only reason you perceive it as toxic is because zelda64bit challenged your logic. I mean lets face it, your post to him was full of illogic and bad reasoning. He calls you out and now you're saying the place is toxic. Don't you see how your post was toxic? So if SB has become toxic it's because of posts like yours.

Naughty Alien

..some time back, i moved away from game development to what i was always doing (electronics hardware/firmware), and i found it to be interesting in a way that, people willing to pay for it without any questions, assuming it is what they need..im still wondering is it related to fact that it feels 'natural' to pay for something physical, such as specific electronics hardware, hence people never ask is it 'free', while actual firmware you do as well, nobody really bothers and expect to get updated freely...interesting..

Amon

The opensource (free) era only started recently. 10-15 years ago you had to pay for practically everything. Companies soo realised that opensource software was very important in order to challenge manopolies.

Godot Engine is one instance where opensource and free is an example of this. Blender 3D was opensourced to challenge the monopolies in 3D design and look where it got it. It's now the defacto free 3D software used by millions.

Matty

The free era only really helps the bigger companies though - smaller devs, solo devs and the like find it much more difficult to earn from their software.  When mobile changed from having a moderate amount of paid apps to next to zero it became extremely hard for a solo dev to earn a cent through the mobile ecosystems.

Pakz

#26
I stil want to read more about this in biz books. But giving away a product can be profitable too I understand. You would need 40.000 views per day for the adds thereof to generate enough income for one person.
I bet there are lots of business tricks to generate income from attention alone. Newsletters are one thing I read that are advised for generating income. This from a copywriters book I bought last year.

Edit: One thing I read about was the 'sales funnel.' Those adds or references to other sites as seen on google can fetch maybe 15 dollars per click. Companies or interested parties would gladly see maybe 1% of a few thousand visitors visit their landing page or just redirect traffic after visiting a free product site.

Derron

#27
Quote from: Naughty Alien on February 07, 2023, 03:03:06
..im still wondering is it related to fact that it feels 'natural' to pay for something physical, such as specific electronics hardware, hence people never ask is it 'free'

copy car car2

hmm, did not work. Maybe it is easier for people to see digital goods as "should be free" because it just costs you a mouse button click to make two out of one. It is the same "convenience" which makes it easier to press a button instead of going into a local store and carry things home (or anything else incorporating physical work).

Means: if each time you wanted a copy of a software someone had to actually buy a floppy disc, copy stuff to it - you are surely willed to at least buy for the discs, maybe even a bit of money for the time it took to copy files and all this stuff.
This is because "without" the physical stuff (and human labor) you would not have been able to "get it".
If someone just came by to you and installed from THEIR floppies ... you get it, price they would have paid would be lower.
(this is also why you accept to pay something if an Electrician repairs something for you - with just a screwdriver they already had and did not have to buy). It is labor they do _for_you_ - they only come for you, not for others. This is why you accept to pay for a taxi, but might be considering to not pay for a bus ("will go their route anyways").

Same I guess is to say about Blurays vs digital stream ... people want to "own" something. These things can also be burned and insurances pay, you can give them away, sell them on a street market ... all these things.
Guess this is why people are accepting to pay for "physical goods". For me the most important aspect of course is convenience - only a click and you have a copy, "nobody harmed".



Quote from: Matty on February 07, 2023, 04:42:53
The free era only really helps the bigger companies though - smaller devs, solo devs and the like find it much more difficult to earn from their software.  When mobile changed from having a moderate amount of paid apps to next to zero it became extremely hard for a solo dev to earn a cent through the mobile ecosystems.

Yeah, it becomes harder because today you often sell "service". You offer a free (base) product and sell customizations, individual support. How to do that if you are also the developer (time to develop vs time to market, individualize stuff, ...).
In that case (one person company) you need to rethink what you could sell. Most will of course do with a basic app and either "ads" (nahhh) or inapp purchases/non-free addons.
Free app to get a kind of "spread" (and people using it) and with the "masses" it comes the wish to individualize/have stuff not everyone else can have - or need.

This is the time when a kind of "economy" around your software could be established. Without "masses" it won't happen. Just think of Monkey, BlitzMax, ... 20 years ago a lot of people used it (BlitzMax) and they wrote commercial modules, editors, ...
Now, with only some handful of users being still using them, nobody would think about writing a commercial addon/module/... for it. It just does not pay out.

It might also depend on what software you develop - games exist a million and more. You need to think about tools which exist but almost all of them are non-free. Make something which is free, needed by others and sell the extras. This might mean to go "niche" (so: "special software)").
If you want to keep coding games: spread the word about your other games (the ones "worth to be still mentioned" :D) in all your games. Do a kind of "cross-linking". Make games profit from each other (allow importing the hero of your game 1 as actor in game 2).
As I said often - and so I do not just repeat what said some lines above: you ... need ... a ... critical ... mass ... of ... users.  This mass it what allows you to think about "how to earn something from it". Until you reach the mass your question should always be: "how to reach a critical mass of users".


Think about Godot ... at the beginning I am sure many unity/unreal... users and developers laughed when reading about that project. Yet it gained traction and a lot of people are helping the project. I am a bit disappointed on their "begging for money" (is less harsh these months than it was - maybe because of the extra funding/grants they received). Yet they continued to do their stuff and some developers are now getting paid for doing the "core work". This only works as they reached a critical mass of users.


bye
Ron

Qube

Any language can be used to make a game but of course there are languages aimed mainly at such a task which have loads of commands to make your life easier. Personally I prefer AGK as it's super easy to learn and great for 2D games ( It does 3D but for me there are better options out there ). It's not free but it's often on sale for next to nothing.

Regarding free vs paid for, I don't think anyone expects everything should be free and if they do then they need a reality slap :)) A lot of companies provide free versions of their dev apps as they make money from the eco system surrounding them, be it assets, training, help, royalties etc. I don't see anything wrong in asking if there are free tools which do x,y,z. I mean why pay if the exact thing you are looking for is free ;D

Mac Studio M1 Max ( 10 core CPU - 24 core GPU ), 32GB LPDDR5, 512GB SSD,
Beelink SER7 Mini Gaming PC, Ryzen 7 7840HS 8-Core 16-Thread 5.1GHz Processor, 32G DDR5 RAM 1T PCIe 4.0 SSD
MSI MEG 342C 34" QD-OLED Monitor

Until the next time.

lucidapogee

Quote from: Qube on February 07, 2023, 16:55:30
Any language can be used to make a game but of course there are languages aimed mainly at such a task which have loads of commands to make your life easier. Personally I prefer AGK as it's super easy to learn and great for 2D games ( It does 3D but for me there are better options out there ). It's not free but it's often on sale for next to nothing.

Regarding free vs paid for, I don't think anyone expects everything should be free and if they do then they need a reality slap :)) A lot of companies provide free versions of their dev apps as they make money from the eco system surrounding them, be it assets, training, help, royalties etc. I don't see anything wrong in asking if there are free tools which do x,y,z. I mean why pay if the exact thing you are looking for is free ;D

Agreed. Everyone walks their own path. Nothing wrong with that. We all have merits to our arguments.

Some people will use the free software that is provided and some people will pay for premium software.

Some of us will make software for non profit, some will depend on ads, some will depend on sales, and some will try some other approach entirely.

It's nobodies business to tell others how to market their products or how to achieve revenue. The fact is if everyone did the same thing all the time, the industry would become stagnant.
Ebox Thin Client with Windows 95
EEE PC 701SD with Windows XP
Atari 1040STFM with GEM/TOS
Playstation 2 with FreeMcBoot Yabasic
Keyboard Famiclones with GBasic and FBasic
Xerox Sunrise 1800 with MSBasic and CP/M