/dpt/ - Daily Programming Thread

Previous Thread: What are you working on, Sup Forums?

FIRST for GO has SEGMENTED stacks!! ~

Reposting.

while(1) {
printf("Please don't use an anime image next time!\nThanks!");
}

Should I learn C or C# for coding shitty games?
>inb4 C++

Yeah! Let's go back to 16 bit x86!

Please use a trap image next time

C++.

if your program can't recover from a failure in that function, then just throw instead of returning a nonzero value

C

Probably neither, depends on what kind of shitty games you want to make

you can have segmented paging

game maker studio for 2d games

Unity or Unreal engine for 3d games

r-really?

also
>non-free software

yes, but it's a mess and I don't think it's really used much

C# + Unity will get you going quicker whether 2D or 3D.

Reposting my question, is there any ready solution for storing tags akin to leveldb?

You are not going to finish and program an entire game without using a engine

Bullshit

I know, that's why I recommended Unity + C#.

Fuckton of tutorials, lots of free assets, easy to get in to.

Truth

3d maybe, but 2d is pretty much doable all by yourself.

No, unless if you are useless as a programmer.
I am seriously unsure what you are doing here.

Do you know how very long it would take you to build an engine to manage all the assets in your game? Many years compared to using an already made engine which is where you both are wrong

Define "manage all the assets in your game". For my pokemon clone it took a few minutes.

>2d is pretty much doable all by yourself
Maybe for the most basic of 2D games, which is frankly boring and no one will want to play it.

Most "2D" games coming out these days are 2.5D done with something like Unity, even the pixel art games.

It's doable but still a bad idea. You're going to waste a lot of time making an engine of some sort, probably by the time you'll finish it you'll lose all motivation for making an actual game.

Also, I don't know about C#, but C++ doesn't even have any proper frameworks for game development. Most of them are either bare bone or just pretty shit quality.

Ridiculous. You can make a 2D engine in a week or two easily.

Why the hell would you suggest non-free tools?

>but C++ doesn't even have any proper frameworks for game development
You're kidding right?

>Search and replace NULL with nullptr
>program starts crashing
>reset to previous commit
>program still crashes after make clean && make

I swear to god I'm going to kill myself

You forgot to count in project management, testing, art creation, project design, ui design, marketing, engine creation, content creation, engine optimization, engine testing, engine porting to consoles and many more things.

>C++ doesn't even have any proper frameworks for game development.
user

$ cat ~/bin/c
#!/bin/sh
gcc -fdiagnostics-color=always -g -gdwarf-4 -Og -Wall --std=c11 \
-Wpedantic -fno-diagnostics-show-caret -fsanitize=undefined \
-fsanitize=address -fno-omit-frame-pointer -fcilkplus -pthread \
-lm -D_FORTIFY_SOURCE=1 -D_XOPEN_SOURCE=700 -I ~/include/ \
-L ~/lib/ "$@" -Wno-maybe-uninitialized

It may help you! (mainly the sanitisers)

Stop being an open-source autist.

Unity is one of the best (if not THE best) platforms for newbies.

There isn't a better open-source alternative that is superior on merits other than simply being open-source.

You mean all those things you have to do with a third party engine anyway?

Just name a few frameworks that have same features as Game Maker (e.g. rendering, physics, asset management) and that are actually battle-tested

You are not going to make a 2d engine as good as game maker studio in a week or two easily

Xenko is better.

A 2D engine you do in a week will objectively be not as quality as Unity's, but it may serve the purpose just right for your game.

Learn how to use gdb, it's basically 2-3 core commands

>game maker studio
>good

wew

Your engine will be made for your game instead of being a general purpose thing which includes a million things your project has no use for that are just there to obfuscate the tools you actually want to use and bloat the executable.

Pajeet/10

newbies should learn programming and CS instead of working with shitty dragndrop programs.

>There isn't a better open-source alternative that is superior on merits other than simply being open-source.
Have you tried many?

Also, I am not an open-source autist, I do not support open source. I support free software.

>project management
oh boy i sure needed lots of project management to manage me and my nonexistant coworkers
seriously for a one man hobby project you need nothing but a todo list
>testing
included in the two weeks
>art creation
not part of engine dev but of game dev
>project design
software architecture is easily included in those two weeks
>ui design
not part of engine dev
>content creation
not part of engine dev
>engine optimization
part of the two weeks
>engine testing
duplicate
>engine porting
most required provided portability is already provided by the tools used to write the engine

Finding my next position.

The program never worked in GDB because for some reason vkGetDeviceSurfaceCapabilitiesKHR returns VK_ERROR_SURFACE_LOST when the program isn't run from explorer.

Tbh I'm starting to think Nvidia's Windows drivers just don't like Vulkan. DOOM has been crashing a lot too.

Unreal Engine 4's source code is fully available, but it isn't "free".

I have no dislike for the free software movement, but put bluntly if free tools were viable people would be suggesting them instead. If you're developing a game of any complexity, you don't have years to blow on recreating tools that already exist. It's not simply easier to modify an existing engine, it's your only real option. Especially if you're working alone.

It is one of the best 2d game engines out there

You are not going to make a good 2d engine in a week stop lying to yourself you don't realize how much work goes into a real good 2d engine like game maker studio

Holy shit, that's a lot of money.

>if free tools were viable
The majority of them are.

>people would be suggesting them instead
And they do.

>If you're developing a game of any complexity
You should be able to make its engine in a short amount of time if you are not a pajeet.

you're aware that the actual engine is a lot smaller than all the stuff game maker provides, right?
especially for a small 2d hobby project (while being a competent developer), you don't need all that stuff

FUCK I figured it out

I was replacing an old variable with a new struct type and somehow ended up with the old variable being used in half the places and the new one in the other half

>fix'd
BENIS
E
N
I
S
EBIN

>game maker

Hotline Miami was originally made in Game Maker

Could you list some advantages?

All I can see is that people feel like it's Unity 1.0 (i.e. not very good).

People on /dpt/ actually know about programming and can easily recognise bullshit.
If you really need a premade shitty engine to make a 2d game, then you really should find a hobby other than programming.

thank you for proving my point

>game maker studio
mark overmars pls go

how's your 12432th variant of fizbuzz doing? or another interer averaging program?

How to develop a progam that clicks on a certain spot instantly when a keybind is pressed?

post your free 2d game engine you made that is much better than game maker studio

Ohh wait you don't have one because it's a difficult project to do on your own you liar!

For 2D dev you don't need fucking UE or Unity, they just contain a ton of shit you're not going to use. You're not going to be recreating those, you're going to create an engine adapted to what you need. You don't need a 3M LOC+ engine for a 2D game, games like Braid and Super Meat Boy are made by one programmer each and are both

You cannot program a reasonably good 2D game in less than a month from scratch.

The only 2d game engine you will ever need is SDL/SFML.

>int averaging
not this meme again

Would be pretty easy in C#.

Make it a service.

Listen for keypress, click at specified coordinates.

You can't do it with Unity either.

our /dpt/ bantz are coming along well, thanks

Did I ever claim that I made a generic 2d game engine?

Yes, you can easily if you don't totally suck. Have you tried it?

What do memes have to do with the topic?

you are making ridiculous claims of being able to make a 2d gaming engine in one week. Thanks for proving you don't have one and it's not going be possible to make a good one

Still waiting for an answer

SDL is not even a game engine. SDL is an abstraction layer over input/output devices. It can provide you interface to poll inputs, create windows and blit images. And if you want to use OpenGL, SDL can't even blit images.

Yes, you absolutely can.

You can have the basic structure of a working platformer with assets set up in a day or two.

I spent almost 8 months making it work. That was phase 1.

Now I'm going to start phase 2: making it *right*.

>"you're wasting your time"
It's open source, this code will have my name publicly attached to it and it will be used to judge my skills.

>"there's no perfect code"
No, but there's better code than the mess it currently is.

>you are making ridiculous claims of being able to make a 2d gaming engine in one week
Not ridiculous at all, it's very easy.

>Thanks for proving you don't have one and it's not going be possible to make a good one
...what?
When did I prove that? I really can't find such a proof in any of my posts.

who /cs50/ here? I'm trying the mario exercise, where you have to print out a half-pyramid of pound symbols aligned to the right. I managed to get it working somehow, but now I have a problem: when I give it certain values for height, like 8 or 23, it prints out pic related.

So my questions is, why is there a bunch of @ in between the #? If I had to guess I'd say that it's because i'm increasing the array index j past the maximum size of s, but as far as I can tell that's not the case. Or am I wrong?

My code (height is an int between 1 and 23 i get from elsewhere):
void MakePyramid(int height)
{
// For each line
for (int i = 0; i < height; i++)
{
// initialize an array of characters that will contain the spaces and the pounds
char s[height+1];

// replace each character with a space or a # depending on its position
for (int j = 0; j

Look, I know you're trolling, but /dpt/ has been really shitty since this thread started.

Can you go for a walk or something? Preferably in heavy traffic.

nigga u dumb
have you ever heard of ludum dare? people make an entire game (including the engine) in 48 hours.

Kill yourself pajeet and fuck off back to .

>but /dpt/ has been really shitty since this thread started.
Because of your kind.

>using arrays for this shit
why

I'm talking about 3D.

>Amnesia and SOMA.
Made by a team that developed their engine over a number of years and various projects. eg SOMA's engine was not made from scratch, it was an evolution of Amnesia's. Which was probably an evolution of Penumbra's.

I'm the rigidly self reliant type as well, and I like tightly crafting a program for exactly what I want it to do, how I want it to do it. I don't like working with other people's code, and I don't typically like adding on to an existing project. But there are hard limits to bear in mind, and you have to be realistic. Do I really have the time to research and replicate a highly developed lighting system? Do I have time to sort out all the possible issues with z-fighting, that have largely been solved? Etc.

You have to be realistic. I'm idealistic and stubborn, but I'm also broke and starving and have lived that way for years, and I'm only one person. The days of being able to consistently stay up for days straight are over, which is what I'd have to do to have the remotest chance of producing a working engine from scratch that does what I want and is capable of approximating photorealism.

Pressed submit too fast, oops.
Still waiting a reply to my question, when did I proved anything like that?

>make an engine instead of just making a game
wew

>ludum dare
That's a competition between the most autistic of autists.

It's hardly comparable to a recommendation for the average person actually trying to create something.

Behold: the future of "coders"

works on my machine
just go step by step in debugger and see what happens

Does anyone have that image with the hundred or so project ideas on it? I haven't seen it on here in a while.

so close

>Amnesia and SOMA
Nigga, they've been working on that engine for over a decade.

I remember when they were working on the engine for Penumbra. They actually posted on Sup Forums way back then in like 2006 with screenshots of lighting and physics progress.

Hey l/g/bt, where can i buy cheap hormones that make me a better programmer? I wish to be the little girl です.

void MakePyramid(size_t height) {
for (int i = 0; i < height; ++i) {
for (int j = 0; j < height - i; ++j) {
putchar(' ');
}
for (int k = height - i; k < height; ++k) {
putchar('#');
}
putchar('\n');
}
}

for(int i = 0;ii;j--){
printf(" ");
}

for(int k = i+1;k>=0;k--){
printf("#");
}
printf("\n");
}

I might have a little user soon, any suggestions for names?

foo

bar

9001 xddddd SO LE RANDOM XDDDD LE MONKEY FACE =3333 *poops self*

x

I guess I'd have to have 2 kids then