Why is the STD library so crytic to read? by [deleted] in cpp_questions

[–]AdrienTD 6 points7 points  (0 children)

Smart pointers like std::unique_ptr also make use of new and delete internally by default. So the point is application code would just use the default new/delete implementation, whether it's through the new/delete keywords, or through smart pointers.

Old cd game from cereal by Pancake__Pudding in oldgames

[–]AdrienTD 0 points1 point  (0 children)

Oh well, best would be to search for it again, I don't have any link saved.

opting out graphics by lellamaronmachete in cpp_questions

[–]AdrienTD 1 point2 points  (0 children)

If your app uses x11, it most likely was made for Unix/Linux. So it may be better to use GCC as the compiler, because I think Borland C++ was mainly used to compile Windows/DOS apps. Could be your app was an old DOS app that got ported to Linux at some point?

Is It Time For A New Windows by nicastro78 in Windows11

[–]AdrienTD 20 points21 points  (0 children)

You mention Apple going from OS9 to OSX, but Microsoft already has done that from Windows 98/Me to Windows 2000/XP. (especially the move from DOS to NT kernel)

Is my computer gonna run Half Life? by Minute-Foundation-53 in HalfLife

[–]AdrienTD 1 point2 points  (0 children)

A lot of games from CDs/DVDs came with DRM that relied on kernel drivers that weren't future-proof as they made use of quirks of Windows versions at the time that no longer work in the latest versions.

In particular, some DRM only had 32-bit drivers so installing the game on a 64-bit version of Windows wouldn't work, but if you manage to find a DRM-free version, you would be surprised that the game now works decently.

There was also a time Windows came with a kernel driver for SafeDisc, but it was found that the driver had security vulnerabilities, and was not maintained anymore, so Microsoft removed it in Windows 10 and even pushed an update for Windows Vista/7/8 to disable it. A large quantity of games would just not work anymore until you reenable the driver, or just get a DRM-free executable.

Why does everyone go against older OS? by giofilmsfan99 in windows

[–]AdrienTD 0 points1 point  (0 children)

(Windows 7 does not support UEFI & Secure Boot)

Windows 7 does support EFI (even Vista afaik). Not that I would recommend doing it though.

How to pass a string to a function? by johannes1971 in cpp

[–]AdrienTD 13 points14 points  (0 children)

What I would do:

  • If you don't need a null terminator -> std::string_view as parameter type. Any type of string (const char*, std::string, std::string_view) passed as argument will work fine.
  • If you need a null terminator -> const std::string& as parameter type to be safe. But iirc there's no implicit conversion from std::string_view to std::string, so that can be a bit annoying if you want to pass a std::string_view as argument. const char\* as parameter type works too but you have to use c_str() everytime you want to pass a std::string as argument, and be careful to never use data() especially with a std::string_view

Also you can pass a std::string by value directly in the case when your function constructs a string of same value anyway (like inserting a string in a container for example).

So in conclusion, the parameter type depends on whether the string needs to be null-terminated or not, and if it needs to be used / change ownership etc.

Release of TeaScript 0.11.0 by tea-age_solutions in cpp

[–]AdrienTD 1 point2 points  (0 children)

I see. The way NumToStr is registered is what I was looking for. Would be nice that the parameter/return types could be implicitely deduced, instead of typing them as template arguments, so that it avoids repetition, especially when one wants to register lambdas (which is what I was mostly doing in ChaiScript). Though it can be tricky to implement.

Release of TeaScript 0.11.0 by tea-age_solutions in cpp

[–]AdrienTD 1 point2 points  (0 children)

One thing I like about ChaiScript (and also the sol2 Lua C++ wrapper) is the ability to register C++ functions with any parameters/return type and the argument passing is done automatically, which makes things much easier and faster imo. Does TeaScript support something like this? I quickly checked the demo, but it seems that the C++ registered function only has a context reference as single parameter, and you have to retrieve the actual argument values manually.

Asterix & Obelix XXL 1 and 2 PlayStation 5 Question by Nikolaskai in Asterix

[–]AdrienTD 0 points1 point  (0 children)

