where to start

Re: where to start

Postby Zlodo » 01 Sep 2011, 10:50

MyEmail {l Wrote}:See, that's a prime example of how people are plagued by conventional knowledge. Their too stuck on what society teaches them instead of pushing the boundaries and expanding.

You are very arrogant. How do you know I said that because I'm stuck into "conventional knowledge" rather than from a "been there, done that" point of view?

MyEmail {l Wrote}:
Zlodo {l Wrote}:It doesn't solve the biggest problems with the standard C preprocessor

It doesn't? You could have fooled me, as I certainly don't have to deal with most of those issues (not even the debugging one). The features I have implemented are very useful, and actually fixes many of the issues the C macro system has. In fact, and just for an example, debugging is actually much easier than traditional C.

I don't have to deal with any of those issues because I don't use macros. I use inline functions and templates instead. You know, the tools provided by the language, instead of a preprocessor based frankenstein solution.
And in fact I don't see where and how your system actually avoids multiple macro parameters evaluation. What happens if one of the expression you pass as a macro parameter in your example have a side effect?

MyEmail {l Wrote}:Oh, and anyone who has issues with C-macros are just too inexperienced to use them correctly ;).

Or perhaps experienced enough to realize that they have been superseded by much better solution for almost every use case.

MyEmail {l Wrote}:I guarantee you have never seen code like mine before :).

And now I wish it would have stayed that way. But more seriously, I have seen (and myself wrote) lots of shitty code where people tried too hard to be clever but just ended up needlessly complicating everything for absolutely no gain at all. You are not unique.

MyEmail {l Wrote}:Take a look at a quick test-case scenario (which demonstrates the most basic features):

<snip scrublord code>

That implements a memory allocation system similar to C++, but is much faster (performance AND dev-time wise). It is also far more versatile. For example, in a single new() call I could pass separate someValue arguments to each constructor, which is impossible to do in C++ without workarounds (allocate an array of pointers to objects, and manually allocate each object).

You are wrong. Google "placement new". Also have a look at C++11 and ponder what can be done with perfect forwarding and vararg templates. Or ponder no longer and have a look at the various "emplace" methods in C++11 STL containers.
Your example is not convincing. You have a whole page of ugly incantations where I'd have a handful of lines of C++ code to do the exact same thing, with no macro involved.

MyEmail {l Wrote}:I could even call different constructors AND use different parameters for each in a single new() call--try and do that in C++ :D.

By that logic, I can do absolutely anything in C++ in one line of code (which calls a function).

MyEmail {l Wrote}:The unimaginably great potential found in this basic example alone shows just useful it is.

lol

MyEmail {l Wrote}:In fact, I would argue it is easier to debug than C++ code. Consider this example: Each and every function (including constructors) have a unique identifier because its required in C. This means you know exactly what constructor/function is being called, whereas in C++ function mismatching can happen all the time because it does not require unique identifiers--you could accidentally be calling the wrong constructor because of a inline conversion operator, or the countless other situations where this could occur. On the flip side of the coin in my C+Scheme hybrid this will never happen.

You are wrong. Google "C++ name mangling".
Zlodo
 
Posts: 17
Joined: 14 Dec 2009, 12:36

Re: where to start

Postby charlie » 01 Sep 2011, 11:03

Actually I think MyEmail suffers a little from the Dunning-Kruger effect (not an attempt at an insult, but you do seem to rate yourself, your knowledge, and thus your techniques overly highly).

Another big downside to using things like macros is lack of IDE integration. I can't speak for C++, as I only use Java, but features that you lose when you start preprocessing (and we do, heavily) can be a massive PITA when it comes to debugging or even knocking new code in to shape. We primarily use preprocessing to overcome the lack of String switches (finally sorted in JDK7). I've spent many hours messing around between the processed and preprocessed forms of classes. Issues such as difficulty stepping through the debugger (the processed code is formed such that stacktraces will map back on to the preprocessed code, making some of the lines really long in the processed code, especially with macros hence we scrapped them) and accidentally making changes in only processed code (which is generated, only preprocessed code is stored in the VCS).
Free Gamer - it's the dogz
Vexi - web UI platform
User avatar
charlie
Global Moderator
 
Posts: 2131
Joined: 02 Dec 2009, 11:56
Location: Manchester, UK

Re: where to start

Postby FreakNigh » 01 Sep 2011, 13:01

I agree with some of the earlier replies.

You should find a good engine such as irrlicht and just poke around with examples until you know how to do all the base elements of your game. Then try making it.

Also seriously consider joining another project instead of starting one. You could do a lot of help taking another project and helping it become android / ios supported if you can do so without forking the code.

You can also figure out a solution that is not thread based. Never use threads.

I think someone who knows what they're talking about should tell mixpro about
1) Game loop
2) Including libraries and importing files
3) Abstraction between input, output and game logic(?)

How I do it is... the game loop has a
ProcessInputs()
ProcessGame()
RenderGame()

And yes separate everything from everything. You should not have raw calls to socket functions littered throughout your game code. Right your own class / layer for two reasons. One so that all the real socket code is in one place which makes it easy to debug. Two if you port the code and you can't use that library etc anymore then you only have to modify code in one place.

And I fully agree with MyEmail's first post, especially if your looking to get a job. A game is a superb resume piece and is not a statistically realistic choice for making money.
FreakNigh
 
Posts: 79
Joined: 23 Jun 2011, 08:45
Location: Philadelphia, USA

Re: where to start

Postby farcodev » 01 Sep 2011, 15:18

well, the thread is back on track ;)
farcodev
 
Posts: 163
Joined: 09 Feb 2011, 02:52

Re: where to start

Postby MyEmail » 01 Sep 2011, 16:11

@Zlodo: You completely missed the entire point of my post, instead interpreting it as me "trying to prove myself" or "trying to prove myself smarter than everyone else". Instead I was trying to get the point across that learning multiple languages is very beneficial, and to do this I was showing how I had customized a language to my own needs. I do not appreciate your post in the least bit (nor do I agree with it). It was extremely rude and dirogative, not to mention completely off topic. Your conjectures and insults to me are based entirely from your (obviously) limited point of view--you have never used a powerful macro system (such as Scheme) so you set its value at not. Your too stuck on conventional knowledge that "C macros are of the devil" to realize that C macros where simply a bad implementation of a what can be a very powerful programming tool when implemented correctly.

In order to not steal this topic or start a flame war here, I have started a new topic so you and I can "duke it out", which is obviously what you want Zlodo. Here is the thread: viewtopic.php?f=3&t=1911

Now, in this thread lets get back on topic! :)
MyEmail
 
Posts: 107
Joined: 06 Jul 2011, 08:58

Re: where to start

Postby farcodev » 01 Sep 2011, 17:46

ya, no more me myself and I on this thread ;)
farcodev
 
Posts: 163
Joined: 09 Feb 2011, 02:52

Re: where to start

Postby MyEmail » 01 Sep 2011, 17:55

farcodev {l Wrote}:ya, no more me myself and I on this thread ;)

Indeed.

@original question: There are a number of good FOSS projects I can recommend you too. One I have been keeping an eye on that seems like a good teaching scenario would be that of Stargus--a remake of Starcraft original using Lua and Stratagus. They could definitely use the help, and Lua is a good beginning language.
MyEmail
 
Posts: 107
Joined: 06 Jul 2011, 08:58

Who is online

Users browsing this forum: No registered users and 1 guest