jakub_neruda

@jakub_neruda@techhub.social

Software Engineer, hobby game programmer, I sometimes draw funny comic strips.

Currently working on a retro arena FPS game called Rend: https://medium.com/@nerudaj/list/devlogs-rend-97b960bf3cbe

#cleancode #programming #gamedev #pixelart

This profile is from a federated server and may be incomplete. Browse more on the original instance.

jakub_neruda, to cpp Czech

Funny. I removed all modules from my C++ codebase (roughly 10% of it) and I got about 10-16% shorter compilation times. Not to mention Intellisense no longer crashing all over the place.

I wonder if it ever be a worthwhile feature to use.

djlink, to random
@djlink@mastodon.gamedev.place avatar

a new Nintendo console will be announced during this fiscal year.

jakub_neruda,

@djlink Oh no, not dual screen. Twenty years from now it will be a pain to emulate 😅

Right now I am playing Trackmania Turbo DS on my phone and I had to remember how to navigate menus so I don't have to constantly switch screens 😉

jakub_neruda, to cpp Czech

My networking code is doomed to never get itself into production. What the hell is this error about?

jakub_neruda,

@gracicot Sadly, the compiler output is exactly the same as the error output.

Btw, since MSVC 17.8.5, they included a button that shows you the structured output from the compiler output that is related to the error.

Plus I fear that even if I had clang, I am using such cutting edge features that the code wouldn't compile.

I am 99% sure this is caused by my intermixing of modules with headers, but I am not sure why. Standalone server binary compiles just fine, problems arise when I spawn the server inside the game code...

jakub_neruda, to gamedev Czech

Dammit... socket classes are NonCopyable through declaring their copy constructors private.

This prevents the autogeneration of the move constructors.

Thus, by proxy, I cannot make a factory function that would return std::expected<sf::UdpSocket, ErrorType>, because it has value semantics 😭

And I C++ diagnostics really didn't help here - I had the socket wrapped in another class that I wanted to return in the expected and all I got was "cannot convert from 'Client' to 'std::expected<Client,ErrorMessage>'"

