Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 07 Nov 2002
Offline Last Active Yesterday, 06:21 AM

#5215352 Unity 5 or Unreal engine 4

Posted by on 08 March 2015 - 09:54 PM

Is this going to be the new "vs" question now?  No more DirectX vs. OpenGL? :D

#5215016 Employee appraisal

Posted by on 06 March 2015 - 02:39 PM

You have been with the company for a year.  That's usually more than enough for anyone to see how you work, and what you have been told is your boss' perception of your work.  He's in charge, and he's clearly not super happy with your work.  He wants you to improve, and he gives you time.  It's a good thing that he told you this upfront.  Some people will let it sit for a long time until you suddenly get the pink slip without warning whatsoever.


Here's the thing of being an engineer.  You need to figure things out yourself.  That's what makes a good engineer, when they solve problems.  Engineering problems are not math problems.  There is not one answer, but many.  The way I see it, engineering problems are the opposite of math problems.  A typical math problem asks you "what's the result of 1+1", an engineering problems is "I have 10 and 3.  What should I do to get 2?"


You need to figure out what you need to do, instead of asking people what you need to do.  If you are stuck, research things yourself, figure things out yourself.  This is part of the reason why tech forums don't want to solve people's homeworks.  Don't let the senior engineers solve problems for you.

#5214001 Drawing a city in 3D

Posted by on 02 March 2015 - 01:35 PM

How much do you know about 3d modeling?  The bulk of this work will be modeling each individual houses, and putting textures on them.   5000 is quite a lot.  You could also go by creating a generic looking house that fits the architecture at that time, and apply that to all or majority of the houses, but it will not look very convincing.

#5213510 Confusion with insides of 2D games

Posted by on 28 February 2015 - 11:30 AM

Sometimes people like to make things sound more complex than it actually is.  I never knew what a scene graph is when I first made my own video game.


Video game programming, in a nutshel, is really just handling logic for each object you have in the game, and draw them to the screen in the order you want them to be drawn.  At its simplest form:

