Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe
Yes. The set of W3C specifications that make up HTML5 include some form of scriptability. It is established that the standard scripting language is JavaScript.

Adbot
ADBOT LOVES YOU

Mystery Machine
Oct 12, 2008
Hey, guys, I'm looking to learn some simple procedural generation to implement in my game, and I'd like to use Voronoi diagrams to help me do it, but all the web descriptions of Fortune's algorithm are just not being helpful to me. Can anyone point me to a book or a website that could really break it down for me?

Edit: Actually, a book that discusses other similar topics would also be really cool to own. I'd appreciate any suggestions.

General_Failure
Apr 17, 2005
Finally got a bit of time to work on the practice CA. It's hard coded as all hell but that's intentional. It's just meant to be practice and something that doesn't require much review to jump back into doing. Otherwise I see all these neat opportunities and tend to make the basis of something incredibly flexible and reusable, but huge and way beyond my time constraints to flesh out completely.

I'm purposely keeping it pure-ish C too. Ie no C++ or OO stuff beyond printf or struct.

It's more or less my own version of what I recall mini-assignments / larger class assignments to be at university. No set scope but following the KISS philosophy.

Unormal
Nov 16, 2004

Mod sass? This evening?! But the cakes aren't ready! THE CAKES!
Fun Shoe

Mystery Machine posted:

Hey, guys, I'm looking to learn some simple procedural generation to implement in my game, and I'd like to use Voronoi diagrams to help me do it, but all the web descriptions of Fortune's algorithm are just not being helpful to me. Can anyone point me to a book or a website that could really break it down for me?

Edit: Actually, a book that discusses other similar topics would also be really cool to own. I'd appreciate any suggestions.

http://www.amazon.com/Texturing-Mod...ural+generation

This book is the best single source on procedural "stuff" generation, in my experience. Don't let the title fool you, it's about a whole lot more than "texturing and modelling".

Unormal fucked around with this message at 02:33 on Aug 12, 2012

space kobold
Oct 3, 2009


My new game project is going to be heavily component based and data driven, having nearly every entity/item being represented in external text based data files.

Now looking over the format I have planned for a lot of it, I could get away with making everything a sea of .ini files, sort of similar to how Dwarf Fortress handles things. Recently however, I've started contemplating perhaps adding in a bit of complexity with either Lua script based config files, or even YAML.

If expecting people to be able to tweak/mod the game later on, is this an awful idea, and should I just stick with as simple a text format as possible?

Oh and Unormal, I've taken a lot of your discussion on component design and generic message systems to heart. Working on making a nice and flexible game engine in C/C++ following similar design principles. :3:

Unormal
Nov 16, 2004

Mod sass? This evening?! But the cakes aren't ready! THE CAKES!
Fun Shoe

Myr Null posted:

My new game project is going to be heavily component based and data driven, having nearly every entity/item being represented in external text based data files.

Now looking over the format I have planned for a lot of it, I could get away with making everything a sea of .ini files, sort of similar to how Dwarf Fortress handles things. Recently however, I've started contemplating perhaps adding in a bit of complexity with either Lua script based config files, or even YAML.

If expecting people to be able to tweak/mod the game later on, is this an awful idea, and should I just stick with as simple a text format as possible?

Oh and Unormal, I've taken a lot of your discussion on component design and generic message systems to heart. Working on making a nice and flexible game engine in C/C++ following similar design principles. :3:

Cool! Just make sure you profile performance early and often, and streamline where it starts to make sense. :)

Personally I'd just use C# and use reflection for plugins/extensiblity, but if you want to write a huge system like that in C/C++, I guess shine on you crazy diamond.

e: I think the way Bilas/Dungeon Siege did it was to define a special "script" component that would pass it's events over into a Script/DLL/whatever that had a predefined interface.

Dungeon Siege had it's own "Skrit" language, so you can search through some of the dungeon siege docs/papers for "skrit" to see how it integrated there.

http://garage.gaspowered.com/?q=su_301

http://scottbilas.com/files/2002/gdc_san_jose/game_objects_paper.pdf

e2: Also, unity is totally object+component driven, so it's another interesting place to go and check out patterns for component driven engines.

Unormal fucked around with this message at 03:43 on Aug 12, 2012

space kobold
Oct 3, 2009


