Jump to content

  • Log In with Google      Sign In   
  • Create Account

alnite

Member Since 07 Nov 2002
Offline Last Active Today, 11:01 AM

#5021727 Religons in games

Posted by alnite on 15 January 2013 - 02:34 AM

If you borrowed the religious elements strictly from history, then there's probably nothing wrong with it as it already happened.  For example, if you picked a Crusader class, you will automatically be a Christian.  But if you come up with your own views of what they are, or what the bonuses are for each religion (I don't know, something arbitrary like +25% wisdom for Christianity but +25% gold for Islam), then get ready for furious lashes from people. People will start complaining why religion A/B gets such bonus and attention while history proved otherwise, bla bla bla (pointless religious debate).

 

It's just better to come up with your own religions.




#5016904 The Beginning

Posted by alnite on 02 January 2013 - 06:00 PM

My question is, like many before me have asked, where should I begin to look at game developing?

 

My first stop on the road was to look at http://www.gamefromscratch.com/post/2011/08/04/I-want-to-be-a-game-developer.aspx which is about a year out of date, which seems to be a long time in the development circles.

 

A brief on the article says to avoid C++, is this a wise choice for starting out?

 

Avoid C++ if you have no background whatsoever in programming.  C++ is merciless to beginners.  If you do have background in programming, then by all means learn C++ if you haven't already.  C/C++ are pretty popular among game developers, so there are plenty of tools and libraries.

 

 

My next stop would have to be Java, now I don't know if this is a misconception but I believe that it follows the same syntax and structure as C#, and seems to be widely support on the GDK side of things. Correct?

 

Java is widely supported for game development, and it has plenty of development tools.  It has, however, always been seen as the 'slow' language not suited for game development.  Having developed games in Java on embedded systems (512K RAM or less), I can say with 99% confidence that it's not true.  The people who say it's slow are usually low-level freaks who are concerned with 1 ns difference in their game loop, or people who don't know how to use Java and abuse the GC.

 

 

I'm going to preemptively try and answer a question I think I am going to get asked, and that is "What type of game do you want to make?"

 

In the long run my aim is to put together a RPG type game, with a few possible starting "Classes", walk around some open spaces, go into some dungeons, kill some bosses, win some loot, save a princess. You know that sort of thing.

 

I am well aware, that this is a long time goal, and I guess my first attempt would be something along the lines of "snake" or a simple "old school" game.

 

Yes, do start with something simple.  This is to get you familiar with what game development is like.  It is different from the typical application development.

 

 

Thanks for reading this and any help would be much appreciated.

 

Ben

 

You are welcome and welcome to game dev smile.png




#5011840 A Paranoid Programmer

Posted by alnite on 17 December 2012 - 04:47 PM

I really think that professionals wouldn't call it game programming unless I make my own engine starting from OpenGL

Wait...what?
You could make a video game any way you want to, and as long as that method allows you to create your dream end product it doesn't matter how you got there. Plenty of professional and semi-professional studios use unity. Unless you want to take it up as a project for fun, you should never "need" to make your own engine. The people at OpenGL already did that for us.


Yes, this is misleading. People use middlewares, that's why there's Unity, CryEngine, Unreal, Ogre 3D, and all that so you don't have to always start from scratch, even among pros.

It takes time to master multiple skills. To make a nerdy analogy, a fighter-mage combo requires more time to level up than a straight-up fighter or mage.


#5011334 passing an object as a parameter

Posted by alnite on 16 December 2012 - 01:58 PM

Exams are a bitch, as it requires you to read your professor's mind.

Create a fillList() method that takes a reference variable of type Ticket as a parameter


void fillList(Ticket ticket) {
   // insert ticket to your list
}

In Java, everything is passed by references except primitives (int, bool, long, float, double).

how would i go about passing an object of an inner class as a paramitar to a method in the outer class?


You can invoke a method in the outer class from the inner class.

class OuterClass {
	public void someMethod(InnerClass ic) {
	}

	class InnerClass {
		public void doStuff() {
			someMethod(this);  // OK
		}
	}
}



#5008488 iOS Game development on Windows- What are my options?

