Jump to content

  • Log In with Google      Sign In   
  • Create Account

Dan Mayor

Member Since 14 Jan 2011
Offline Last Active Nov 02 2015 07:19 PM

#5032368 Where to begin? (C#)

Posted by on 14 February 2013 - 04:04 PM

I'd recommend you buy a book from Amazon. Even a kindle version would do. They usually teach you eveything you need to know to get started.


You never heard this from me, but if you don't want to pay for a book, find a good one on amazon, and then download it through bittorrent or emule.


Might just be because I'm a bit of an author myself in my free time but you should always buy or donate to learning materials.  First off someone takes their valuable time to write something helpful for someone else and deserves some compensation for their time and effort and secondly the more you steal the less we offer.  Down vote for sure, never suggest someone pirate, steal or otherwise "rip off" anyone!


One more rant tip and I'll leave it be, there are ample free learning services that will at least get you started.  If these don't suffice spend the $20 or so it costs to buy a book that suits your learning style and needs.  You'll be amazed how much harder the "teacher" tries to convey his/her knowledge upon you when they are getting paid to do so.  Other than that as I mentioned in the "Programming Primer" I wrote in my journal, programming is a process of overcoming problems through reasoning, logic and above all researching and implementing solutions.  This is your first step young coder, learning to FIND material is nearly half the battle.  Finding material you understand, learning from it and implementing it is the other half.

#5032250 Looking for ways to improve code...

Posted by on 14 February 2013 - 08:16 AM

Just for the sake of being nit picky I would use precompiler directives to separate the wait so that your not wasting a comparison tick every time you want to wait.


#ifdef WIN32



    system("sleep 1");



Using this method the compiler will only include the correct call for the correct system in which it is compiled on.  In real world applications Windows programs are packaged as compiled executable's 99% of the time and Linux is always in source form.  Making this calculation once at compile time vs once per execution (or more if you where to use this again somewhere) doesn't really save much of anything it just gets you in the habit of what I consider a better practice.



   I used #ifdef WIN32 because Microsoft's Visual Studio normally defines this for you by default when you have the sub system set to windows.  It could be defined as something different or you can use your own #define WINMODE or whatever you wish, just be sure that the compiler or the source have the correct platform defined for the build you are running.

#5031560 Need guidance on side-scroller: c++

Posted by on 12 February 2013 - 02:53 PM

You will first want to start by selecting an engine or api framework that supports the graphics that you are looking to do.  Many people on here will suggest SDL or SFML as good starting points.  How you go from there (eg the implementation of the technology supplied by the engine / framework) will matter entirely on the suggested process of the engine or framework.  Or in other words, find what you want to use and then read how they tell you to use it.






You can of course find whatever suits your needs or likes as well.  You are not limited to these or any frameworks less the requirements of your project.

#5028752 Games Development Beginnner

Posted by on 04 February 2013 - 01:20 PM

Getting started in game development is design and most specifically the design document.  The first step you will undergo with any project is to write a complex document that defines all the aspects and functionality of your game, presents the story line and forms a guidelines of what to do for the game as you go.  The programming language choice a lot of times will vary based on what engine you are trying to use and what language that engine supports / allows at the license level that you intend to use it at.  That is to say that if you where to choose Unity you would be limited to C#, Javascript or Boo for the standard free license (which you can add additional platforms on relatively inexpensively).  If you choose UDK you will be stuck with Unreal Script unless you dump hundreds of thousands into the source code license.


Many people will say that you can always focus on C++ as the majority of engines are written in C++ and you just get the source code license of the engine, use C++ and your good to go.  While this might be mostly true the simple fact is many of us independent game developers simply can't afford the source code licenses of engines that we might want to use.  These decisions can be made once your design document is done, you can compare what your trying to do to what various engines (and their different licenses) allow.  Then you will have an idea of what programming languages you will be able to use to code your logic around that engine.


There are many free frameworks that are written in C++ that you can build your own in house engine around or you could always write your own engine (in which case I suggest nothing but C++).  However if your goal is to make a game (maybe even to sell it) you don't really want to waste your productivity on reinventing the wheel so to speak.  There are free licenses to engines that are already powerful enough to handle the majority of independent game titles already, doing all of that work yourself will consume years of time and greatly diminish your interests and motivation in completing the actual game (many times this causes the team's and their projects to fall apart and give up).


With all that mentioned please check out two of my journal articles for a little more information on both of these particular topics.  The "Who Needs a design document" will explain in a bit more detail why that design document is so important and is the starting point for actual project development (which can also be a starting point for you learning the art of game development.)  The second article "The Programming Primer" is a large detailed overview of what it means to program, some general terms to get started with and tries to make a connection that you as a beginner can use to start understanding that the language doesn't necessarily matter it's more so the art of solving problems.  It's quite a bit of reading but might just help you get your bearings and get started with a bit of an idea what you are getting in to and how to go about it.




#5028749 Need help

Posted by on 04 February 2013 - 01:07 PM

I would actually advise against UDK for numerous reasons, but the main reason is the cost vs profitability.  Check out an article I wrote in my journals awhile back that will address some truth behind UDK and it's viability for an Independent developer.  Note this is an older article and the pricing structure may have changed a bit offering a more royalty based license for the full source code version which you wouldn't necessarily require anyway.




Also, just to make note there are far fewer projects and teams using UDK than who use Unity or in house engines.  I always speak out against building an in house engine unless you are working with a large AAA game studio but just wanted to mention that.  UDK Is very very powerful, more powerful than you are likely to need, also learning Unreal script puts you a step above many other coders in the field but unfortunately not being a member of multiple released projects the AAA companies simply don't care.  Many large studios such as Square Soft, Blizzard and so on don't care how much programming knowledge you have they only care about your college degrees and your proof of ability through your previous commercially released projects.  (Contact them directly if you want to verify that).


I understand that your post didn't mention anything about working with other studios, but as "Yourself" pointed out, game development starts with years of making no money whatsoever.  3 - 4 years from now you might be interested in joining a development team and moving in to profitable ventures as well as working on your dream projects.  It's better to know now what will start making you more valuable to small independent teams so that you might have that option later on.  Unfortunately UDK actually closes more doors for an entry level developer than it opens.  Raw programming talent and being experienced with engines that smaller companies use open way more doors as there are just way more small companies that are willing to hire an entry level person than there are large companies (who might use UDK).


My suggestion is that if programming and design are the fields that you would like to go in to for game development that you focus solely on those and get good at them.  It is very rare (I would go as far to say NEVER) that someone gets decent enough at programming, design and graphics that they can make a game that people will actually want to play.  Programming is a life long venture that requires thousands of hours of research and practice to get good with.  Graphics is the same thing, requires thousands of hours of study and practice to get good with and still requires some artistic ability that you may or may not have.


As far as making your own game you are right to choose a full featured engine and dev kit such as UDK or Unity and learn to use it to do what you want as this will greatly increase your productivity.  By all means if you are set on using UDK go for it, just want to advise you that beyond your own personal uses it's not likely to get YOU any farther in this field at this time.  The UDK license is simply to expensive for non AAA game studios to use (no it's not $99 it actually racks up to hundreds of thousands AND they take large royalty's after the first $50,000 of sales.)  Hidden fee's at their finest, make sure you get in contact with Epic and get the real cost information that you will have to comply with to release your game on the platform(s) that you are targeting.


Also for programming as you mention you are a bit of a beginner, I'd like to point out another article I wrote in my journal recently.  This might be a step back and might be information you are already aware of but it's a bit of a primer for beginners to make sense of what programming is.  If you are interested please read this article as well, hopefully between my warnings in this post and these two articles you will have a bit more information to properly make your decisions on what you want to do going forward both for this game and for your future possibilities.



#5028341 HTML5/JS drops FPS on maximized window?

Posted by on 03 February 2013 - 08:41 AM

Try posting a link so we can see what is happening, Ectara's answer is the best we can do without more information.

#5028182 Game programmer

Posted by on 02 February 2013 - 04:42 PM

Just wanted to come back to this topic and I hope I'm not overstepping my boundaries on this one but I have noticed this question arising in quite a few threads and in a few variations.  Kind of lead me to going in to one of my journal ramble fests of sorts where I write a huge article explaining things the way I see them.  It's something I hope will be helpful and I think might help to address some of what you are asking / having problems with as a potential / beginner level programmer.  I call it "The Programming Primer", although much of it may seem like a step backwards for someone who has already started learning a specific language I'd still like to offer it to you and to anyone else who makes their way to this post in search of ideas to "how do I start programming".  Reading never hurts and what is in this entry may give you some helpful ideas and incite as to what people are saying to you on this thread about the general concept of programming.  Give it a read when you have a chance please and feel free to comment and or contact me with your questions or comments as to the article.



#5027979 directInput using two mouse

Posted by on 01 February 2013 - 05:27 PM

Going out on a limb here but are you sure it's possible to make distinctions between two mice?  I have zero experience with this and may be wrong here but my understanding is that the computer can listen from multiple "mouse" devices but it all get's "lost in translation" if you will.  That is to say that when you respond to a "mouse event" you are responding to that event from any mouse or touch pad on the system not so much one or the other.  There is a lot of room for me to be wrong here but maybe you don't see two mice because the computer doesn't really have two mice?  It has two different input devices that act as a single "mouse" where either of their inputs cause the same events?



Had to find some more on this, yes it appears that DirectX (or Direct Input to me more correct) as of version 9.0 no longer differentiates between multiple mice.





#5027589 Game programmer

Posted by on 31 January 2013 - 12:05 PM

Most (if not all) complex engines use a scripting language to handle all of their logic, interface and so on.  C++ Is the language of the engine (and incorrectly some people use it to code everything).  C#, Javascript and Boo are the language of Unity, Lua is the language of many others, Python is probably the next most common from what I've seen.  Point is as a C++ programmer you'r usefulness is not in making the game so much as it is in making the engine and tool kits.  Considering most small / indie teams that actually produce a project by using a premade engine (most commonly now a days is unity) it's highly unlikely you will be recruited or hired to do C++ for gaming teams.


Now I'm sure people will come back to this saying "Our game uses nothing but C++, but we already have a programmer".  9 times out of 10 these are also the teams that have been working on their game for over a year and if they are lucky all they have to show is thousands of lines of code that power their engine, they won't have anything to show as far as the game goes.  So of course you should do some research to find where the demand is, from my experience (been doing this for over 15 years now) it's rarely to never in C++.  Simply put the big boys are the only ones that finish games AND need a C++ programmer.  The C++ programmer that they need must have been a member of previous game projects before they will even be considered.  You will end up behind a seemingly insurmountable brick wall when you stick to just C++ (although you will find yourself working your butt off time and time again for teams to fall apart due to long spans of working for little or no results).


My recommendation is always to learn basic C++ up to the point where you fully understand variables (and data types), functions, classes, methods and members.  Once you fully understand these core concepts move in to C# (because this will allow you to work in Unity and actually get jobs, create your own games and what not).  Once you get to the point where you feel comfortable scripting in C# look in to Javascript (which will let you make interactive website widgets and HTML5 games).  Yet another of the truly high demand fields that also empower you to get results fairly easily.


All in all if your goal is to make games you want to think like a designer first and a coder second.  What can you get / learn that will let you slap your game together and add logic?  The answer is not C++ no matter how popular that belief is, the answer is a premade game engine such as Unity, UDK, Torque and I'm sure many others.  When you start looking at these premade engines you find out it's free to use them as is meaning you "script" your logic in some other language like C#, Javascript, Boo, UnrealScript and so on.  When you want to use C++ with any of them you start looking at license fee's anywhere from $1,500.00 - $450,000.00 USD.