Originally I was planning to design a majority of the system in pure ANSI C, but was quickly slapped in the face by a friend who told me I'm terrible and masochistic.

Glancing over the Dungeon Siege documentation, it looks right up my alley. I'll definitely be digging through it all here shortly.

As for Unity 3D, I've generally steered clear of massive game frameworks like that, but now I've become slightly curious. How well would it be suited towards a game that's heavily procedural in its terrain and environments, built around emergent behavior and "unscripted" interactions? Something in the vain of Dwarf Fortress or even a top-down Minecraft.

I've done a large amount of graphics programming, have a good deal of professional experience in C++ and C#, and love toying around with various scripting and general purpose languages like Python and Ruby. With all that, I really have a bad habit of wanting to re-invent everything when I work on new projects.

Unormal
Nov 16, 2004

Mod sass? This evening?! But the cakes aren't ready! THE CAKES!
Fun Shoe

Myr Null posted:

Originally I was planning to design a majority of the system in pure ANSI C, but was quickly slapped in the face by a friend who told me I'm terrible and masochistic.

Glancing over the Dungeon Siege documentation, it looks right up my alley. I'll definitely be digging through it all here shortly.

As for Unity 3D, I've generally steered clear of massive game frameworks like that, but now I've become slightly curious. How well would it be suited towards a game that's heavily procedural in its terrain and environments, built around emergent behavior and "unscripted" interactions? Something in the vain of Dwarf Fortress or even a top-down Minecraft.

I've done a large amount of graphics programming, have a good deal of professional experience in C++ and C#, and love toying around with various scripting and general purpose languages like Python and Ruby. With all that, I really have a bad habit of wanting to re-invent everything when I work on new projects.