for (int i = 0; i < gameObjects.length; ++i) {
    // handle logic for gameObjects[i]

for (int i = 0; i < gameObjects.length; ++i) {
    // draw gameObjects[i]

Done.  That's your game loop.  The only thing important is to separate the logic code and drawing code, and that's why I wrote two separate loops.


Then games become complicated, scrolling map, parallax scrolling, 3D, particle systems, objects attached to other objects and so on.  Some objects drawn completely, some others partially on the screen, and some others are completely out of the screen.  So people start handling these game objects into a complex tree structure which they call a scene graph.  You do not need a scene graph structure to make a game.  However, once your game start getting more complicated, and you have had solid programming background, you would naturally solve that complexity with a scene graph anyway.

#5211624 Creating a server for a mobile game and matchmaking with facebook

Posted by on 19 February 2015 - 01:45 AM

The common wisdom says that if you want an online capable game, you have to write it with online capability from the beginning.  It seems that you have been writing your game in single player architecture, so it's likely that you will have to rewrite it to add the online part.  But, it depends on the game and the complexity of what you are after.

#5210819 Exclusive maximum in random functions

Posted by on 15 February 2015 - 08:16 AM

Stated differently, I *am* designing for general use, and I get the feel that exclusive maximum is a weirdness designed for indexing arrays, a very specific problem.


The physical 6-sided dice we have been using starts at 1, but it may just as well starts at 0 and ends at 5.  What if I have a die that uses icons: Sunny, Cloudy, Rainy, Thunderstorm, Foggy, and Snow?  I should be able to call Random(6), to indicate that I have 6 elements to choose from. Regardless of where I start from, 0 or 1 or 13 or 10417, I still must be able to map this result that:

startingPosition + Random(6)

Should give me the correct result.


Now, instead of an interval, what if I have an offset and length.  Give me 10 results starting from result #102.  My notation is therefore [102, 102+10), rather than [102, 102+10-1].

#5210589 Very basic 2D RPG game

Posted by on 13 February 2015 - 09:30 PM

A basic 2D RPG like what you mentioned has these things:


1. Animation

2. Map/tiling/scrolling

3. Input to move the characters

4. Moving from one map to another (visiting a house takes you to another map of the inside of the house)

5. Understand the concept of layers.  You need to render the tiles, houses, trees, characters, character bubbles, how they overlap, which gets drawn first, etc.


I suggest you tackle this one at a time.  First, learn how animation works.  Given a sprite sheet, how do you animate the characters.

Then learn about tiling maps, scrolling maps, and how do you position objects in the map and make sure they stay at where they are supposed to be when you scroll.


So you just build up your skill there.

#5210336 What's the point of obfuscating managed code?

Posted by on 12 February 2015 - 01:56 PM

Code obfuscation is typically done when you release your game to the public.  During the normal development time, you never want to obfuscate your code.


Which means that you have to get into habit handling multiple development environments (e.g. Release vs. Debug, development - alpha - beta - production).  Your code has to cope with those differences in the env too.  During development, you output as much as debugging info as possible, turn on fps, wireframe, collision boxes, etc.  When you toggle your build to Release, all of that is turned off and obfuscation is turned on.


You still have to retest your game in Release mode as it's now a different binary.  There could potentially bugs that arise only when you have it on Release mode.

#5209749 Enemy Bullets

Posted by on 10 February 2015 - 12:46 AM

Here are a question to ask yourself:


When do enemies shoot?  Is it after a predetermined set of interval, e.g. every 2 seconds, 1 second, 10 seconds? or is it triggered by a specific event in the game, e.g. player happens to be in the line of sight?  Or perhaps a specific frame in an animation?  Just like the player shoots after the player presses the shoot button, enemies need their own triggers too.  The only difference is that instead of having the human player initiates the trigger (pressing a button), the trigger for the enemies must come from within the game code itself.


Once you have determined the trigger, then it's a matter of calling that createBullet() function from that trigger.


If you have organized your game objects such that the player and enemies share a common interface to shoot bullets, then having the enemies shoot is just the same as having the player shoots.

if (shootButton.pressed()) {

if (enemyTrigger.shoot()) {

#5209651 Clean OOP programming question

Posted by on 09 February 2015 - 01:28 PM

Pointer debate aside, "Clean OOP" is elusive.  To OP, I would suggest that you shouldn't sweat too much about doing things the right way.  Pick one, do it, and assess it yourself whether it has helped you steer in the right direction, or make your code worse.


Your app is event driven.  If user interacts with CProjectWizardWindow, and CMainWindow should receive a message when such event occurred, then you have several options.  You could create some "listener" classes for CProjectWizardWindow.  How many listener classes?  Depends on how many events you are emitting, and how many of them you want to differentiate into separate classes, or you could just lump them into one class.  Up to you.


For the sake of an example, let's have one and call this listener class: CProjectWizardEventListener.  This class would define certain methods that need to be implemented by the subclasses.  Depending on the events, CProjectWizardWindow will invoke different methods.


CMainWindow should inherit from CProjectWizardEventListener, and implement these methods.  CProjectWizardWindow will then maintain a list of these listeners, then, when the ok is pressed, it iterates through the list and call the method.  Something like this:

class CProjectWizardEventListener {
    virtual void OnOkPressed(CProjectWizardWindow*) = 0;
    virtual void OnCancelPressed(CProjectWizardWindow*) = 0;
    // add more events here

// notify the listeners when ok is pressed
std::vector<CProjectWizardEventListener*> listeners;
for_each(listener.begin(); listener.end(); InvokeOnOkPressed);

class CMainWindow : public CProjectEventListener {
    virtual void OnOkPressed(CProjectWizardWindow* cpww) {
        // handle the ok event here

Now, this is not the silver bullet.  You can design this in however you want, but this is a direction you can decide to choose.  Sometimes people don't like this approach because your CProjectWizardWindow has to maintain the list of the listeners, inserts them, removes them, etc.  Sometimes people rather choose to emit the event to some event manager that handles all events and all the listeners.  Pick one, and decide for yourself.

#5208850 Why do mobile app crash?

Posted by on 05 February 2015 - 04:09 AM

Thanks for the suggestion !! But still I don't get that ... sad.png I think I am a little more dumb then I though of myself !! biggrin.png I am sure other member over here will help me out once they see my post ! smile.png


You first need to install the Android SDK.  You might also need to install Java Development Kit (JDK).


Enable USB Debugging on your device.  Where it is in the Settings depends on your phone's manufacturer.  Look it up.


Plugin your Android device through USB.  If you use Mac/Linux, it should be able to detect it.  If you use Windows, you might need to install a driver first, again, depends on your phone manufacturer.


Then run the Android Monitor tool.  It will give you the activities that's currently running on your phone.


If there's a crash, it will usually say so and why.  However, this is usually for the developer of the app that's crashing.  As a user, this information is not that useful because you don't have access to the source code.

#5206490 Java how to do this

Posted by on 24 January 2015 - 07:10 PM

I think the problem is that you are not saving the resulting string from the previous invocations, so strOutput only yields the result from the last replaceAll().

strOutput = english.getText().toString()
for (int i = 0; i < enLang.length; i++) {
    strOutput = strOutput.replaceAll(enLang[i], petLang[i]);
return strOutput;

#5205857 Should I leave the current company and take the risk?

Posted by on 21 January 2015 - 03:24 PM

I have offered a C++ Augmented Reality job, which is interesting to me, at least I won't go far away from GD.. but I'm very worried, it's a small company, pays less, and right now, the manager told me that there are two c++ guys that are leaving and they want me asap.


That's actually a redflag.  Perhaps there's something with the management or the financial of the company.  If this is a brand new startup with lots of funding, and everyone is excited to jump onboard, that's a whole different story.  But the fact that there are people quitting, and these two happen to be (I would assume) the core C++ programmers, you would be left out dealing with source code which you have no idea how it works, and there's deadline looming over your head because he wants to join you ASAP.


My suggestion is look for other opportunities.  Take advantage of the idle time you have at work as much as possible by learning/working on separate projects that can make your resume look better.

#5205206 A new beginning, some questions for pointers for a stranger to coding

Posted by on 19 January 2015 - 12:18 AM

I am now going to self-proclaim myself as an expert.  So, in addition to reading my expert advice, please read the forum's beginners guide for further references.


As I understand it's rather easy or at least possible to change to another platform with JAVA coding am I right?

That's what they say, but usually when you are coding an app, be it for mobiles or PC or server-side, you will eventually use the platform-specific libraries.  That promise only holds true when you write a Hello World, or a very simple program.


The list that says you first need to start with tetris, then breakout, then pacman isn't authoritative.  You don't have to have that exact sequence.  What you need is lots of experience.  Lots of programming experience dealing with lots of different things.  That sounds a lot, because well it is.


Programming is a tricky skill.  No one can tell you exactly how to become a good programmer.  Unlike, let's say carpentry, in which you may have some blueprints of a design, along with its measurements, programming doesn't have that luxury.  There are sample codes, but part of the fun of programming isn't making someone else's games, it is to make your games.  To make your own game, you just have to do it with trials and errors.


The good news is that you don't need all of those just to create a game.  Creating a game counts toward that experience, and you don't even have to start with tetris.  Make some lame game where you get to drag this...camel, collecting stranded adventurers in desert, or something like that.  Create a game with ridiculously simple mechanic that takes a 2-year-old no longer than 10 seconds to master, like Flappy Bird.


Don't be discouraged by its simplicity, nor feeling like a loser for making such a ridiculous simple game.  If your friends make fun of you for making ugly simple games, instead of shiny 3d graphics with unity, then dump them and make new friends.


Don't worry about the nitty gritty details like whether to use Paint or Photoshop, or which IDE, or what PC with what video cards.  All of those are irrelevant.  Just pick one, and start coding..

#5203983 I am beginning to hate the IT and gaming industry.

Posted by on 13 January 2015 - 12:04 PM

Tbh, I never want to work for a game company ever again (unless I'm running it of course)

Awesome! We are on the same boat now!


General tech industry interviews are more annoying than game industry btw, and you have experienced some of those at Microsoft.  They want people with a particular set of skills with X years of recent experience.  One example is this one company that builds game engines using Java.  I have worked on Java professionally for like 6-7 years, but I wasn't using Java in the last two years.  They flat out rejected me.  Like, flat out rejected my resume!  They didn't even want to call me in for an interview.


Here's some insights about these employers:

People are picky, but they don't really know how unqualified they actually are to be picky.  This is why you see job description with bazillion requirements.  They don't know what they want, they vaguely know what kind of person they are looking for, but they can't make a decision.  So they just throw in the most impossible qualifications.  They want the best, likable, person they can find who's willing to take the bait.


If you are applying at a hot startup company (e.g. Twitter back before it went IPO), this can get worse as ego will bloat their little heads thinking they are a hot piece of a company.  You gotta be as "cool" as them.  The definition of cool is up to whatever they feel at the time they interviewed you.


If you are applying at a company that's as behemoth as Microsoft or Google, then you are at the mercy of whichever department interviewed you.  Their expected set of skills might be different than that of your resume.  Expect the worse.  I have had an artist interviewed and rejected me.  A fucking artist who didn't even ask me any technical questions rejected me.  Obviously he didn't like me.  What could I do?


Employers buy skills, they don't buy potential.  They buy what you can present at your resume and interview.  Even if you have done your best to present yourself, sometimes people expect different "type" of person.  I have interviewed many qualified candidates, but my coworkers didn't like them.  They vibed you.  "Can I get along working with this guy?",  "Oh he talked to much", "Oh he is too opinionated".  "I don't like his hobbies".  "I like cats and he said he loved dogs.  I don't like dog people", "Oh he doesn't have a Facebook account.  He's got something to hide."


Whatever random crap that's going on in their heads.  You can't control these.


The best thing you can do is to do your best presenting yourself.  If they don't like you, then fuck them, you move on.  End of relationship.  Did you know one of cofounders of What's App applied for a job at Facebook and Twitter but got rejected?  Technically unqualified?  Hardly.  Whoever interviewed him at Facebook and Twitter didn't like him.


Accept the fact that there are millions of personalities out there.  Job interviews aren't just about a set of skills, it's also a match.com.  If they personally don't like you, they will come up with lame reasons, within legal boundaries, why to reject you, which I am sure you have grown tired of.