Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length

 
Advanced search

1390966 Posts in 66807 Topics- by 59552 Members - Latest Member: shekit

April 20, 2021, 12:23:31 PM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsDeveloperTechnical (Moderator: ThemsAllTook)What are you programming RIGHT NOW?
Pages: 1 ... 68 69 [70] 71
Print
Author Topic: What are you programming RIGHT NOW?  (Read 171086 times)
Daid
Level 3
***



View Profile
« Reply #1380 on: May 05, 2018, 11:30:14 AM »

Reminds me of this:


I wrote a boot loader and simple OS years ago in university, and even then I thought the 512 byte pre-boot bootloader was archaic...  I can't believe it hasn't changed.
Funny, as the XKCD is the opposite of the situation. There are 2 standards, the legacy 512 byte bootloader in 16 bit mode. And UEFI.
Why did we have the 512 bootloader for... forever? Because it's what all the software does, so all the hardware does it to remain compatible, and thus all the software does it to remain compatible. It's actually an improvement if you compare it to ARM booting, which is pretty much different for each chip manufacturer. With ARM you require a special piece of code for your exact chip. With x86, you can boot with generic code that works on everything.

And then UEFI came along...
Logged

Software engineer by trade. Game development by hobby.
The Tribute Of Legends Devlog Co-op zelda.
EmptyEpsilon Free Co-op multiplayer spaceship simulator
ferreiradaselva
Level 3
***



View Profile
« Reply #1381 on: May 05, 2018, 12:34:38 PM »

Why did we have the 512 bootloader for... forever? Because...

Actually, it's because UEFI is A PAIN IN THE ASS.
Logged

Crimsontide
Level 5
*****


View Profile
« Reply #1382 on: May 05, 2018, 01:57:30 PM »

Actually, it's because UEFI is A PAIN IN THE ASS.

Wan't it supposed to make booting less of a PITA?  Where did it go wrong?
Logged
gimymblert
Level 10
*****


The archivest master, leader of all documents


View Profile
« Reply #1383 on: May 05, 2018, 05:28:00 PM »

Right now programming extremum detection in unity, debug.Log stop working for some reason, not even mad, just rolling my eyes after spamming log everywhere and none fire despite code proceeding along...
Logged

Prinsessa
Level 10
*****



View Profile WWW
« Reply #1384 on: May 07, 2018, 02:25:58 AM »

Maybe you've accidentally disabled regular messages in the console (there are three little switches at the top for toggling regular messages, warnings and errors respectively). I've done that more than once and then gone on a lengthy search through my code and wasting a lot of time… And I've heard the same story from others. ;;
Logged

gimymblert
Level 10
*****


The archivest master, leader of all documents


View Profile
« Reply #1385 on: May 07, 2018, 10:56:45 PM »

Maybe you've accidentally disabled regular messages in the console

(ノಠ益ಠ)ノ彡┻━┻

It was exactly that!

Logged

ALourenco
Level 0
***


View Profile WWW
« Reply #1386 on: May 08, 2018, 03:04:20 AM »

I am starting with a small Vulkan renderer. My goal is to learn how the API works, improving my C++ skill and getting some cool stuff for my portfolio. I am still in try, explore, delete the code and redo phase. Tongue.
Logged

GameDev Master Student.
Game Engines and Computer Graphics in free time.

@CodinGree
Tusky
Level 1
*



View Profile WWW
« Reply #1387 on: May 12, 2018, 11:50:15 PM »

Logged
qMopey
Level 6
*


View Profile WWW
« Reply #1388 on: May 14, 2018, 08:04:21 AM »

Made a dank font header. Supports utf8, and loads three different formats of pre-rasterized font atlases. Also can render to a vertex buffer. Has no dependencies other than some crt funcs which can be compiled out.  Wizard

Source https://github.com/RandyGaul/tinyheaders/blob/master/tinyfont.h

Logged
gimymblert
Level 10
*****


The archivest master, leader of all documents


View Profile
« Reply #1389 on: May 14, 2018, 09:36:49 PM »

trying to make convex hull, just got the primitive tetrahedron converted to half edge
Logged

ThemsAllTook
Global Moderator
Level 10
******



View Profile WWW
« Reply #1390 on: November 11, 2020, 07:22:25 AM »

