Users browsing this thread: 7 Guest(s)
Gamedev Lounge 0010
(02-02-2013, 11:33 PM)EpicEbilninja Wrote: pretty soon I'll have to take my simple mind, and learn advanced c programming to make a homebrew game for the ds Blank

I still can't even make a working game yet Sad


I'm not too bad with gamemaker, but it does a lot of the hard work for you like actually running the game...

although the games I currently have published on yoyogames are rather outdated and lazy...

Game Maker's pretty beast dude, don't underestimate it. Tongue

My Pixel Art editor, as well as my games are all made with Game Maker Studio, and all my pixel art is done using their built in sprite editor. ;D
Thanked by: Mr. Jam
(02-02-2013, 11:33 PM)EpicEbilninja Wrote: pretty soon I'll have to take my simple mind, and learn advanced c programming to make a homebrew game for the ds Blank

I still can't even make a working game yet Sad

I'd reckon going from "hasn't shipped a full game" to "DS homebrew" is missing a step or two inbetween.

I'd reckon you'd be best off trying to make a game on the PC first as it'd likely be easier, especially if you use a higher level language than C. Once you have that aside, I'd say try taking a crack at DS homebrew since by then you'd have less overhead to worry about.

I'd recommend trying to use C++ at the bare minimum, C has some... er, fun little quirks about it.
Thanked by: Mr. Jam, Mag
I havn't spent too much time to learn a lot about development with c, I'm actually still learning how to write a "makefile".
It's not that I don't understand the logic behind it, it's that I'm still in the process of learning the language, and how a lot of it works.

I will be making a few practice games before actually making any kind of project first, but I do plan on working with c in the near future Smile


And really, part of the reason I plan on working with ds homebrew rather than gamemaker, is to play the game on the actual system. It would be very well worth the effort to learn different programming languages to play a fangame on the console the original was played on Big Grin
Thanked by: Phaze
I think you'll quickly find that C alone isn't a powerful enough tool for the job. It gives you a lot of flexibility (exchange for things like type-safety, so be careful), but there aren't many ways to achieve it. C++ is usually used for this sort of development simply for its capability to use objects, and for the bit of extra power layered on top of the minimalist C.
Thanked by: Phaze, Mr. Jam
Yes, looking into it a little further, I guess I was getting ahead of myself, and jumping to conclusions
There is the same amount, if not more .cpp files than .c in all the examples I looked in...
Thanked by:
(02-04-2013, 08:11 PM)EpicEbilninja Wrote: And really, part of the reason I plan on working with ds homebrew rather than gamemaker, is to play the game on the actual system. It would be very well worth the effort to learn different programming languages to play a fangame on the console the original was played on Big Grin

I can definitely understand that desire well. I have similar, albeit different "up there" goals but I don't think I'm anywhere near the position to realize it yet as it requires me knowing 3D programming. I technically haven't even mastered 2D yet Tongue
Thanked by: Mr. Jam
(02-05-2013, 03:33 AM)Hoeloe Wrote: I think you'll quickly find that C alone isn't a powerful enough tool for the job. It gives you a lot of flexibility (exchange for things like type-safety, so be careful), but there aren't many ways to achieve it. C++ is usually used for this sort of development simply for its capability to use objects, and for the bit of extra power layered on top of the minimalist C.

You can make very complex games with C. You can make very complex data types and structures with C. You can even make something as similar as it gets to a C++ class in C using structs and pointers.

if you are going to make teh super l33tzor game engine with scripting language and all the bells and wistles, yeah sure, go with C++. For a beginner you are going to have to learn C anyway.

for most of the kinds of sprites found on this site, C is more than enough to make a game around them. C++ makes it only slightly easier, thats all.
You do the same thing, you aren't doing it better.. well yes you are. But you are still going to have to learn C first.

And EpicEbilninja, stop wasting your time learning Makefiles, get an IDE and start coding. The last thing a noobie should be doing is worrying their heads with all the back end crap. Trust me I was there, thinking about HEX, Opcodes and Assembler. Just focus on coding and the rest will come.
Thanked by: Phaze
(02-09-2013, 11:15 PM)Ailit Wrote: You can make very complex games with C. You can make very complex data types and structures with C. You can even make something as similar as it gets to a C++ class in C using structs and pointers.