Posted by alnite on 08 December 2012 - 07:38 AM

iOS development is always done on a mac, not Windows. Apple never made their SDK available for Windows. I haven't used Macincloud, but I wouldn't suggest doing that. When you sign up to be an Apple Developer, you are required to sign your build before you can put that on a device or release it to the market. This key needs to be stored on your machine, and you would need to connect your iPhone to the actual physical machine before you can test your app. You can't do that over the cloud.


#5007200 [C++] - Multithreaded Bubble Sort

Posted by alnite on 04 December 2012 - 03:46 PM

Look up merge sort - it inherently merges two sorted lists together, you'll find how to do it there. The result is basically a simplified selection sort, taking advantage of the fact that the two lists are already sorted, which runs in O(n) time and uses a temporary array. You could extend this to an arbitrary number of lists, or you could do the merging in parallel too (which would be more useful, because doing the merge step on a single thread defeats your use of multithreading in the sorting step).

Is this for a school assignment, by the way? If not, you might be better served by trying to implement a multithreaded merge sort, which is more interesting and is actually useful.

I second this. Split array into two, spawn two threads and each handle its own segment. Recursively do this until you reach the smallest subset.

Merging the array shouldn't be too compliated either. Since each thread spawns two subthreads, you just wait until both threads finished executing, then merge, then flag its parent thread.


#5006081 Does anyone else struggle with problem solving?

Posted by alnite on 01 December 2012 - 01:53 PM

For example, the Tic Tac Toe game, I keep trying to do it the exact way that the other guy does it, and I get stuck, and constantly refer back to his code to see what I am doing wrong. Not to mention whenever I try doing it by myself, I constantly think about that persons code. So I can never try it myself.


If you can't think of a solution for a tic-tac-toe game, then maybe it's too much of a challenge for you. Step back, and start something much simpler, like a number guessing game, text-based adventure, dice rolls. I have no idea how many useless/random programs I have written back in my GW/QBASIC days: draw random lines, circles, rectangles, compound interest calculators, address books, fake shell, etc.

It's a good thing that you are doing this because you want to learn. Keep this attitude, and never stop writing code.


#5005533 Does anyone else struggle with problem solving?

Posted by alnite on 29 November 2012 - 07:53 PM

I find this a problem common among beginners. If I give you code, you can understand the process and what the code does. But if I tell you to write a brand new code from scratch, you are stuck right from the beginning. Did I run into this when I first started? I don't remember. But I see this all the time.

The era of the Internet today makes it easy to copy and download code snippets, which encourages lazy thinking. You see this all the time on blogs. People would comment "Code doesn't work! HELP! HOW DO I FIX!?!?". And this is coming from using a simple code how to convert a file to a string object, for example. I'm not pointing out that the code doesn't work, but I'm pointing out the sheer laziness in people that they expect things to fall on their lap and work. When things not operating the way they expected, they don't bother to find the solution themselves.

It only comes from experience, and it has to be the right experience. Always write code from scratch. It's okay to look at code from web, but only as a reference, not meant to be copied directly to your code. 90% of the time that code won't be compatible to your code anyway. Never, ever, copy-paste and use code you get from web, conferences, CDs, or anywhere else. It's okay to use prepackaged libraries (like STL, SDL, Ogre, 3rd party libraries), the ones that you don't have to look at their code to use it.

How can a writer be a writer, if all he does is copy someone else's work? Programming the same way.


#4999971 Switch vs if else

Posted by alnite on 11 November 2012 - 12:30 PM

While this might be language-dependent, you can't normally switch-case objects like strings. switch-case could only be used on integers, as it creates a jump/branch table. Additonally, in some languages, you are allowed to fall through a case statement.
switch (x) {
	 case 0:
	 	 doSomething();
	 case 1:
	 	 doSomethingElse();
	 	 break;
	 default:
	 	 doDefault();
	 	 break;
}

if x = 0, doSomething() and doSomethingElse() are executed. This style of coding could be useful in certain cases (no pun intended).


#4999095 Already know C++ - where to learn game programming?

Posted by alnite on 08 November 2012 - 07:30 PM