All of the game code I write these days uses a custom-built framework that I've named Stem. I've been developing and extending it for about 11 years now, and my constant investment in it has paid off hugely - what I have now is a stable API that lets me write code I in the way I find expressive and intuitive, in a high performance language, building for 5 different platforms with minimal effort, and I understand it at every level so I can fix any problem that comes up. It's pretty great.

This weekend, I decided I wanted to fix all of the things that had been bothering me about my build system. Stem is a granular set of libraries - right now there are 32 separate modules that I can opt into linking for each project, depending on its needs. For example, a command-line tool that manipulates JSON data would link to jsonio and maybe jsonserialization, but has no need for audioplayer, glgraphics, collision, etc. An actual game would probably link to all of them at once.

The way I've made this work is that each individual project (whether it's a Stem library itself, a supporting tool, or an application that uses Stem) has a minimalistic makefile that lists source files, supported platforms, and build instructions that are unique to that project (example). Then, I have a big global makefile that each project imports at the end of its own makefile, which contains all of the plumbing to turn those minimalistic project-specific definitions into compiler invocations and everything else necessary for building something. It's a bit of a monster, but it does the job extremely well. It turns out that Make is actually a reasonably capable macro/scripting language if you really get deep into it.

I try to keep my third-party dependencies to an absolute minimum, but by necessity, I do have to use at least libpng and libogg/libvorbis (I know of stb, but it only does input, and I have cases where I need output). Until this weekend, I was building these in a kind of janky way that wasn't incorporated into my main build system. I managed to fix this, so what I have now is a container project for each third party library, which has the unique build instructions in its makefile for building that library on each platform, and pretty much nothing else other than an archive of the library itself. For example, here's what the libvorbis makefile looks like: http://ludobloom.com/svn/thirdpartymanaged/libvorbis/trunk/Makefile

The one thing Make isn't able to do for me on its own is to understand complex interdependencies between libraries. Some Stem libraries build directly on others; for example, if I want to use jsonserialization, I also need to link to the jsonio and serialization libraries. In addition to my global makefile, I have a Ruby script that knows how to parse the dependency variables in each project's makefile, and write a database of them to a central location. My global makefile then invokes the same script to have it report all dependencies to make in the appropriate order based on its database, so they can be passed as linker flags during the build process.

Another major thing I had wanted to fix this weekend: Previously, building the dependency database involved making a bunch of HTTP requests to my SVN server to get the makefile data to parse. This meant I had to be online to do it, and it was really slow! Having to rebuild the database every time I made a significant change got on my nerves, so I came up with a way to have each project create or update its own individual entry in the dependency database whenever I would build and install it. This keeps everything local, doesn't require me to have committed my changes before being able to test their effect on the things depending on each library, and just feels a whole lot better.

It's all put back together and working the way I want it now. By my count, this was about 14 solid hours of intense work. Totally worth it.
Logged

Guntha
Level 0
**


View Profile WWW
« Reply #1391 on: November 13, 2020, 12:28:07 PM »

I'm introducing myself to compute shaders in D3D12 to get an equivalent of glGenerateMipmap(), with the help of https://www.3dgep.com/learning-directx-12-4/#Compute_Shaders, and I'm starting to lose my patience.

It's frustrating because the code that does the actual work is tiny, but it requires a ton of boilerplate to get it working. Also, the tutorial above uses the "helper" d3dx12.h, which I'm not a fan of (it hides complexity, and all it does is filling structs, do we really need a helper for that? When I started adding D3D12 in my engine I got rid of it), and on top of that, the author adds his own complexity, with his lib that adds many layers between the calling code and the actual D3D12 calls. I won't blame him, it's still easier with his explanations than when trying to get the compute shader straight from Microsoft's MiniEngine sample.

Anyway, I guess I should be good in a few days, and maybe it will motivate me to do some other interesting things with compute shaders Smiley
Logged

Endurion
Level 2
**



View Profile WWW
« Reply #1392 on: November 13, 2020, 09:29:25 PM »

Working on my C++ Xtreme game engine framework. It has plugin mechanism for 2d and 3d renderer, sound, music and input. I'm currently aiming to get 3d running in the browser via emscripten. The 2d renderer already works, and I'm finalizing the (old, fixed function) OpenGL renderer before tackling the shader version.
The engine lets me now use D3D8, D3D9, D3D11 (shader), can compile to UWP and with Emscripten also to web assembly.