Sorry, my post wasn't worded very well. I'm aware that complex programs, including games, can be made in C alone. It is a Turing Complete language after all. I was trying to get across that C++ is much more suited to this kind of development, as OOP and games go very nicely hand-in-hand. I'm aware you can do something similar in C with structs and pointers, but it's at a much lower level of abstraction, and only serves to confuse the issue (as well as running the risk of your implementation being less efficient).
Thanked by: Phaze, Bombshell93
(02-10-2013, 04:19 AM)Hoeloe Wrote: Sorry, my post wasn't worded very well. I'm aware that complex programs, including games, can be made in C alone. It is a Turing Complete language after all. I was trying to get across that C++ is much more suited to this kind of development, as OOP and games go very nicely hand-in-hand. I'm aware you can do something similar in C with structs and pointers, but it's at a much lower level of abstraction, and only serves to confuse the issue (as well as running the risk of your implementation being less efficient).

The issue would arise when the aspirations of the game come into question. If it's a fairly straight forward game like snake or pacman; whether you code it in C or C++ the results are going to be exactly the same, and the code will probably be too.

Now, I will agree that making a game even as 'simple' as a platformer will be much easier in C++. Instancing is something that comes almost second nature to classes and to bigger more ambitious games. You want to focus on 'when' objects get destroyed not 'how' to destroy them. Think more about the games logic than having to manage memory and pointers. That is the reason I think people recommend C++ over C for game development; memory is managed real nice like. Instead of using a
Code:
struct game_obj *player = malloc(sizeof(struct game_obj));
and then when the player dies
Code:
free(player);
player = NULL; //you better make sure player isn't pointing to an object that doesn't exist in RAM
In C++ look at how simple it is
you can simply say
Code:
class game_obj player();
and when the player dies
Code:
~player();

Hoeloe is right about C++ but there are going to be moments when you can only use C. For example, homebrew on obsolete consoles. Most cross compilers only offer C. You are going to have to manage your objects the good ol' fashion way.