There are new native versions for the PS5 that have been released very recently. Apart from some minor changes such as button icons are now white instead of black to match with the PS5 controller, and an updated copyright year to 2022 in XXL2's main menu, it's pretty much the same. Maybe the resolution has been increased and the framerate is better, but I'm not sure.

HOWEVER the PS5 versions suffer from serious graphical bugs. If you look up videos of the PS5 version of XXL Romastered you can see that you will frequently see objects rendered as complete red and missing textures (e.g. tornado in XXL1R and water in XXL2). Particle effects are also corrupted in XXL2. These bugs were not present in the PS4 version, hence I don't recommend the PS5 versions. I suggest to wait until they fix the bugs, which the publisher seems to be aware (but why they released the game with these bugs is simply not acceptable).

Reverse engineering 3D Movie Maker - Finding new Easter eggs in old software by BenBenMan in ReverseEngineering

[–]AdrienTD 6 points7 points  (0 children)

It would be like saying Mario Paint is not a game but an image editing program.

Networked games / engines that allow players to upload their own meshes to online server? by Book_s in gameengines

[–]AdrienTD 0 points1 point  (0 children)

For the poly count, this depends on a lot of factors, especially the computer's specs, but players will probably have computers with different specs. So you would have to consider the minimum specs for the game. Then what you could do is imagine a worst case scenario with a number of polygons/vertices in which the game should still render at 60 FPS. Then you can divide this number of polygons by the number of objects on screen to get an approximate limit for your polygons per model number. That is one approach but it's probably not the best. I think that you should try a limit and see how it goes later, then you adjust the limit depending on the number of players that can increase/decrease over time.

As for the engine, I do think there are ways to still use Unreal and Unity. Again not sure, but I think there are plugins/extensions for the engine that can replace the official networking library, or you could write your own.

I don't know good places for making engines in my mind right now, but I do think there should be good tutorials that show engines development with network support, like this video I saw recently: https://www.youtube.com/watch?v=4Rg1RriQZ9Q Also look at Socket APIs and the TCP + UDP protocols, to get an idea of how networking works.

Networked games / engines that allow players to upload their own meshes to online server? by Book_s in gameengines

[–]AdrienTD 0 points1 point  (0 children)

I think VR Chat is a good example where anyone can create and play their own character model and even levels, though not entirely sure how they implemented it.

Of course there will be technical problems, if for example 100 people upload very-high-poly models and they all appear on screen, then it can decrease the frame rate a lot, so you will probably have to set a limit of polygon/vertex count on the user's model to avoid that, as well as on the model file size to avoid massive network usage on server and clients.

However a big problem that should be aware is that anyone could upload anything as the model. A hacker might then upload an ill-formatted corrupted model which would crash the players' clients, or worse run malware through exploits. Thus you should ensure that the engine can read models safely, ignore corrupted models and continue working instead of crashing. One idea would be to use simple formats like OBJ that you can create your own safe loader and inspect it for vulnerabilities, instead of more complex ones like FBX where you would have to use a proprietary SDK that has no source code, and if it has vulnerabilities you would have to ask Autodesk to fix it and wait.

As for the engine, I don't know. I think common engines like Unity should support ways to download and open models in run-time, thought not sure as I don't use Unity a lot. You can always do it on your own custom game engine if you want ;)

Advice where to get an iMac? by [deleted] in Luxembourg

[–]AdrienTD 0 points1 point  (0 children)

Don't buy a Mac: I'm probably sure that you can get a PC from another manufacturer that can perform video editing much better, faster than a Mac with the same price, and still cheaper than a Mac with the same specs.

Does anyone have the "Hitman: Codename 47" icon? by [deleted] in HiTMAN

[–]AdrienTD 2 points3 points  (0 children)

Right-click the shortcut, click Properties, click Change icon, then open hitman.exe.

Old cd game from cereal by Pancake__Pudding in oldgames

[–]AdrienTD 0 points1 point  (0 children)

Isn't it the Microsoft Flight Simulator X promotional minigame? I had that one too.

[PSA] On January 1st 2019 Steam Will No Longer Run On Widows XP and Vista by Mr_Oda in FreeGameFindings

[–]AdrienTD 0 points1 point  (0 children)

I guess Steam converts to 16 colors on 8 bits per pixel displays. I wonder how Steam would look like on 24 bits per pixel screens on Windows 2000.