C++ by itself does not contain any library to access the video, input, and sound hardware, which is what you need for games. So in order to do that, you'd need to use a 3rd party API. SDL, SFML, as people mentioned are good candidates.

Once you familiarized yourself with the API, then you can start working on the core of the game. There isn't any 'de facto' Tetris tutorial, as there's no one correct way of making a Tetris (or anything else really). How you make it is up to you. Other people's source code should be good as points of reference. Here's one: http://code.google.c...e-tetris-clone/

As a beginner, I wouldn't suggest trying too much organizing your code. Your lack of experience will probably backfire -- chose the wrong patterns, premature optimizations, and all that. Do it as best as you can, but the most important thing is to actually complete your game. After you complete your game, your knowledge of project structure will skyrocket, and you'd know how to do it better next time.


#4999082 Industry's look on tattoos etc.

Posted by alnite on 08 November 2012 - 06:46 PM

I'm currently studying to become a games developer/programmer and have a tattoo sleeve but due to it being around an inch above my wrist I can easily cover it up (long sleeved shirt etc.) if need be. also was thinking of having a flesh tunnel in one of my ears (around 5mm - not like it matters) what are the views upon these things in the games industry (employment wise) anyone who has been in the industry and knows about the policy.
All answers are greatly appreciated
Thanks.


Depends on the company, but most game developers are pretty open-minded. As long as you don't flash gang tattoos and dress up in wife-beaters, you are fine.


#4996778 How powerful is Java?

Posted by alnite on 02 November 2012 - 11:46 PM

Over 9000


#4995503 Moving from Java to c++

Posted by alnite on 30 October 2012 - 12:16 PM

Hmmm. that actually sounds like a good idea, my main goal here is to learn everything thoroughly and properly from the beginning so I can be a good c++ programmer soon. I think forcing myself to do that will help me learn things that I'd usually just happily ignore and let my IDE do it for me. How important and how hard is learning all that? Anyone else think this is a good idea?


A command-line compiler is a great tool to learn. You will use it at some point in your career, and I'd recommend using that over an IDE at this point in time. IDE like VS can spout out error because of IDE config errors, not your code. This can confuse beginners a lot, thinking that their code is wrong while in fact, the IDE is messed up.

Also while I'm here, should I start with c++ 11? I know nothing about the different versions, is it backwards compatible? is it or will it be the standard soon? which version do you recommend I start with and why? The only concern I might have about that is that its new and might not be as well documented, I love have a wealth of resources when learning something new and complicated like c++.


I don't know much about C++ 11, but last time I tried to use it, the compilers have yet fully support all the features of C++ 11. You will get different results depending on which compiler/IDE you use (GNU, VS). I would suggest that you stay away from it for now. It's an extension of the language, not a whole redesign, so you won't miss a thing.

Anyone have any other general suggestions for learning resources or tips? I wanna learn this as thoroughly and as well as possible but I'm also eager to get my hands dirty with some real programming as soon as I can


I would focus on pointers, ctors, and dtors, as that's one of the main differences between Java and C++. When objects are allocated/deallocated in C++ is a whole different thing.


#4993991 Performance issues in simple program

Posted by alnite on 25 October 2012 - 07:15 PM

The main algorithmic improvement here is diving only by numbers up to the square root of the number.
...code snippet...


Nice. Here's my version:

int largestPrimeFactor = 2;
for (int i=2; i<=n; ++i) {
    while (n % i == 0) {
	    n/=i;
	    largestPrimeFactor = i;
    }
}



#4989221 Advice for managing two different codebases for one game using Git (browser a...

Posted by alnite on 11 October 2012 - 01:51 PM

Yes, this is a good example for preprocessors. What preprocessors do basically format your code before passing it on to the compiler. So essentially, you can add/remove certain parts of the source code depending on the flags of the preprocessors you have setup.

For example: you have this code:

doSomething();
#if IPHONE
doiPhoneStuff();
#elif WEB
doWebStuff();
#endif
doSomethingElse();

Before compiling for iPhone, you set IPHONE variable to true, and WEB to false, and thus the code after being preprocessed will look like this:

doSomething();
doiPhoneStuff();
doSomethingElse();





PARTNERS