Any programmers here?
At one time I had Linux on my desktop at work, Linux on my desktop at home, Linux on my laptop, Linux on the machines (hundreds and thousands of them) at work, and even Linux in my kitchen (on a Gateway All-in-One) for the kids to use for homework.
I got tired of the panicked phone called from my wife at 3 o'clock because the OS had updated automagically and now the video card didn't work anymore. I got tired of explaining why the web site the kids were assigned for homework didn't work not because Linux couldn't handle it, but because the page designer had somehow only tested it on Windows with IE.
My feeling is:
Apple has support for home users if you pay for support. Windows is great if you are a Windows OS certified admin, or work for a big company where they hire one (or a dozen or more).
Linux is great if you are a broke college student who has more time than money, or if you are a bachelor geek who is the only user of Linux, you break it, you fix it.
If you are a father of three, with a wife who wants things to "just work" you might do what I do: go with Apple. Especially if you have more money than time.
Especially now that IE is dead and Chrome is king.
Working for a company that lost many dollars and hours on Windows ransomware, I am not of the opinion that Windows is more secure than Apple MacOS.
And - iPhones work better with Apple computers. If I want to develop code for iPhones I can do it on a mac Laptop better than on Windows.
And my Mac Laptop can run Linux in a vm, and Windows in a vm (if I pay for Parallels) and can run VisualStudio in Windows in a vm (if I am willing to pay for it). And it is much easier to install FOSS from Linux on Mac OS with brew than it is to install on Windows with Cygwin (but Windows with Cygwin isn't bad).
But if you LOVE Windows or you LOVE Linux please go on loving it.
I don't want a OS war.
Thank you for your commonsense. I agree with almost all your sentences.
techstepgenr8tion
Veteran
Joined: 6 Feb 2005
Age: 45
Gender: Male
Posts: 24,490
Location: 28th Path of Tzaddi
Something really neat that Stephan Mischook posted recently. The part that really caught my attention is the energy use chart in around 7:04, where Stephan was reading AWS's statement about the low energy usage of Rust and C compared to other languages. The chart compares languages in terms of amount of power used in comparison to C and found Rust to be 1.03x, Java at 1.98x, C# at 3.14x, Javascript at 4.45x, Typescript at 21.5x, PHP at 29.3x, and getting into the insanely bad - Ruby at 69.91x and Python at 75.88x:
_________________
The loneliest part of life: it's not just that no one is on your cloud, few can even see your cloud.
This is my hobby project, "People's Conquest": https://imgur.com/M02Nn1O
It is inspired by "Strategic Conquest," a nostalgic favorite of mine from the 1980s (I doubt its as good as I remember).
Here is the original: https://en.wikipedia.org/wiki/Strategic_Conquest
So, my graphics aren't great but its the best I could get with my budget and skills. I hired an artist that does a little work here and there for the little money I pay here and there.
My primary target is iOS, but in the short run it will be a free game on Mac on itch then I may put it on Mac App store.
I am 39 and work in an unrelated field. I started this about 5 years ago when I took a job that ended up being awful but I couldn't easily quit. I ended up staying nearly 4 years there and survived it by taking my personal laptop to work and finding about 90 minutes per day to work on it. I'd straight up go to my car in the parking garage sometimes and just work on it. That company doesn't exist anymore so I don't really feel guilty about not taking that job seriously.
Strategy games are code heavy. So, I didn't make a game, I made a strategy game engine of sorts and actually this is the second game. Its hard to draw the line between mod/scenario/new game. Both use the same grid map, but use it in different ways. The short version of why I chose a grid map like this is each tile is actually divided into a 3X3 internal map and that enables buildings that block movement such as walls.
In my opinion, what this has taught me is that there is a huge difference between merely programming and building a product. A product requires marketing/market research, a creative director, a tester - and none of that even gets to who actually makes it.
When it comes to making it, you have to be all things to the programming project. Normally, people who are good at front end aren't good at back and vice versa. I am awful at GUI programming and really struggled initially with it. I got better but its still a significant limitation.
For strategy games, it takes more than programming. You have to have a mathematical model of the game. My day job actually plays into that and the combat odds calculations are heavily inspired by the math in my day job. I work in banking/finance and the risk of a loan is derived from its expected loss calculation, which is conceptually identical to combat odds in war strategy games.
For AI I was also inspired by other aspects of my industry and borrowed the concepts from the techniques used to flag fraud in customer accounts. However, with game AI the emphasis is on how you implement it.
Comparing game programming to regular software development, proper game programming patterns involve maximizing the ability to make changes as fast as possible. This is necessary to retreat from bad decisions and to try out new ones. If its hard to make changes to the game, you will end up sticking with bad game design decisions longer.
So a key design pattern is to put as much of what makes the game a game into text files that are read upon launch. Think of it as a giant preference file, but as you expand on it you end up with a bunch of files.
The codebase is about 230,000 lines of Objective C/C code. Apple's environment strongly encourages you to use Swift but I started this before Swift became significant so I started with Objective C for the front end that calls a C back end. My hope someday is to make it multiplatform but I am not prioritizing that because if I can't sell 1,000 copies on iOS I highly doubt its worth porting.
What the code basically does is read the text files and configure the rules and display from what the text files say. The text files can reference folders for graphics and also sounds. So I can add graphics and sounds in a lot of things without recompiling or even opening the project.
I am playing the long game and have designed the project so that I could do this on the side for my entire professional career. My day job is pretty good and I have no complaints but there isn't really any more "up" to my career. I hit the autistic ceiling about three years ago so I have zero shot at management (nor do I want that, that would be awful).
This is the only thing keeping me from losing hope.
My suggestion is to not focus on languages - people who mention the languages they know aren't giving the flex that they think it is. Design patterns matter more and a competent programmer should be able to copy the same successful design pattern into other languages without too much difficulty. Even one they do not currently know! It will take you longer to learn best design practices than it will for you to learn a language after you have learned a decent one like C, Java, C#... but I am very partial to plain ol C.
A competent programmer should also be able to write code in a language so that a programmer in another language could read the code and roughly know what is going on. That gets accomplished by descriptive variable and function naming.
Regarding C++ and object oriented programming - the only thing worth it about OOP is the ability to interact with others' code. Thats it. I suggest using as little OOP in your own code as you can. I am partial to Objective C because I call it "OOP without the need to know what OOP really is." Its also a superset of C, which is very convenient.
Use a data oriented approach.
I would even double down on this and say when you make a struct, make it generic. An early design pattern I did was this:
I would make a player struct in C that contains info about the player. Like for example,
struct playerData
{
int player_id;
char *player_name;
float player_strength;
};
Right, pretty straight forward right? And that design pattern makes sense when you are trying to make one game.
But if you want to make a codebase that can handle different scenarios, mods, or maybe even be a full blown engine with its custom script...
You only need one struct to rule them all, for all your game related information.
struct genericVariableList
{
char **int_variable_names;
int *int_variables;
int count_int_variables;
char **float_variable_names;
float *float_variables;
int count_float_variables;
char **string_variable_names;
char **string_variables;
int count_string_variables;
};
Whoa, now how do you work with this?
The answer is in those text files.
You write the C code to read the text files and it parses them, and the text file will say this:
begin_node
priority 1
condition
probability (1)
end
int_var (Gold,100)
float_var (Respect,0.0)
end_node
So this is my custom script. The C code parses it, and evaluates it. There can be many nodes, and this is a behavior tree. But this is just a short example. What this is doing is with probability 100%, it is evaluating this node as true. This is a "terminal node" when this behavior tree file is called. BTW, I use behavior trees for everything. It greatly increases your ability to drastically change game behavior without recompiling.
Anyways what this node does when executed, it creates an integer value called "Gold" and adds 100 to it. By the way, whats it adding to? Well any object that calls the behavior tree! Because all objects have the same generic struct, any object in the game can call that script and get this variable added to it. It enables you to create different game objects - think a character that has different images, game attributes, name, etc - without messing with the C code. I can create a new character/whatever in text files, and then create a behavior tree for something like init or interaction, and it will call that when that happens.
It also creates a float variable called "Respect" and assigns it a 0.0.
The C code reads this action in when the node is evaluated and knows to check if the variable exists first, then sets it to that. The function call looks like this:
addIntVarGeneric(&inEntity->variable_list,var_name,value);
Because each game object gets this generic structure and the behavior trees can act on all game objects - the data of the game is divorced from the internal C code. You could search "Gold" all you want in the source code and you will never find it as a variable. But when you play the game - there it is!
See how this design pattern makes the choice of C language irrelevant? I could rewrite the game code in Python and the text files that contain what makes the scenario unique do not need to be changed at all.
C is a great language to learn - people get scared off by pointers and it is extra work. But see how if you use generic variable lists in a lot of things it greatly reduces the problem? You only have to write about 100 lines of C code to handle the memory management of it and once you get that right, you got that right forever. The pain that is C memory management is vastly overstated. In return, you get a language that lets you do whatever you want without considering if you even should.
It is inspired by "Strategic Conquest," a nostalgic favorite of mine from the 1980s (I doubt its as good as I remember).
Here is the original: https://en.wikipedia.org/wiki/Strategic_Conquest
So, my graphics aren't great but its the best I could get with my budget and skills. I hired an artist that does a little work here and there for the little money I pay here and there.
My primary target is iOS, but in the short run it will be a free game on Mac on itch then I may put it on Mac App store.
I am 39 and work in an unrelated field. I started this about 5 years ago when I took a job that ended up being awful but I couldn't easily quit. I ended up staying nearly 4 years there and survived it by taking my personal laptop to work and finding about 90 minutes per day to work on it. I'd straight up go to my car in the parking garage sometimes and just work on it. That company doesn't exist anymore so I don't really feel guilty about not taking that job seriously.
[ . . . ]
This is the only thing keeping me from losing hope.
I think is is great you have a side project to keep you happy and creative even if your job is not so interesting.
_________________
ADHD-I(diagnosed) ASD-HF(diagnosed)
RDOS scores - Aspie score 131/200 - neurotypical score 69/200 - very likely Aspie
● parallels.com - Tips - Windows on Mac - Visual Studio
Visual Studio for Mac:
How to Get Microsoft Visual Studio on Mac
Let's face the facts, while the operating systems and tools available on Microsoft have the edge in the business world, they still haven't bested the hold Apple's ecosystem of products has on our hearts. We simply love our MacBooks, iPads, and iPhones.
This divided love has led to most of us living double lives. We know so many of you in the software industry are victims of this and have had to use Microsoft at work and Mac everywhere else. Visual Studio is an excellent example of this. Even developers who live by and large in Apple's ecosystem know the value in the years Microsoft has spent refining, running, and upgrading this tool.
However, technology is an ever-changing entity. Parallels Desktop is a virtual machine dedicated to having both systems in your life. It concurrently gives you the efficiency of Microsoft's Visual Studio and the seamlessness of Mac machines.
Why you might want Visual Studio on Mac
Virtual Machine technology lets you run Windows PC on your MacBook without losing any functionality. Many people are concerned about the toll running two operating systems will have on your physical device's resources. You'll be pleased to know the extra performance needed to run your virtual machine—in our case, Parallels Desktop—is low.
This guaranteed smoothness results from the inventiveness of the virtual machine and the competency of Apple's systems. The hardware and software of Apple components and how they collaboratively work in your Mac is a work of art; you can thank your Mac's drivers for this.
There are a couple of financial considerations to have in mind if you decide to go through this route. Parallels Desktop has purchase and subscription costs. Additionally, there's the Windows license to consider. Yet, these expenses pale in comparison to buying a new machine just to run Visual Studio.
How to get Microsoft Visual Studio on Mac
A lot of Windows applications like Visual Studio aren't normally supported by Mac computers. While there are similar and native compilers on Mac like Visual Studio Code and Xamarin Studio, the most convenient and efficient way to run Visual Studio on your Mac is by using Parallels Desktop for Mac.
Mac's Parallels Desktop allows you to run Windows and Windows apps simultaneously with Mac OS. You will not need to reboot your computer as with Apple's Boot Camp. We know you can't wait to begin programming on your Visual Studio for Mac, so let's get to how you'll achieve this.
1. Purchase Parallels Desktop. There are several packages available to choose from depending on the specs you require from your software. There's the pro edition, standard edition, business edition, and the student edition, which comes at a subsidized cost.
2. Next, install the Parallels software. The process is pretty straightforward. Open the app once the installation is finished.
3. Parallels Desktop has been designed to automatically detect your system needs so that you're up and running in mere moments. You'll be directed to download and install Windows 10 if you require Windows. An Intel-based Mac will, however, need you to use your Boot Camp installation.
4. We've finally gotten to the good part: downloading Visual Studio. There are a couple of versions available to you that vary depending on the scope of use. Visit the official website to check your options; pick the Community option for the free use of the Visual Studio environment.
5. As the application will run on the native Windows platform, you'll be pleased to know the Visual Studio installation will also be quite direct. The installer automatically completes the installation. That's it! You can now enjoy a smooth Visual Studio experience on your Mac.
Takeaway
A majority of developers around the world trust Visual Studio to develop programs, and for good reason. The improvements made to it over the years, including adding more languages to program with and incorporating developer requests, make it the best Integrated Development Environment (IDE) around.
While you may buy a new PC if you wish to enjoy both the Mac and Microsoft worlds, it is unnecessarily costly. Why not use the fluidity of Parallels Desktop and have the best of both worlds? Check us out today for a free trial download
_________________
ADHD-I(diagnosed) ASD-HF(diagnosed)
RDOS scores - Aspie score 131/200 - neurotypical score 69/200 - very likely Aspie
Windows on a Mac
Butterfly
Joined: 13 Dec 2022
Age: 21
Gender: Female
Posts: 13
Location: United Kingdom
Programming is one of my main hobbies. I know a few languages, but the ones I’d say I’m the most skilled in are Python, Java and C#.
I have a love-hate relationship with the C family though. I want to become better at them (especially C# and C++ since these are some of the most commonly used languages for game development - my dream job! ) but they are just so complicated!