How was game development done in C with no OOP? [closed] - c#

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
Coming from a C# background, I've been wondering for a long time about how game development was done in a intermediate language like C. A lot of the old games developed for systems back then were made in C, and one big difference between C and C# is that C# is OOP but C isn't.
When I found out about this in the past it always kept me thinking what approach was taken for game development in C ? In C# OOP is pretty much the main approach used in game development, so how was it done in C ? Game Libraries with OOP functionality ?
I've been reading that C can have OOP functionality written to it which makes sense seeing that we have C#, and a lot of programming languages at its core is derived from C.
How much different was the approach for game development? Also, disregarding things in C like hardware specific code and the rest of the intermediate language worries, how much harder was it ?
UPDATE
I'm looking for a general answer. Nothing too deep because I understand that this is too broad of a question. So let me narrow it down to...How does non OOP look in game development ? For example, How would drawing multiple objects of the same functionality look in C code

There too many points in your question to address, but I recommend watching this series In it, an experienced game dev builds a full game in C with no libraries.
In the grand scheme of things OOP is just an abstraction that sometimes makes things easier. In the really old days, developers would not even use C and instead would write in assembly for the specific system.

Related

Functional Programming in C# with Language-ext [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 1 year ago.
Improve this question
I have recently started working on a new DotNet Core project. I had noticed that someone (developer) used the Language-Ext library in this project. It was a new thing for me so I got to know that it is for Functional programming. It was quite confusing for me to understand it. I googled it and found benefits of it (Functional programming) :
Less Code (main point)
Easier Debugging
Easier testing
For a OO programmer, functional programming is quite different. So, my question is do we really need to use Language-Ext (functional programming) in C#? Are there any other benefits which I am missing?
So, my question is do we really need to use Language-Ext (functional programming) in C#?
If you want to do functional programming in C# you don't need LanguageExt, but IMO this is the best library for this use case.
Are there any other benefits which I am missing?
I'm biased because I use LanguageExt for some years now and it's my favourite library. If I create/edit C# projects without this library it feels a bit like working with an ancient C# version.
What more benefits are there?
Getting rid of (many1) bugs
Getting rid of much boiler plate code
Immutable data types
Avoiding side effects (easier parallel processing)
Easier refactoring
More type safety
Can be combined with non-FP C# code (use where useful)
Better refactoring skills (get another perspective)
LanguageExt creator Paul Louth created a great introduction showing some benefits:
https://github.com/louthy/language-ext
The library now has a lot more features and if you get into this (and functional programming at all) you will find many gems.
(On the premise that you want to stay with C# -- and not use F# or Haskell or ...)
"do we really need to use Language-Ext (functional programming) in C#?"
of course not; it looks like some people choose to do that; this is IMO a tiny minority of C# users. If you wanted to embrace functional style, you'd probably look at F# (while C# does offer some minor nods to functional programming, it isn't the speciality of the language). If language-ext adds just that bit more that you want... great? But this is entirely subjective and contextual.

Blender with C# instead of Python [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
Like you can see in the title I want to know if it's possible to use C# or any other language instead of Python for Blender.
from blender.org:
The scripting interface is only for Python. If you are interested in
digging in the source code, then you may have some usage for C++ too.
The main source is coded in C, but as I know C++ is used in some parts
of Game Engine. You can download the source code from Blender's
homepage, and see if you can follow it. (Personally I do not.)
There are some interesting closely related projects coded in C++, if I
remember right, MakeHuman is one such. This may be the environment
most interesting for you if you want to keep using C++.
Blender supports many fileformats for importing and exporting models.
Some of them can be utilized in your own projects, as I know, quite
easily by C++. In this case you would use Blender for modelling your
meshes and C++ for writing your own interface utilising your models.
Yet still, be open for new ideas. C++ is quite oldfashioned
programming language, complex, not very readable. That's the main
reason why people today prefer Python.
So your answer is no. there might be a support for c++ (the source code indicates so) but no support for C#.

how do I learn the foundations of programming [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I'm learning computer science at school (basic c#), I was very interested in this subject so I began to research on all the languages being used and just general things about coding. While reading one of the posts on this forum I saw an advice says "don't marry one language, learn the basic foundations of programming and then you will succeed with every language". what does "basic foundations of programming" mean, and do I need to learn specifically or it just comes with practice and learning other languages?
"Learn the basic foundations of programming" simply means to learn concepts, not languages. Languages come and go. It's easy enough to memorize the syntax of a single language and figure out through trial and error what each piece of code is doing in that language, but when you eventually move to another language, you're stuck repeating that process of memorizing code without ever learning what's going on with the code and why it works. This would be comparable to knowing how to operate a microwave without knowing why food comes out nice and hot after 2 minutes.
Many languages share common concepts and structures. A for loop, for example, appears in almost every programming language out there, but each language implements a for loop in a different way. However, if you learn the basics of what a for loop is, how it operates, and what it's basic purpose is, you can apply that understanding to every language you come across.
Even more basic foundations would be learning about concepts such as memory storage, caching, sorting algorithms, and boolean operators. These are all concepts that apply to every language and will improve your ability to effectively use a language if you have a firm grasp on them.
More basic than that would be learning about the computer itself. What is a CPU? What is RAM? If you understand the hardware of a computer, again, you can apply that knowledge to every language out there.
I started with visual basic years ago with the help of youtube tutorials. After that I was so interested in programming, that I attended a school with software programming as a main subject. In this school we started with Java and we learnt how object orientation works. After that I learned C and later on C++. Now I am programming in C#, Javascript and so on.
In my opinion, all you have to do is to be interested in learning programming and choose the language you like. It's true that after you are familiar with one language, you are able to change to another one since most of the time only the synthax differs from the language you've learnt.
If you start with C#, please don't start with graphical apps like WPF or WinForms. Try to start with console applications and try to learn the basics like object orientation, type casting and so on. As far as I know the Microsoft Virtual Academy provides a lot of free videos to get into programming. Just check some of them out.
Link: https://mva.microsoft.com/en-US/training-courses/programming-in-c-jump-start-14254?l=j0iuozSfB_6900115888
Good luck!

Is XNA a good place to learn 3d game programming? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
I want to explore 3D game development in XNA, but I'm curious if this is best for me. I haven't learned C#, but I want to explore my options before diving in. I have a lot of experience in the C programming language, along with some basics or minor experience in other languages. Which means that the object oriented framework that C# has may be a huge change from what I'm used to. I need to learn it anyways for future jobs and college, so this might would be a good incentive. I have programmed two games using the SDL 2.0 mixer and SDL 2.0 frameworks, which have given me a good basis of the knowledge of how 2D games are structured. I have learned about sprites, frame rate, event polling/handling, frame rendering, among other things. I am still highly lacking in mathematics related to game development and the physics behind it. That leads to my next point of concern if I do decide to learn XNA, is if it would help me more easily learn those things faster? Writing for my games in C, I was always having to write interfaces on top of interfaces, but at least I had to understand what I was writing. With C#, I'm concerned it would abstract most of the mathematics I really want to glean from it. You may ask that if I'm so concerned, why don't I just learn linear algebra and OpenGL/DirectX/whatever in C? Well, I'm hoping to avoid that, since even though I was able to make a decent game, I'm still very much lacking in how to do more advanced game development and code structuring. This was very obvious to me after working on one of my game projects for about half a year.
MS has ceased supporting XNA going forward. If you want to stick with XNA, have a look at MonoGame, which is an open-source version of XNA.

Linux Bioinformatics Tool [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 3 years ago.
Improve this question
I am looking to make a data visualization tool that will visualize biological data. I am used to being a C# and .net coder. However, as I understand it, you can run into trouble if you are running a C# app in ubuntu. Any suggestions for a language to use with these specifications in mind? I was thinking Java but am happy to take suggestions.
C# is a solid choice, especially if you already know the language. C# and the .NET framework have a solid cross-platform port with the Mono project and you can create Gnome UIs using the Gtk# bindings.
As an alternative, Java is used for a lot of bioinformatics applications. Though personally I have to say that most of those have horrible user interfaces and Java’s memory management seems ill-suited to deal with the data sizes that are common in bioinformatics – tools routinely run out of memory or become extremely slow. This isn’t necessarily an inherent problem of Java as much as sloppy programming, but Java certainly doesn’t help.
An alternative to Java would also be Python with a suitable GUI library (there are some good ones), especially since Python offers a much nicer, more polished syntax.
Yet another alternative that’s worthwhile especially if you’re really dealing with big data or if performance is important, would be C++ with Qt to build the GUI. Note that this will make development vastly more complicated if you’re not already proficient in C++.

Categories