I'm a sucker for low level hardware interfacing though; pointers turn me on.Tongue That feeling of knowing at any time you could have a memory leak or a pointer pointing to dangerous memory locations; imminent crash makes me moist. Smile
Thanked by: Phaze
I've done more research into how to choose a programming language than I really should have and I've talked to quite a few people who have worked in the industry (although I never have myself) whats generally said is the key to developing a game is being comfortable with your tools and developing fast, this is probably because of the brutal nature of AAA game development process, (tens to hundreds of people working in a confined space with unpaid overtime to create a finished product still with half the bells and whistles mangled or missing by release.)
I've heard both ends of the spectrum, this is both why C++ is used and why it should not be used. Though I don't know the exact details typically C++ is used because thats what the engines are written in, code already written in C++ they've been expanded in C++, morphed around C++, and it would be far too much work to drop it all for another language, its not because C++ is better, its just plain easier.
The reason C++ should not be used is .NET languages / Java are easier to used, and a large amount of developers agree a development environment built around such languages could easily match the speed or beat the speed of C++ (given the intended platforms are optimised for such languages, which sadly, they're not.)
The migration is slowly being made, XNA was a chance for this but XNA wasn't exactly a port but more of a wrapper of DirectX and once again, platforms aren't being optimized for such languages, mobile devices are helping this most, but in the big scheme of things that doesn't mean much, people won't look at a mobile game and say "that looks pretty cool, shouldn't we be playing with that stuff for the machines with 10 times the power?" it just sounds silly on the face of it to compare them, but its what SHOULD be done.
To put it in a nutshell, C++ is used because the newer development environments are C++, the newer development environments are C++ because the older are C++.
its a nasty cycle, but as far as the already built stuff goes there's no reason to tear down and start again.

TL;DR?
despite popular belief you don't need to know lower level languages like C++ / C to get into game development or even into the industry of AAA Games. C++ isn't necessarily bad but from word of people much smarter than I, its not going to be the future. If you want to get into the game industry its not a bad skill to know C++, but I see a lot of people with the "Common Knowledge" that its the god language which you need to know to do anything, when it very much is not.
If you want to make a game the key is fast and smooth development, learning a new language isn't often smooth, so if you know a language which your happy with and does not give you significant performance bottlenecks, stick to it, its all you need.
Thanked by:
(02-10-2013, 09:00 AM)Bombshell93 Wrote: I've done more research into how to choose a programming language than I really should have and I've talked to quite a few people who have worked in the industry (although I never have myself) whats generally said is the key to developing a game is being comfortable with your tools and developing fast, this is probably because of the brutal nature of AAA game development process, (tens to hundreds of people working in a confined space with unpaid overtime to create a finished product still with half the bells and whistles mangled or missing by release.)
I've heard both ends of the spectrum, this is both why C++ is used and why it should not be used. Though I don't know the exact details typically C++ is used because thats what the engines are written in, code already written in C++ they've been expanded in C++, morphed around C++, and it would be far too much work to drop it all for another language, its not because C++ is better, its just plain easier.
The reason C++ should not be used is .NET languages / Java are easier to used, and a large amount of developers agree a development environment built around such languages could easily match the speed or beat the speed of C++ (given the intended platforms are optimised for such languages, which sadly, they're not.)
The migration is slowly being made, XNA was a chance for this but XNA wasn't exactly a port but more of a wrapper of DirectX and once again, platforms aren't being optimized for such languages, mobile devices are helping this most, but in the big scheme of things that doesn't mean much, people won't look at a mobile game and say "that looks pretty cool, shouldn't we be playing with that stuff for the machines with 10 times the power?" it just sounds silly on the face of it to compare them, but its what SHOULD be done.
To put it in a nutshell, C++ is used because the newer development environments are C++, the newer development environments are C++ because the older are C++.
its a nasty cycle, but as far as the already built stuff goes there's no reason to tear down and start again.

TL;DR?
despite popular belief you don't need to know lower level languages like C++ / C to get into game development or even into the industry of AAA Games. C++ isn't necessarily bad but from word of people much smarter than I, its not going to be the future. If you want to get into the game industry its not a bad skill to know C++, but I see a lot of people with the "Common Knowledge" that its the god language which you need to know to do anything, when it very much is not.
If you want to make a game the key is fast and smooth development, learning a new language isn't often smooth, so if you know a language which your happy with and does not give you significant performance bottlenecks, stick to it, its all you need.

Nah, I'd say C is the God language. It's what everything else is based on. Some languages don't only copy it's syntax they actually are written using C like Lua for example. I don't think C or C++ are going anywhere for a long time. C is still the engineer's choice language when interfacing with hardware; and more and more API's are based on it (because it's stable) OpenGL, CUDA and OpenCL for example. And I dare say these API's are the future, so their foundation isn't going anywhere.
Thanked by:
but my point is that relates little to game development.
the engineers of graphical API's need to stick close to the hardware (in this case CUDA and OpenCL I'm counting as graphical API's as they do heavily interact with the graphics hardware.)
Massive performance is not needed for games themselves, but rather their physics and graphics, which both run on the graphics device through said API's in ideal systems, so the need to get down and dirty is not there in game development.

My point was Game Engines of which use hardware API's are written in C++ because they always have been, but more and more C++ is becoming obsolete, it can be a chore to work with at the best of times, the chore to which is fixed in slightly higher level languages, fixed so well in fact that in most cases significantly smart use of C++ is needed to outperform it, of which would eat into development time.

C++ isn't necessarily bad, everything built on it in the industry is doing well, it doesn't need to go away. But if platforms (Consoles specifically) were to be designed with just for example the .NET framework in mind, engines built aimed at the platform would develop faster and cleaner, because of easier to understand conventions it would be simpler to work in groups, with less lower level access the underlying systems to said platforms can run safer (such was microsofts mentality with XNA) and thanks to simple stack tracing a memory managing, pin-pointing and eradicating bugs is also a lot easier, all in all it would make game development easier and faster (which by extension would make it cheaper)

This is just my opinion and for all I know if this were to happen it may not make such an impact, but I think this would be the next big stride in game development, first it was more processing power, then it was the rapid advancement of 3D, recently its been mobile gaming and I think the next step to change the industry will be a jump from C++ into slightly higher level languages, its better for developers, studios, publishers, engineers, hardware developers and ultimately the end user.
Thanked by:
(02-10-2013, 10:27 AM)Bombshell93 Wrote: /*Bombshell93's argument*/

I wouldn't agree so much, I think whatever you get good at, you're good at. If you get good at C++, it is easy for you to dev in that language. I've never had an issue finding a bug using C++, rather when I was starting out using GameMaker it would take forever to find a bug because the debugger was(is) poop.

C++ is not hard to understand or complicated. That would be like saying "Because I don't understand Spanish it must be too hard to communicate in it; lets dead that language and use English"

If you take the time to learn it, it will be just as easy as everything else you already know. Things you don't understand will always be hard, because you don't know them.

What I'm trying to say is that the difficulty in learning curve people attach to C++ is ill-merited and relative to what they have already learned with other languages.

The beautiful thing about C is that since so many languages copy it's syntax, once you learn it, it's a snap learning any other language based on it. Like learning a romance language makes it easier to learn the rest (Spanish, Portuguese, Catalan, Italian, Latin share many words)

It doesn't make developing any harder than if you were using a language like C#. Like spriters that work in MSpaint can do the same thing I do in Photoshop because we have both gotten good with the tools we use. It would be hard for me to make my quality sprites in MSpaint because that is not my tool, but I use Photoshop which allows me to do sprites but many other things too if I wanted to. Same with programming languages.
Thanked by:
(02-10-2013, 11:16 AM)Ailit Wrote: It doesn't make developing any harder than if you were using a language like C#. Like spriters that work in MSpaint can do the same thing I do in Photoshop because we have both gotten good with the tools we use. It would be hard for me to make my quality sprites in MSpaint because that is not my tool, but I use Photoshop which allows me to do sprites but many other things too if I wanted to. Same with programming languages.

Languages have their usage. C and C++ provide a much greater level of direct control in things like memory than languages like C#. I'll discuss C and C# here for comparison. C has the benefit that all of its operations are more or less atomic and consistent. Because of this, you can be sure that a program written in C will execute in a given time, especially if you try hard to make it do so. Because of this, C is used in embedded systems, particularly those that need real-time computation (such as nuclear reactors or aeroplanes), and not just those that run on pseudo-real-time (i.e. video games).
C and C++ are not ideal for such pseudo-real-time systems like games. The reason for this is that in a project like that, stability and quick production are more important than raw control and power. C# is a better choice (and a lot of people are moving towards this. XNA was a flop, but other tools are popping up that do support C#, such as Unity), because it allows for faster and neater code creation, and the extra levels of abstraction mean that time isn't wasted on the part of the programmer ensuring that every piece of memory is secure, and doesn't leak.
There are reasons that C and C++ won't die out, it's true, but video games are not one of them. It's not to do with them being harder to use, it's to do with other tools being better suited to the task.
Thanked by: Bombshell93, Ailit, Phaze
I didn't say it was complicated and I agree if you get good with it, it can be easy to use (kind of the definition of "get good"), I've not used it as much as other languages but I've used it enough to understand it,
BUT the workflow is significantly cleaner in other languages, there are many conventions to using C++
I've seen at least 3 "standards" considered "standard" which quite frankly when working in teams as is common in the games industry, becomes a problem, this is fixed by lots of commenting of course but thats another chunk out of dev time spent explaining whats been done.

Comparing C++ to GML is like comparing a Car to a Horse,
I started out on Game Maker also I then spent some time learning C++ learnt some tricks and a bit around DirectX, after a while of nothing I jumped into XNA learned my way around C# but jumped back into C++ and DirectX every now and then (the only thing that really stopped me was writing model importers ground my gears always getting jammed on how to approach 3D animation, I'd probably get past it as of recently because I've got over my handicap of getting lost in loops)
I've tried a number of other DX wrappers and even some C++ frameworks and I always find it much faster and cleaner working with C#
C++ is very strict and by all means this can work to its advantage but I found it always hindering me and just getting tedious.

Back to my original point I was told by people with far more experience than myself that .NET languages and similar are capable of out performing C++ and that the workflow of C# is cleaner and quicker, given my limited experience I would agree with them.
its not so much about the difficulty of the language its about speed you can develop with it, my entire point is there is no performance to hit (even performance to gain if platforms were optimised for such languages) so there is nothing to lose and development is faster, more team friendly and CLEANER (I'll keep using the word cleaner, because I found another thing to get on my nerves with C++ was the shear amount of files, especially the redundancy of headers which most other languages have managed to avoid needing)

EDIT: Holoe puts it in better words than I
Thanked by:


Forum Jump: