Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 08 Jul 2012
Offline Last Active Yesterday, 10:28 AM

Posts I've Made

In Topic: how to use or ||

06 July 2014 - 09:33 PM

That should actually work (with the operator precedence there should be no confusion, so no brackets needed).
There must be something else off (maybe the sound switch off?). Go through with your debugger and inspect those values.
As a general hint: If you don't know/trust what's going on, declare a couple of temporary variables (or even functions), and inspect those, e.g:

bool b1 = rainP <= 0.3;
bool b2 = temperatureC < 0;
bool b3 = cloudAlt <= altibaro;
bool b = b1 || b2 || b3;
Edit: Thinking about it, using parentheses explicitly (even if not needed) isn't that bad. Not only for readability.

Edit2: @Buckeye: Question now is rather who has ninja'd whom ? wink.png



This is a fantastic idea.  In fact, const bools are often used in UE4 for readability purposes.  Variables and constants may be self-documenting by themselves, but you can take it a step further as in the below example.  For example:

// Before:
if (someDescriptiveVariable < someDescriptiveNumber) {
    // Do stuff

// After:
const bool bSomeDescriptiveBool = (someDescriptiveVariable < someDescriptiveNumber);
if (bSomeDescriptiveBool) {
    // Do stuff

It may seem unnecessary to some, but let me tell you that it makes for very clean and self-documenting code that other people (not just yourself) can read.  I also agree that expressions are generally cleaner when they're surrounded by parentheses.


As for the actual topic, the best thing to do here (as previously mentioned) is to display the values in one way or another.

In Topic: where to go?

30 June 2014 - 10:23 PM

for a reason of disagreeing with them and not sharing their view which i consider simplistic and alogical


Hilarious.  Let's go over a few facts:


1. You don't even do basic research before making a post.

2. You consistently fail to proof read your posts.

3. You ignore advice given by people who clearly know more than you thanks to your arrogance.

4. You refuse to use tools that are absolutely essential in software development and testing.

5. You do the absolute minimum amount of work before making a post.


I'm sure you'll refute all of my points with some ridiculous argument.  What can I say.  At this point in time, you're a lost cause from my perspective.

In Topic: game pause - ho should be done?

26 June 2014 - 03:50 PM

why you asking why im asking?


I'm guessing that Spiro's asking because your question seriously lacks context.  You haven't provided any details on what you're working on, the problem(s) you encountered, and what languages/frameworks/engines you're working with.  So when you ask something like:


2) how to implement that?


People aren't really going to be able to help you.  I would suggest reading http://www.sloperama.com/advice/entry65.htm


After that, post some details on what I mentioned above and I'm sure people would be glad to help you.

In Topic: Learning Game engine or Programming first

22 June 2014 - 07:58 AM

Will understanding the code, identifying problems ,google searching, learning and amending the issues be enough to get started off?


A great way to learn is to run into problems and solve them so I would suggest to start making prototypes until you're comfortable (if you just thought of a prototype, then think even smaller - trust me).  Though if you run into a lot of "I don't know how to do this in C#, or I don't know how that works in C#" then you may want to take a step back and just focus on C# console programming until you're more comfortable with it so it doesn't effect your game development workflow.


Get started as soon as you can, but don't burn yourself out.  This is a long process.

In Topic: Learning Game engine or Programming first

22 June 2014 - 07:06 AM

do i really need to know how to WRITE code ? or just clearly understand what exactly the code is saying ?


If you're interested in becoming a game programmer then yes, you'll want to learn how to write code as it'll increase your available tool set and it'll drastically help your workflow.


If you don't plan on spending a lot of time on this, then I would say go ahead and just focus on Unity and C# scripting, or Unreal 4 and their visual Blueprint system (or [insert game engine of choice here]).  I would definitely not recommend a beginner jumping into UE4 C++ because they're doing some interesting things with their build tool that you normally wouldn't see in a stand alone C++ program and it'd only confuse the hell out of someone who's trying to learn C++; However, you can get extremely far with just their Blueprint system.



but if i think of trying to write the whole code myself ... i just cant remember it...


Indeed.  It will take time.  With more practice, you'll learn to solve problems you encounter without needing to memorize specific solutions.  Unity has been around for long enough that you can search "How do I do [X] in Unity?" in google and you'll likely find someone else who encountered the exact same problem and someone else who provided a solution for said person.