I'm not belittling C++ it is a very powerful cross platform language that is among the highest performance languages in existence.  I'm simply trying to point out that it is rarely ever actually used in the game itself.  It's used to make the underlying engine systems, and 9 times out of 10 even the big AAA companies don't even use 75% of hardware performance issues.  As such most successful indie and small development studios get to where they are by realizing they don't need to build an in house engine, they need to complete their game and the way to do that is speed up hundreds if not thousands of times using technology that has already been made available to you.  (Eg get an engine, script in the language it wants and you actually finish your game).


Long story short, yes learn C++ but learn the language and the art of programming don't focus so much on using it to access direct x and open gl yet, just learn to program.  Once you learn to program start expanding your knowledge and look in to using engines to make games.  If you think the performance is too slow go take a cold shower lol. As rude as it sounds if you need more power than something like Unity or UDK provide you are doing something wrong.  Unity is just as powerful (if not more so) than you are likely to write yourself (your haven't been doing it for a dozen or so years like they have.  They have both perfected the art way better than you are likely too within the next few years and they focus on bettering their engine so you can make a game).  UDK is one of the maybe 2 most powerful engines in the world, if it can't handle what your doing nothing is likely to do it.

#5027124 At what point should I turn to kickstarter

Posted by on 30 January 2013 - 03:26 AM

@Butabee, I'm sorry you take offense to Servant Of The Lords statements.  My experiences reading some of his post is that they are a bit direct and opinionated from his view point but once you get over the initial shock they are quite helpful.


@Servant Of The Lord, taken in proper context or with a grain of salt that is very nicely said.  I agree and hopefully will disperse a bit of the tension / hostility between you two with what I have to add.


First, what is being said is not a direct insult to you Butabee, it's the truth of how people with money think.  One thing many of us learn early on is that business and money are rude cut throat portions of life where it always comes down to one single question.  "What does my money get me?".  I personally believe that this is more the point Servant is trying to make.  I don't believe that he means to accuse you of foul practices but more so is acting to show you what everyone who doesn't know you thinks.  That is to say that those of us who don't know you, we don't see any of your previous work and see you asking for money for a project that we don't see... We'll we've all been around the internet to know that is exactly how 100% of scam's work.  No we aren't accusing you of being a scammer but we will be hesitant to trust you.  Take it as more of a constructive informative note than a personal insult, it's better to know what the average potential consumer thinks of you and to take steps to avoid that classification than it is to blindly run in thinking everyone trusts you and that everything is just fine and dandy.