Since your procedural interactions are going to be in C[++/#] code anyway, I don't see anything in unity that would fight you on a simple top-down engine like that. Unity doesn't proscribe a game structure for you, really, it just provides a (really pretty nice) rendering engine, simple audio engine, basic input, and a component-driven game object system out of the box. What you do with those subsystems is very flexible.

It's not great with plugins/extensibility though, so if that's really a core requirement, it doesn't sound like your engine is so huge that it would outrageous to write it from scratch.

On the other hand, with Unity you'd be completely cross-platform out of the box, which is a huge upside.

Honestly, as a single-man team, I don't think you're going to get enough performance out of C++ to offset the vast productivity benefits of C#, so I'd personally go with C# unless you want to be cross-platform (then you might want to consider unity in C# instead of C++), or just want to write a C++ engine to do it, which is a perfectly good reason.

e: Bilas' papers and writing on Dungeon Siege were really the early seminal works for Component driven game engines. There is lots of later writing (http://stackoverflow.com/questions/1901251/component-based-game-engine-design) on the topic, but I still find Bilas' writings on it to be some of the most thoughtful discussions.

Unormal fucked around with this message at 04:44 on Aug 12, 2012

Bongo Bill
Jan 17, 2012

roomforthetuna posted:

Does "HTML5" just imply "Javascript" these days? (Not snarking, curious because I've seen it in contexts like this before where clearly Javascript is necessary but goes unmentioned.)

Yes, but with the caveat that there are many tools that compile some other language to Javascript, with varying degrees of support for Javascript libraries. Things to look into include Coffeescript, lua.js, and emscripten, which all take different approaches.

Mystery Machine
Oct 12, 2008

Unormal posted:

This book is the best single source on procedural "stuff" generation, in my experience. Don't let the title fool you, it's about a whole lot more than "texturing and modelling".

Thank you! I ordered it.

I'm working on a cool little roguelike. It's a survival type game with no direct combat. During the days, you scavenge around a forest to collect building materials and food, and at night, you try not to die to the increasingly large amount of spawning monsters. The idea is that you're supposed to make traps and fortifications to stop the monsters. They'll destroy whatever part of the building is closest to you, but from there, they'll just go in through the hole (the idea being that they take whatever path is the fastest to get in). From there you run around your fort so that they fall into traps.

I just wish I wasn't so busy, so that I could continue to work on it a lot more. :(

General_Failure
Apr 17, 2005

Unormal posted:

http://www.amazon.com/Texturing-Mod...ural+generation

This book is the best single source on procedural "stuff" generation, in my experience. Don't let the title fool you, it's about a whole lot more than "texturing and modelling".

Why did I follow that link. Amazon, you can go suck a big one. gently caress you and your anti-Australian policy.

Anyway... whoever said it (not enough coffee yet. My brain isn't quite awake), what is wrong with writing in ANSI C?
Yes C and C++ / # / Obj / whatever are all different and straight C isn't OO. It really all depends on what you are doing it and how you want to do it.

I don't know if modern toolchains just skip this step but compilers used to essentially change C++ to C before working most of their magic. OO is more or less an extra layer of abstraction intended as a tool for developers more than something that really adds any extra functionality.

It may look it but I'm not arguing for using C over C++. Just saying that it's a couple of different ways of going about things that require their own philosophies.

Plus with C depending on what you are doing you can do cool and horrible things like crosscompile to a lot more platforms. Back say 5 or 6 years ago I was working on what we'll call a pre Terraria Terraria. Same concept only the platform was way different. I was doing the work on PC and had all the whit in place so I could do a straight compile in GCC or crosscompile to Apple 2 using CC65.
I know that's useless to 99.99999999999% of people in the world but when testing something on the target platform is a royal pain it pays to have another option.

OneEightHundred
Feb 28, 2008

Soon, we will be unstoppable!
It's very hard to find a useful platform these days that isn't targeted by GCC, LLVM, or both. There are several things doable in C++ like exceptions and on-load initializers that aren't really possible to express through C even with a translator.

There aren't really any good reasons to stick with ANSI C over C++ any more, you're just locking yourself out of a lot of useful features and design patterns, many of which reduce errors, and gaining nothing in return.


Re: Engine writing, I don't think it's currently a very good idea, but if you do go that route, I'd really recommend using something like Lua to move as much high-level functionality to script code. It's just much less of a pain in the rear end to debug an app when you're not dealing with nightmares like non-deterministic behavior caused by heap corruption or uninitialized variables.

OneEightHundred fucked around with this message at 23:42 on Aug 12, 2012

German Joey
Dec 18, 2004

roomforthetuna posted:

Does "HTML5" just imply "Javascript" these days? (Not snarking, curious because I've seen it in contexts like this before where clearly Javascript is necessary but goes unmentioned.)

Well, Javascript as always is just what you use to control the DOM. HTML5 referse to new features of the DOM itself, such as the Canvas element (see http://www.chromeexperiments.com/webgl/) and Localstorage/WebSQL, in addition to a number of smaller refinements.

roomforthetuna
Mar 22, 2005

I don't need to know anything about virii! My CUSTOM PROGRAM keeps me protected! It's not like they'll try to come in through the Internet or something!

German Joey posted:

Well, Javascript as always is just what you use to control the DOM. HTML5 referse to new features of the DOM itself, such as the Canvas element (see http://www.chromeexperiments.com/webgl/) and Localstorage/WebSQL, in addition to a number of smaller refinements.
Yeah, sorry, I wasn't clear with the phrasing of the question - I realize HTML5 isn't just Javascript, I meant more like "if you were to say you do HTML5, would it be automatically inferred that you do Javascript?" To which the answer seems to be "pretty much yes." (Because eg. the Canvas element is completely useless without scripting, so you can't really be using the HTML5 features without it.)

General_Failure
Apr 17, 2005

OneEightHundred posted:

It's very hard to find a useful platform these days that isn't targeted by GCC, LLVM, or both. There are several things doable in C++ like exceptions and on-load initializers that aren't really possible to express through C even with a translator.

There aren't really any good reasons to stick with ANSI C over C++ any more, you're just locking yourself out of a lot of useful features and design patterns, many of which reduce errors, and gaining nothing in return.



I'm going to go ahead and agree with you on that. but I will add that it's also important to be able to do things without relying on objects for it all. Otherwise you end up with C++ that looks like Java. OO has its place for sure and it is a very useful tool but people shouldn't lose sight of the meat of how to do things.

That Turkey Story
Mar 30, 2003

General_Failure posted:

I'm going to go ahead and agree with you on that. but I will add that it's also important to be able to do things without relying on objects for it all. Otherwise you end up with C++ that looks like Java. OO has its place for sure and it is a very useful tool but people shouldn't lose sight of the meat of how to do things.

Most modern C++ practices are not Java-like (nor OO-like in they way most people think of OO). There are lots of features of C++ that make it a great choice to use over C, and the OO facilities are not high up there on the list.

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe

OneEightHundred posted:

It's very hard to find a useful platform these days that isn't targeted by GCC, LLVM, or both.

z390

:(

Look Around You
Jan 19, 2009

That Turkey Story posted:

Most modern C++ practices are not Java-like (nor OO-like in they way most people think of OO). There are lots of features of C++ that make it a great choice to use over C, and the OO facilities are not high up there on the list.

Can you elaborate a little more on this? I honestly don't see many advantages to using C++ just due to it's ridiculous grammar and virtually incomprehensible error messages, but I also haven't used it all that much and don't quite know the best practices for writing good C++ code. If it's better for the C/C++ thread though that's fine too.

Paniolo
Oct 9, 2007

Heads will roll.

Look Around You posted:

Can you elaborate a little more on this? I honestly don't see many advantages to using C++ just due to it's ridiculous grammar and virtually incomprehensible error messages, but I also haven't used it all that much and don't quite know the best practices for writing good C++ code. If it's better for the C/C++ thread though that's fine too.

What is ridiculous about the grammer? What error messages are incomprehensible? Are these complaints arising from extended use of C++ or are you simply parroting what you've heard other people say?

There's something I notice over and over again when people who don't know what they're talking about criticize C++, and that's the use of non-specific emotional words like "ridiculous", "horrific", "nightmare", etc. There are (many) perfectly valid complaints against C++ but the difference is a valid complaint can be phrased in a specific manner, whereas 95% of the poo poo talking about C++ you read on the internet isn't much more than fear of the boogieman.

(This isn't just your post I'm picking apart, I see this constantly whenever C++ is discussed.)

Unormal
Nov 16, 2004

Mod sass? This evening?! But the cakes aren't ready! THE CAKES!
Fun Shoe
For me, these arguments all come down to: Pragmatically, if you're programming closer to the metal (RAW BYTECODE!->ASM->C->C++->C# my own engine->C# on prebuilt engine->telling someone else to do it) than you need to be to meet your requirements, you're wasting development hours because (with equal knowledge) additional abstraction just means you can get more done in less time.

Look Around You
Jan 19, 2009

Paniolo posted:

What is ridiculous about the grammer? What error messages are incomprehensible? Are these complaints arising from extended use of C++ or are you simply parroting what you've heard other people say?

There's something I notice over and over again when people who don't know what they're talking about criticize C++, and that's the use of non-specific emotional words like "ridiculous", "horrific", "nightmare", etc. There are (many) perfectly valid complaints against C++ but the difference is a valid complaint can be phrased in a specific manner, whereas 95% of the poo poo talking about C++ you read on the internet isn't much more than fear of the boogieman.

(This isn't just your post I'm picking apart, I see this constantly whenever C++ is discussed.)

Not extended, no, but the few times I have used C++ I've been pretty overwhelmed with just how much there is to try to take in, specifically with regards to const semantics and (especially) the STL. I'll admit that I haven't used it much though, so I don't have a significantly negative experience as much as I don't really know any of the good practices with C++, and I don't quite know what to read to learn them to be honest.


More on topic, I have a huge problem with sitting down and actually getting started on any ideas I have because I always wrestle around with what language/libraries/etc I want to write it in. Do any of you have tips for getting over this stupid rear end mental block that I get?

OneEightHundred
Feb 28, 2008

Soon, we will be unstoppable!

Paniolo posted:

What error messages are incomprehensible?
Error messages involving templates tend to be extremely verbose and often hard to parse.

One thing I will emphasize though is that while there are plenty of valid criticisms to be levied against C++, I can only think of one which points to the use of ANSI C instead as an improvement over just not using the complained-about feature. (That one thing is the use of integer zero for nulls instead of having a null pointer keyword). There may be valid reasons for using C99 instead of C++, field initializers are pretty great for example, but C++ vs. ANSI C is pretty much just irrational purism.

I'm not someone who makes particularly liberal use of C++ features, I pretty much never use iterators and still use C-style IO calls almost exclusively for example, but I'm hard-pressed to think of any project I've done lately where some C++ feature hasn't made it much easier, especially custom data types, RAII, and reduced code duplication from templates.

Also if you hate STL believe me, you're not alone.

OneEightHundred fucked around with this message at 07:17 on Aug 13, 2012

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe

Look Around You posted:

Do any of you have tips for getting over this stupid rear end mental block that I get?

Just go. Who cares if you start in C and use raw OpenGL and tie yourself to ALSA, or use Python and Cocos2d. Use libraries where you think you should, and seem like they may help, not because they are awesome and you have to shoehorn them in.

Worry about porting to other platforms after you get things working and done. It's always going to require some effort, whether or not you have it in the back of your mind. Better to have a focused porting effort than an unfocused "portability" effort.

OneEightHundred posted:

There may be valid reasons for using C99 instead of C++, field initializers are pretty great for example, but C++ vs. ANSI C is pretty much just irrational purism.

If you have to support SunCC/MSVC, you can't use a lot of the good parts of C99. We dropped support for those a few years ago, but we're only using a few C99 features. It's a "ANSI C" mindset, even though we don't need it.

General_Failure
Apr 17, 2005

That Turkey Story posted:

Most modern C++ practices are not Java-like (nor OO-like in they way most people think of OO). There are lots of features of C++ that make it a great choice to use over C, and the OO facilities are not high up there on the list.

Hence what I said. C++ is very open to abuse and can help incubate monstrosities that should be gazed upon by no-one.

I like the extra features. I won't argue as I said. Admittedly mostly it's because I relied heavily on struct in C, and in C++ find that using classes as structs that can handle themselves to be a great tool.

I have delved into polymorphic monsters whilst experimenting with ideas but it always ends with me thinking that the whole idea was silly because if I'm expanding on and messing with classes a lot all I'm doing is making something relatively hardcoded and complex.

On the other hand objects in libraries are brilliant. Essentially what Unormal said. For large projects which can be best served by libraries / middleware / whatever else, C++ can help with clicking together a whole pile of different resources.
Closer to bare metal I like C if I can get away with not using asm because it's a bit easier to keep the program under control and have a better idea how it will be using resources. Yes I know it is possible to wrangle C++ to do similar, but if I'm writing something that I want to stay within clearly defined boundaries and / or accessing hardware directly I'd prefer to use C.

Look Around you- It may not be the correct approach but it is my approach. Assuming it's not something super hardware specific just write the guts of the thing so it's relatively technology agnostic. How you do it us up to you, whether you choose to do a core engine with stubbed accessors / libs which you can build the next layer around etc (IMHO not a bad practice if you want it portable, or maintaining the black box philosophy or just don't know whether you want your game to be a MUD, a tile based top down scroller, an OpenGL masterpiece or some bleeding edge hardware accelerated voxel masterpiece.

Find your starting point and work from there. I mean, The Sims started off with Will Wright coming up with a weighted behavioural algorithm and based a project around that idea. http://www.donhopkins.com/drupal/node/148 (first link that came to hand sorry)

Don't even think about setting your technologies in stone. As Suspicious Dish said, Just go! You can't expect to belt out a masterpiece with laser focused accuracy. I have massive directories of unfinished ideas, abandoned projects that I coded myself into a corner with and tests to see if an idea will actually function. That stuff doesn't hurt anyone and I can use it for future reference so it's all good.

edit: In this post I'm referring to OO in the C++ sense. Thought I'd better say that as I am aware of the vastly differing concepts of object orientation.

General_Failure fucked around with this message at 08:32 on Aug 13, 2012

Paniolo
Oct 9, 2007

Heads will roll.

OneEightHundred posted:

Error messages involving templates tend to be extremely verbose and often hard to parse.

Yeah this is an example of a valid complaint.

General_Failure posted:

C++ is very open to abuse and can help incubate monstrosities that should be gazed upon by no-one.

This is an example of a bad one. Note the weasel words and lack of specifics.

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe
This is anecdotal evidence as well, but from working on three or four C++ codebases, none of them look the same.

Some of them use algorithm.h and STL and iostream all over the place. Generics are seen everywhere,

Some of them use Boost, and try to avoid generics.

Some of them look like C, except they have a few structs with methods here and there where it might help.

The language is too large to manage. There's also lots of bad design decisions:

* The weird syntax for generics where you have to do > > >, otherwise the parser will thing you meant a >> token or something. That's just a rushed parser and grammar, to me.

* friend classes. I don't see the point in building up strong encapsulation principles if you just poke holes straight through it.

* iostream. A stateful writer stream is not a good design. self-constrained printf syntax was much easier to manage and use. The syntax for writing/reading your own structs seems backwards to me.

EDIT: gently caress me why am I arguing about C++ it's 2012 holy poo poo what is wrong with me

roomforthetuna
Mar 22, 2005

I don't need to know anything about virii! My CUSTOM PROGRAM keeps me protected! It's not like they'll try to come in through the Internet or something!

Paniolo posted:

This is an example of a bad one. Note the weasel words and lack of specifics.
To be fair, it is true, but neglects to observe that you can write terrible convoluted monstrosities in any language, even LOGO. C++ certainly doesn't have a monopoly on it.

It may be slightly easier to write hard to follow monstrosities in C++ because a simple-to-do thing like combining #defines and templates can make it almost impossible to look at the actual code you're executing. But I'm sure you can do terrible hard to follow things in any language if you try.

SavageMessiah
Jan 28, 2009

Emotionally drained and spookified

Toilet Rascal

Suspicious Dish posted:

* The weird syntax for generics where you have to do > > >, otherwise the parser will thing you meant a >> token or something. That's just a rushed parser and grammar, to me.

That's not true anymore, and hasn't been true for ages in some compilers.

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe
Oh, did they fix that in C++11?

gently caress yes.

Paniolo
Oct 9, 2007

Heads will roll.

Suspicious Dish posted:

Some of them use Boost, and try to avoid generics.

That would be impressive, is there a single class in boost that isn't a template?

I think you're way off base by the way. The fact that three different C++ code bases will use completely different subsets of the language is the primary reason why C++ is so successful. A desktop application, a scientific computing system, and a video game have radically different requirements and yet C++ is adaptable to all three domains. It's not always the best tool for every job, but when you do need it, there's few areas it's blatantly unsuitable for.

Paniolo fucked around with this message at 16:11 on Aug 13, 2012

xgalaxy
Jan 27, 2004
i write code
With clang, verbose template errors are non-existent.
God I love clang...

Unormal
Nov 16, 2004

Mod sass? This evening?! But the cakes aren't ready! THE CAKES!
Fun Shoe
The only thing I miss from C++ with C# is amazing macro meta-programming abuse.

Solvency
Apr 28, 2008

Trade, sir! Discover it! This is you, this is a clue. Get a clue, discover trade!
So I’ve decided to make the jump into game development after several years of wanting to do it, but I’m completely lost on an iOS 2d game engine to use. I have previous programming experience, and took C++ in college (6+ years ago), but looking at the syntax now scares me (and made me realize why I didn’t like coding in the first place).

I have done more recent coding in Java, C# and Python, and a bit of Actionscript, and I tend to enjoy languages similar to them. I am hesitant to learn yet another language with limited use, so I’ve been wiff-waffing on learning Objective C or Lua.

I also would prefer not having to pay for the various tools, and I would like to use an engine that has a decent amount of support and releases tied to it.

I’ve yet to find an engine that fits each of these needs, so I know I need to compromise somewhere, I just can’t make the final decision. I’m curious if any of you have suggestions of engines or could give insights into some of the engines I’ve considered.

Cocos2d - Pros: Seems to be the standard of iOS games, tons of support, books, and released titles. It’s free to use!
Cons: I would need to learn Objective C.

Moai - Pros: Major developers are supporting it. Seems to be rather popular. Can get by learning Lua.
Cons: Very little support, seems to be a difficult place to start.

Unity with some 2d engine attached (Futile?) - I’ve enjoyed using Unity and it seems to be a solid platform to go with. C# is awesome. Multiplatform!
Cons: Expensive. I’ve heard it’s slow on iOS devices. No physics engine on 2d games.

space kobold
Oct 3, 2009


Macros were such a dirty pleasure in my years of programming in C++. Though they could also be a curse when having to maintain someone else's code.

I'm honestly still really tempted to grind out a good portion of my game project in pure C. I just have to justify the time commitment compared to using abstracted, rapid development languages.

Might even do something like having the underlying engine components in C, with the core game logic in Python or Ruby. Though sticking with something like C# across the board seems the most consistent, hassle free, and provides a good mix of rapid development and testability. Meh, no real wrong way to go about things really, just different levels of required commitment and potential scorn from peers.

Wozbo
Jul 5, 2010
I've never seen C# as a game programming language before. For some reason I always viewed it as a "business language" ala VB.net etc. Are there any real drawbacks to game coding in C#?

OneEightHundred
Feb 28, 2008

Soon, we will be unstoppable!

Wozbo posted:

I've never seen C# as a game programming language before. For some reason I always viewed it as a "business language" ala VB.net etc. Are there any real drawbacks to game coding in C#?
It's a static-typed language so there are some thing you can't do with it, though that's more of a tradeoff since it's much less mistake-prone.

The main barriers to it are mostly difficult integration, difficulty reasoning about security due to its size, and the difficulty of implementing a read-eval-print loop or doing any kind of hot code updates. If you're writing an entire game in it, then you'll also have to worry about performance degradation past a certain point.

OneEightHundred fucked around with this message at 19:02 on Aug 13, 2012

Wozbo
Jul 5, 2010

OneEightHundred posted:

It's a static-typed language so there are some thing you can't do with it, though that's more of a tradeoff since it's much less mistake-prone.

The main barriers to it are mostly difficult integration, difficulty reasoning about security due to its size, and the difficulty of implementing a read-eval-print loop.

Isn't there also a .net de-compiler of some sorts? I seem to remember Terraria having its source minus varnames de-compiled pretty much immediately. How does it work/ how do you prevent such a thing?

E: I'm only asking because I'm trying the Vita dev kit and its all C# and it was a bit of a stereotype breaker.

Wozbo fucked around with this message at 19:04 on Aug 13, 2012

OneEightHundred
Feb 28, 2008

Soon, we will be unstoppable!

Wozbo posted:

Isn't there also a .net de-compiler of some sorts? I seem to remember Terraria having its source minus varnames de-compiled pretty much immediately. How does it work/ how do you prevent such a thing?
Compiled .NET code is very high-level IL so it's relatively easy to disassemble, but nobody gives a poo poo about your source code unless they're trying to pirate it or make cheats anyway so I don't consider that much of a drawback.

e: I'm really not sure why they made the Vita dev kit C#, considering Sony's usual NIH obsession and the fact that the language is more or less controlled by one of their chief competitors.

OneEightHundred fucked around with this message at 19:43 on Aug 13, 2012

Bruegels Fuckbooks
Sep 14, 2004

Now, listen - I know the two of you are very different from each other in a lot of ways, but you have to understand that as far as Grandpa's concerned, you're both pieces of shit! Yeah. I can prove it mathematically.

Paniolo posted:

What is ridiculous about the grammer? What error messages are incomprehensible? Are these complaints arising from extended use of C++ or are you simply parroting what you've heard other people say?

There's something I notice over and over again when people who don't know what they're talking about criticize C++, and that's the use of non-specific emotional words like "ridiculous", "horrific", "nightmare", etc. There are (many) perfectly valid complaints against C++ but the difference is a valid complaint can be phrased in a specific manner, whereas 95% of the poo poo talking about C++ you read on the internet isn't much more than fear of the boogieman.

(This isn't just your post I'm picking apart, I see this constantly whenever C++ is discussed.)

When people say the C++ grammar is ridiculous, they're probably talking about how there's no way of accurately representing it using a LALR(1) grammar. C++ grammar is "ambiguous, context-dependent and potentially requires infinite lookahead to resolve some ambiguities." See page 147 of http://www.computing.surrey.ac.uk/research/dsrg/fog/FogThesis.pdf.

Adbot
ADBOT LOVES YOU

space kobold
Oct 3, 2009


Wozbo posted:

How does it work/ how do you prevent such a thing?

If it's running on the users machine, it can be reverse engineered / "hacked". In almost all cases no one is going to care about your source, and excessive attempts to try and obfuscate your compiled code only leads to slower performance and a whole host of issues. See pirates vs commercial software over the past few decades as an example.

If you are really worried about someone pirating or hacking in the game, then you'd have to run it as a service and have a portion of the game logic running on your own remote servers. But even then, that too can be reverse engineered and replaced given enough dedication.

In short, you really shouldn't worry about it much unless you're doing something super-top-secret for a big company, or are trying to make something overly competitive.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply