#I love game engine development

1 messages · Page 1 of 1 (latest)

uneven herald
#

Making a game engine in C++ with the goal of having it function simillar to goldsrc. It is pain lol.

#

I'll be posting stuff here as i go

#

for now, shader and mesh systems are somewhat working + dll loading is under works

fathom mauve
#

what library do you use?

#

like gpu abstraction

uneven herald
#

OpenGL

crisp parrot
#

Following learnopengl?

#

The bg color is very similar to it

brisk otter
#

I lost all my game engine code when switching to arch 😭

#

but it seems cool

crisp parrot
#

Why is your pfp a purple 3d screw attack

brisk otter
#

idk

#

just found it

crisp parrot
#

Screw attack does not look good 3d

brisk otter
#

ok.

crisp parrot
#

Metroid is cool tho

brisk otter
#

ye

crisp parrot
#

Why didn't you save a backup in such a large project?

brisk otter
#

it wasn't done

crisp parrot
brisk otter
#

it slipped my mind ig

crisp parrot
brisk otter
#

' '

crisp parrot
#

How did you do that?

brisk otter
wraith sparrow
uneven herald
#

Rn i am working on fixing up a file format i made called bpf. I am using it to pack files into a single file

#

not too interesting output

#

ig you've got this

brisk otter
uneven herald
#

binary packing format

wraith sparrow
#

Why not use a tarball?

uneven herald
#

idk

#

because ig

#

i though it'd be fun

uneven herald
#

following up we've got textures(i am using LearnOpenGL as i for the love of god cant remember everything)

humble panther
#

did you start with the renderer?

uneven herald
#

indeed

#

or

#

renderer + some other parts

uneven herald
#

Alr added entities to the thing, going goldsrc style. The cube is now an entity with a model and for some reason the transparency is extremely janky lol

brisk otter
#

thats fire

#

I might make a game engine

#

any tips?

cursive knoll
pulsar juniper
#

use zlib or something is very easy to setup

uneven herald
#

i could do that ofc

stark kraken
uneven herald
#

Nah transparency isn’t my biggest priority rn

#

Cos I doubt I’ll use it to any greater extent

uneven herald
#

Update: Currently procrastinating lol

#

working on a custom format for file storage

#

*model storage

#

ig models are files tho ¯_(ツ)_/¯

uneven herald
#

Alllrighyyyy! New progress!

#

After a ton of working on stuff i've gotten some proper macros up and running for model loading and that kinda stuff + a new model format!

#

just look how clean that is!

#

Actually, i'll do 2 side-by-side ones

#

discord couldnt fit the old code

#

It is all compressed together in a file format called qmod

#

Short for quiver model

#

I also renames assets.bpf to assets.qdir for naming consitency

#

More precisely, 12317 lines of code

#

All written by me

#

heads up that the build contains GL memory leaks that wont be cleaned up by linux lol

uneven herald
#

tried to reconstruct it

uneven herald
#

alr

#

so i can now build headless builds of the game

#

They arent too interesting, but they take up a couple megabytes less so ig that is nice

#

now

#

My model format seems to have some serious issue

#

As it has big chunks of just zeroes lying around, which i suspect is some mathematics issue in my code

#

since a cube lies at around 1.6 MB for barely any data lol

uneven herald
#

Been working on levels for some time now, and i got rendering and everything up and running, just need some time to fix UVs and brushes.
Meanwhile i implemented ansiotropic filtering, and put it behind an extension flag. Here's with it enabled(at 8, i use the system max divided by 2)

#

and disabled

uneven herald
#

Allrighty, here is a major one! I've been doing some work using wxWidgets and got some UI up and running for a development suite(you need to make dem tools)

#

I am almost finished with the frontend for a program called bpfpack which is used to compress a directory into the bpf format

uneven herald
#

not openly yet

#

But yes

brisk otter
#

when / if it is ping me

uneven herald
#

I'll be granting early access to people once i feel like it is ready so i'll try to remember you :)

brisk otter
#

thanks

uneven herald
#

Oookayyy. This only took a lot of work, but now i got a model compiler up and running

#

I am using a special binary format because

  1. I can
  2. I make the rules
#

Here's a decompiled version of a basic cube(not full file but anyway)

#

Basically there is the .qmod which is the binary model file, and then the .mdef which is the OBJ-like model format which easily can be compiled into a proper model

#

I can give ya'll full docs here!

# MDef file format
it is very basic, and takes around 100 lines MAX to implement!
So, basically, it is divided into lines, and is very space sensitive.
Each line starts with one of 4 data flags:
1. "#" - Comment
2. "v" - Vertex
3. "i" - Triangle
4. "t" - Texture
This is then followed by a space and then data.

Comment doesnt matter and should be ignored.

Triangle should be followed by 3 integers, each being an index to a vertex.

Texture should be followed by a texture name

Vertex should be followed by 11 space-seperated(only one space) numbers(with or without decimals). They are in this order:

Pos.X Pos.Y Pos.Z Norm.X Norm.Y Norm.Z UV.X UV.Y Color.R Color.G Color.B

No trailing spaces. Never any trailing spaces.
#

I'll prob be writing a blender addon or something to export mdefs or convert OBJs into mdefs

#

oh and yeah

#

I decompiled the cube model i've been using into mdef, and compiled it back into qmod

#

Same algorithm, yet the new qmod is 1.8 kB and the old qmod is 1.5 MB

#

oh and i may or may not have mixed up the Import and Export labels, but those are fixed now

zealous schooner
#

you should use lua for scripting the engine

brisk otter
#

@zealous schooner ik you love lua but are you sure lua is the answer to everything?

zealous schooner
#

For scripting it 10000% is

#

That’s what it was made for

brisk otter
#

welp you never deceived me before so I believe me

glacial rose
#

yes lua is amazing for scripting

uneven herald
#

i wont support scripting tho 😳(depends on how you look at it)

#

It'll be an .so/.dll file, so really any lang works here, but i've been focused on C++

uneven herald
#

aight, time to get my events system up and running once i've restructured

brisk otter
#

if it goes open source I'll try to make bindings for others langs

brisk otter
#

@uneven herald any updates

prime stag
#

coool

uneven herald
#

Procrastination rn

uneven herald
#

Happy to say that level loading almost works again! Some small things todo then i'm done with that and can move onto making some basic game elements

brisk otter
#

progress nooo

#

nice man

uneven herald
#

I've got more progress that i'll show you in a mo i think

#

might not look like much, scene is familiar, but basic entity loading is now implemented! We've also got basic materials. The wall brush(tiled one) is a material defined in libclientgame.so

brisk otter
#

Nice

#

what are you going to name it?

uneven herald
#

quiver

#

It was originally made for a game called "crossbow", which I've barely touched

#

I'm also planning on a rewrite 😔

tacit wigeon
#

Isn't "quiver" as an engine name taken already by a source engine fork?

lilac light
#

@uneven herald progress?

uneven herald
#

uhm

#

I restarted again because dumb bad codebase

#

And currently focus is on something else

#

Because I can't finish projects

tacit wigeon
brisk otter
#

@uneven herald any updates?

uneven herald
#

The project is currently not in development, but I’m working on something else(which also happens to be a game engine).

#

The game engine I’m working in now is however designed for a single game