I will try to get back to the not so offensive way of saying this, please don't take offense from my comments either.  Think of it this way, how sure are you in your design, your work ethic and your ability to finish this game within a year or two?  Are you sure enough that you'd be willing to quit your day job tomorrow, take out a loan from the bank to support yourself for the time it takes to complete and publish your game?  Are you confident that your project will succeed allowing you to pay back this loan, make a profit and maybe even make a little funding towards your next project?  If you'r answer is yes then show me (me being any old kick starter user) what you have and why I should believe you.  If you make me a believer too I'll give you some money.  If you don't have much to show or don't meet my criteria (which is shockingly close to servant's) then I'm sorry but to me you are the same as the 50 other guys asking me for money that simply won't ever get done what they are trying.


If your answer is no, well then it's going to be even harder to convince people like servant and I (you know people that do actually invest in projects we deem worthy by whatever standards we particularly choose) to give you money.  Neither of us are trying to be rude or accuse you of being a scammer we're simply explaining what it takes to get money out of our wallets and into your hands.  Your question is when should you start in on kickstarter and we're telling you it should be when you are at a point when people like us believe in you.  Anything prior to that is going to be extremely difficult if not impossible.  I'm sure not everyone there thinks like we do, I'm sure there's plenty of people willing to throw $5 - $10 at a game that looks pretty without doing their homework.  But taking the advice that Servant put forward in his message is more likely to get more people interested in investing more money.


(Not doing so good on sugar coating my response am I?)  Unfortunately in development fields like game development, software programming, website design and what have you the difference between success and failure is the ability to take the bad, offensive and insulting comments from peers and potential customers, learn from them, expand your skill sets and practices to appease them and generally turning it into more of a constructive and good learning experience.  Us giving you a bit of harsh reality here and now is something that you can take as constructive criticism, something you can learn from and adapt to shut us up and when the time comes you'll find yourself in a better position with a wider range of people.  For as bad as this comment or prior comments sound, wait till you hear the responses of people with big bucks.  Everything said here is a walk in the park compared to how much they will slap you down for presenting an incomplete of shabby proposal.  We're being a little harsh on you now to get you to ask the right questions of yourself, prepare a good and effective proposal and in the hopes of you making it where many others fail.


All in all I guess the point is you will be ready to head up your kickstarter campaign when your peers say you are.  That is to say when you get to a point where you can swing into a social outlet and say "here's my game's trailer and website", "here's a little demo to try" and those people respond with "Wow that's cool, I'd buy it".  Then you might be ready or at least close.  Mind you I say peers meaning other developers as we are more critical on you than generic users will be.  When you can make us interested you are ready to make potential customers interested.  Before that you may still get some interest but we're looking for maximum gain are we not?

#5027066 So how do I start learning programming?

Posted by on 29 January 2013 - 09:50 PM

The type of game I want to make is 2.5D platformer with a la Devil May Cry combat.I'm ready to spend time to learn programming it's just I still haven't found something that is 'noob' friendly tutorial.The latest supposedly beginnner Javascript tutorial video I've seen didn't explain things like why you need to tags,uppercase,why you need to skip lines,etc.I still haven't check out the links rileyw provided right now but once I do,I'll give feedback whether it's useful for me or not.


Not exactly sure what you mean by "to tags" but assuming that we are talking about HTML and that you meant "two tags" one of them is a closing tag that signifies you are done defining that particular element.  Example:


    <title>My Wonderful page!</title>
    My Totally awesome content!


First just a bit of a note, HTML is read and interpreted linearly, eg top to bottom.  So as such this very simple little example says to the browser (or whatever is reading this file)


"Start HTML declaration"

"Start defining the head of this document"

"Start defining the title" - My Wonderful Page - "That's it we're done with the title"

"Done defining this document's head"

"start defining the body of the document"

My Totally awesome content!

"done defining the body of this document"

"done with my HTML declaration"


If you meant something else entirely I'm sorry, just reaching a bit trying to get to answers for you.  Next "uppercase", casing is just the way of the world for most languages.  HTML isn't necessarily a language that enforces of fails if you use improper casing but it's just recommended that you always define the element names and attributes in lower case letters as this is the official "standard".


"Why you need to skip lines?" - You don't this is just to make it easier for you to read the code.  Back to our previous example, listed below is exactly the same to a browser and will generate exactly the same output (and is no less correct).


<html><head><title>My Wonderful Page</title></head><body>My Totally awesome content!</body></html>


The only reason people spread out their code onto different lines and indent it the way they do is so that the code makes sense to them.  There are numerous discussions on what a standard code format should be but it's just something the programming world will never particularly agree upon.  I like my way, you like your way, the computer or browser reading our code doesn't care or make any difference between the two so when it all comes down to it format your code in a way that makes the most sense to you.  In some other areas there might be some rules to abide by but in general what you place on a line and how far you indent it are all your discretion.

#5027063 Card Kingdoms ( A CCG/TCG In Development)

Posted by on 29 January 2013 - 09:23 PM

Looks like you have and are putting a lot of work into the design of the actual game play and that is always a good thing.  One question arose while I was reading through the rules and that is what happens with only partial damage is dealt to a creature or building card?  You mention that both have health, attack and defense, will it be suggested or required that players keep a running tally of partial health values of the various assets on the field?  That is to say, if Player A attacks Player B.  Player A's attack force has an attack of 100, Player B's creature has defense of 50 and a health of 100, should the player's make note and keep track that Player B's creature is now down to 50 health or is the attack considered ineffective?  You'll excuse me I'm more of a video game player and never really got in to all the card games sorry if this is one of those "duh" questions.

#5027059 Difference between Renderform and Windows Form?

Posted by on 29 January 2013 - 09:03 PM

The first idea I jump to is welcome to windows and DPI problems but it's not likely this is actually the case here.  Post code and give more information we can try to help, best we can guess is either you are letting the device context handle text scaling which would lead to DPI related scaling where windows tries to make your font's as big as the user wants instead of following your guidelines (although this normally doesn't have anything to do with rendering api's just WinForms) or that measuring systems, resolution, field of view, and or aspect ratios are different.  Quite a slew of "could be" things that can be mentioned, posting some code will narrow that down to some more likely culprits.

#5026873 Cross platform mobile development

Posted by on 29 January 2013 - 01:16 PM

Just wanted to point out that there is also Cordova from Apache which creates a native stand alone HTML5 / Javascript app that you can very easily port to any platform including iOS, Android, WinPhone, Blackberry and all flavors of PC as well.  Might be something to look in to, especially considering it is a mobile game and you are already limited by size and hardware performance issues I would assume that the project itself isn't very complicated.  I have ran my own tests on app's (not games) and have found that using Cordova with jQuery you actually get smoother / faster translation animations using Cordova then you do using the native tool kits.  With all of that said it's also worth mentioning that the HTML5 canvas element is already using the devices preferred hardware acceleration API (which in these cases in OpenGL).


I'm sure many people will disagree with this approach and of course you should do your research and pick what works best for you.  I would just recommend that you at least give my solution a try and see if it's something that can help you.  HTML5 games take minutes to setup and get started, within a couple hours you could code up the most complicated part of your game and run it inside an emulator on your PC, if it runs satisfactorily then you can rest assured it will run great on the device.  (An android emulator on PC is slower than a first gen android, same with iPhone emulation).


Some reading for you...




(plenty of others just google "HTML5 Game Tutorial")


http://cordova.apache.org/ (AKA PhoneGap)

#5026437 So how do I start learning programming?

Posted by on 28 January 2013 - 11:35 AM

I'm sorry if this comes off as contradictory to other posters on this thread but I would have to strongly urge against python UNLESS you intend to only code as a hobby.  This is because coding normally leads to working in non game development related positions first and if you are lucky comes back to game development.  When you are working as a programmer for a company or offering freelancer services you are expected to work in C++, C#, PHP or Javascript and sometimes Java (depending on what your working on).  With that said Python is of a completely different family of languages, that is to say that it's syntax and practices are totally different than the languages that you are likely to be hired for.  As such learning Python or Visual Basic is learning the less commonly used family of languages and makes it even more difficult to transition back to the higher demand languages later on.


Now with that being said I'm sure there's plenty of people that want to chime in right now and say "I make games in python all the time".  That's great and it works just fine, yes you can code in python, yes you can make games with python.  Will you get hired to code python for a client or by a big enough company that can afford to hire full time coders?  Not likely.  So please base your decision on this, do you want to do it for your own personal projects and as a hobby or do you want to learn it in an attempt to get a job somewhere?  It your answer is the latter I would suggest you stick to learning something of the top level family such as C++, PHP, Javascript, maybe even Java or C# (although Java and C# require a bit of object oriented programming knowledge and may be a bit harder to learn up front).


Please note I am making no comments on performance or ability of languages I am just pointing out demand for work and that the majority of the time the demand is for languages that are based off of the C style (or family) of coding.  It is also worth mentioning that learning programming doesn't exactly mean learning a language, it's a method of writing commands to achieve a goal.  Learning any language teaches you the art of programming and later on changing to another language is normally just learning the subtle differences in the commands.  Meaning learn anything and learn it well, you can always change later.  My warning in this message is that there are two major types of programming languages (maybe even more), there's the C family of languages that all look pretty much the same and use many of the same commands, then there's the "basic" family of languages that all look the same (as each other but not like C family).  Same thing with these, they use most of the same commands and are easy to switch between.  To a beginning programmer switching between "basic" and "c" family of code can be a very complex learning curve as they are quite different in the way that you type the commands and what those commands are.