Laurent commented that it will be fixed in SFML3, but he also made that claim in 2016 (https://en.sfml-dev.org/forums/index.php?topic=20997.0)

A real bummer when I cannot make an idiot-proof API because underlying types are trying to be even more idiot-proof...

jakub_neruda, to rust Czech

Tip 40 of #TuesdayCodingTips - Rust's error propagation is amazing

As much as I love C++, its optional and expected objects can just envy one killer feature of their Rust counterparts. If you're working with a Result<T, E> in a function that returns a Result<U, E2>, you can use operator ? to simply unwrap the Ok value into a variable. If the result contains an error, Rust will not panic; rather, it returns that error from the current function similar to how exception would bubble up the code. The only limitation is that the function must return Result with the error type to which the propagated error can be implicitly converted.

Option also supports the operator ?, which either propagates None up the call stack or safely unwraps the stored Some.

I'd kill to have this in C++, where you would have to employ non-standard compiler extensions to create a macro that would be at least close.

#rust #programming #tips

jakub_neruda,

@smoku I am not sure I like this. One of the reasons why people dislike exceptions is that you never know the full set of exceptions that can be thrown from the function.

If Zig does this in compile-time then do you have visibility into the full set of exceptions?

jakub_neruda,

@lhp @smoku Not sure what you mean by this. Can you please explain more?

jakub_neruda, to random Czech

I always thought it was a weird choice to push neural-net-AI development in Python as it has to be painstakingly slow.

Just the other day, I learned about llama.cpp which ports Meta's GPT to C++. And it can run on a common laptop! On a Pixel phone! On a friggin Raspberry!

I really hope that the next step in AI development is about porting these applications to performant languages so all of these cool models can be run on a consumer-grade devices for free instead of premium enterprise cloud servers.

hbons, to random
@hbons@mastodon.social avatar

typedef uint8_t u8;
typedef int8_t i8;
typedef uint16_t u16;
typedef int16_t i16;

should have done this ages ago...

jakub_neruda,

@hbons @MostlyBlindGamer One could possibly confuse it with unicode encodings or complex numbers...

jakub_neruda, to gamedev Czech

Even though I am working with 16x16 pixel sprites, producing at least passable weapon sprites is hard.

Here are six different drafts of the rocket launcher and the current version in-game.

I am still not satisfied.

Rocket launcher in-game.

Liquidream, to gamedev
@Liquidream@mastodon.gamedev.place avatar

PROBLEM:
Social Media can be linked to depression

SUGGESTION:
Try to improve Social Media life, by balancing successful/beautiful posts (e.g. ), by also posting brutally honest imperfect/failed attempts (?) 😉

HASHTAG =

jakub_neruda,

@Liquidream I like the idea, so hopefully I will mess something up so I can post it next sunday 🙃

Speaking of the dark side of the gamedev, I can't recommend enough Jason Schreier's book Blood, Sweat and Pixels. You could post each page with shoddy sunday hashtag 😃

jakub_neruda,

@Liquidream Do quirky, funny bugs also apply or just downright failure / burnout stories?

jakub_neruda, to gamedev Czech

Every single time someone invents a fantasy console with Z X action keys or makes an indie game with those buttons, I am like "Why do you guys hate QWERTZ users so much?!"

jakub_neruda, to gaming Czech

I am learning German with Duolingo and I wonder if anybody could recommend a german gaming news site, preferably with shorter posts that I could use to improve my reading skills.

If you don't know, boost is appreciated.

amxmln, (edited ) to gamedev
@amxmln@mastodon.design avatar

Fellow people, I'm having trouble learning about good architectures for complex digital card games, where every card has individual effects, similar to Magic, Hearthstone, etc.

Have you ever built something similar? Do you know of any resources in that regard? 🤔

jakub_neruda,

@amxmln Oh! You're talking about a computer card game! I was thinking tabletop and how to design it 😃

You can perhaps use a Visitot pattern - your whole game is a data structure that can be traversed and each card (or rather effect) is a Visitor that can browse the scene and do transformation to it.

So each effect is its own class that can be slotted into cards. If you're using and entity component system, each card can also have traits that would allow your visitors to only traverse cards with those traits, making the boilerplate code that much simpler.

jakub_neruda,

@amxmln I tried multiple times and I always ended up making a total derivative of the games before.

My advice would be to start with a strong theme instead of generic fantasy, victory condition and a mana system. You can win by draining opponents lives to 0 like in HS or MtG or you can destroy 2/3 of their bases (Warhammer, Radlands). You can have 1 mana per turn (Epic), any card can be mana (WoW), broken mana system of MtG or lives can be also mana (Vampire the Masquerade).

Then define main factions within your theme and several subfactions. Each plays differently - token spawners, creature boosting, spell damage, growing creatures, stealing, traps, etc. Define a combo within each subfaction and make all cards contribute to that combo or to counter combos from other (but not all) subfactions.

Ofcs this is not the only way, but it can carry you pretty far. Try to not create effects that draw cards, it is always too powerful. Play tons of games to see how they do it.

jakub_neruda,

@amxmln I consider Refactoring Guru a good source on OOP design patterns: https://refactoring.guru/design-patterns/visitor

jakub_neruda, to gaming Czech

I am a huge fan of Metroidvania genre, but I never player a game before. But today I finished Aria of Sorrow and oh boy, how could I miss on such great game for so long?

While Zero Mission, Gato Roboto and Hollow Knight are still my top 3, the Soul system and the build variety reminded me of Dark Souls (as well as grinding levels to steamroll bosses).

What a treat!

ben, to random
@ben@mastodon.bentasker.co.uk avatar

deleted_by_author

  • Loading...
  • jakub_neruda,

    @ben Just to be sure - if I restrict my moq version to anything lower than 4.20, then there is no risk of putting this to my system, at least until I migrate to other mocking lib, right?

    jakub_neruda,

    @ben I just noticed that NuGetizer also uses SponsorLink (no wonder, it is from kzu as well).

    Let's hope Roslyn Analyzers quickly fix this hole that allows SponsorLink to exist.

    jakub_neruda, to programming Czech

    Tip 15 of - Mathematical constants in C++

    Since C++20, you can include header <numbers> and use many commonly used, precomputed mathematical constants like Pi, Phi, square root of 2 and 3, natural logarithms of 2 and 10, and many more! Even better, you can choose their precision by specifying the underlying type via a template.

    And since C++17, the <cmath> header contains some special math functions I've never heard of like cylindrical Bessel functions, associated Legendre polynomials, or Riemann zeta function.

    Constants are here: https://en.cppreference.com/w/cpp/numeric/constants
    Special functions are here: https://en.cppreference.com/w/cpp/numeric/special_functions

    jakub_neruda, to cpp Czech

    C++20 modules are now foolproofly usable in latest release of MSVC (v17.6.4).

    Standard library is precompiled automatically.

    CMake code is simpler, target_include_directories are no longer needed.

    It only took 3 years. Yaaay!

    jakub_neruda, to programming Czech

    Every single day convinces me more and more that IDisposable interface is one of the most disastrous things in C#. So easy to screw up in so many ways...

    jakub_neruda, to random Czech

    Did you know there is a Jurrasic Park Builder tycoon game for ?

    Despite it having no tutorials, it is really cool! There are 140 dinos to collect, an island to build your park on an you can manage everything from advertisement to burger prices to what they sell in the gift shop. There is no goal other than to survive as long as possible but I can see crafty players to just chill endlessly here.

    Sending out an expedition to find dino DNA
    Hotel management screen
    Park view with lots of visitors strolling through the park.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • JUstTest
  • mdbf
  • ngwrru68w68
  • modclub
  • magazineikmin
  • thenastyranch
  • rosin
  • khanakhh
  • InstantRegret
  • Youngstown
  • slotface
  • Durango
  • kavyap
  • DreamBathrooms
  • megavids
  • GTA5RPClips
  • tacticalgear
  • normalnudes
  • tester
  • osvaldo12
  • everett
  • cubers
  • ethstaker
  • anitta
  • provamag3
  • Leos
  • cisconetworking
  • lostlight
  • All magazines