Plus aiming at web also brings me (probably) Mac and Linux support, since it's basing the windowing stuff on SDL.
Logged
qMopey
Level 6
*


View Profile WWW
« Reply #1393 on: November 14, 2020, 12:58:23 PM »

My code runs with SDL on web, and it was really easy to port to Mac/Linux! Good choice on using SDL for your platform layer Smiley
Logged
Razakhel
Level 0
*


View Profile WWW
« Reply #1394 on: December 08, 2020, 12:30:57 PM »

As always, working on my game engine. Currently trying to finally implement ridig body physics properly, while rearchitecturing some things and optimizing others!

(The previous posts also remind me that I have to fix my Emscripten build, which ended broken (for the second time) for unknown reasons, so this will most likely come next Sad)
Logged

RaZ, my own game engine. Feel free to star/fork it, ask any question, or even contribute!
Action Tad
Level 0
*


View Profile WWW
« Reply #1395 on: December 22, 2020, 03:48:48 PM »

right now I'm going to be working on another AI Class. And on a Class that will organize some of the Engine code I have made.
I recently finished AI that can pick up and throw things at the player and move up and down over 1x terrain.
Once I've organized things a bit better I'll feel more confident to mass release games.
Logged
tague
Level 0
**


View Profile WWW
« Reply #1396 on: February 27, 2021, 05:31:27 PM »

Trying to make game engine tooling (level editor, etc.) in the form of IDE plugins so I can seamlessly pop open my level files in CLion.
Logged
ThemsAllTook
Global Moderator
Level 10
******



View Profile WWW
« Reply #1397 on: March 29, 2021, 06:53:36 PM »

I'm currently rewriting my game's messy save file system that scatters a whole bunch of files around on disk to have it instead write to a single file per player profile for all save data. Since this makes that file a single point of failure (one crash while writing would lose ALL save data at once instead of just the one piece of data being saved), I want to write the file atomically.

While I was familiar with the concept of atomic writes, I was a little bit shaky on the implementation details for all platforms I support. I found a real nice article that breaks it down into exactly what I needed to know: http://www.microhowto.info/howto/atomically_rewrite_the_content_of_a_file.html
Logged

fláráðr ljós
Level 0
*


View Profile
« Reply #1398 on: April 03, 2021, 09:09:21 AM »

I wanted to host some images, so naturally I spent an afternoon writing a HTTP server from scratch. It's 323 lines of C99 with no external dependencies.
Logged
ThemsAllTook
Global Moderator
Level 10
******



View Profile WWW
« Reply #1399 on: April 03, 2021, 05:41:07 PM »

Atomic writes were straightforward. Done.

I stumbled into an unrelated problem today that kept getting more and more complicated as I worked on it... I have some user-editable objects in my game that need to have globally-unique string identifiers, but also can be copied, so I wanted to generate a sensible unique name for the copied object. My initial implementation just took the name and appended " copy" to the end of it, but it didn't look so great to end up with "Object copy copy copy copy" if I copied the same thing multiple times. I'm also enforcing a 64-character limit on name length, so extra " copy" strings at the end could fill that up quickly. What I'd prefer is to append a number alongside the copy suffix and increment that until I land on a unique value.

With all these constraints in place, here's the algorithm I ended up with:

  • Parse the existing suffix to see if the string being copied already ends with "copy" or "copy %u". If it ends with a number, store that number for later use.
  • Try appending " copy" to the name (having chopped off any existing copy suffix and truncated if necessary to fit within 64 characters), and check if the string is unique.
  • If not unique, start from the number stored earlier (or 2 if none was parsed), and successively try suffixes incrementing the number by 1 each time until a unique value is found, or an arbitrary limit is reached (I've set it at 9999).
  • If the limit is reached and the parsed number was greater than 2, start over from 2 and try the same thing, looking for any gaps that can be filled. This is necessary to make sure the function doesn't see just a single string with a suffix of "copy 9999" and decide immediately that it's exhausted all possibilities.
  • If a unique value still isn't found, call abort(). Otherwise, return the new string.

Phew. I think that covers everything. The result isn't pretty, but it seems to do the job.
Logged

Pages: 1 ... 68 69 [70] 71
Print
Jump to:  

Theme orange-lt created by panic