Jump to content

  • Log In with Google      Sign In   
  • Create Account

irbaboon

Member Since 07 Oct 2011
Offline Last Active Today, 09:38 AM

Posts I've Made

In Topic: C++ Passing an unknown class as an argument to a function

26 October 2015 - 05:45 AM

Lets say i want a function to take a class as a parameter but i do not know the class in advance or i want it to be able to take different classes, how can i do it?

Class object;
AnotherClass antherObject;


function(Class &object)
{
   //DO STUFF
};

How can i make "function" take "AnotherClass" as a parameter as well? Overloading is a solution but i would still have to copy the code again. Is there another way?

 

The question is kind of vague to get a good answer.

Sure, you can use templates or polymorphism - but is that really what you need?

 

If you have a specific scenario in mind, I'd advise you to post that and see what response you get then.

Sometimes you might only need to pass a few common variables instead of the class itself.

 

Edit:

Oops, I realised now that Lactose wrote the same thing :)


In Topic: Off shore Development- What to get once the job is done

25 October 2015 - 10:54 AM

Hi Lactose,

Please clarify the following

 

(1) Will he be able to make any changes to the app which is UP and running on the market place without logging into my developer account? I don't think so, but want to reconfirm.

 

(2) It looks like it is better to have the source code in case if i want to make any changes in the future. In this case, what kind of format i can ask him to send me the source code?

 

(3) I am not a programmer and don't know ABCD of game programming. So even if sends some thing, i cant really make sure that this the source code for this program. What are my options in this case except trusting him thinking that he is sending the right code?

 

Thanks

 

1. No

 

2. There is not really a format. As long as you get the code, you should be fine. If he has some fancy project setup, then it would be great if he sent you those or told you how it was set up.

 

3. I doubt someone would do that. Especially if you have made a game with him. Anyway, I would open the source files and see if you can find things you recognise.

For example, see if you find the code for the player or the code for the main menu or enemies. Just read the code a bit like English, and you should figure out what it does.

If you have no idea after that, you should perhaps either trust someone else to look over it, or learn to build the project yourself given you have the project files.

 

Edit:

Got ninja'd. Lactose probably has a better answer than mine though.


In Topic: Programming a simply 2D game

21 October 2015 - 12:40 AM

I think GameMaker is your best option. You barely need to know how to code.

http://www.yoyogames.com/studio


In Topic: Immediate mode GUI-toolkit

19 June 2015 - 04:22 PM

I find animation in any *productivity* tool terribly annoying and just non-productive. Animation on an trendy photo filter iOS app is one thing, but you don't want your Maya panels to animate and feel like half of your life is waiting for smooth transitions to happen. 

 

When I first started with transitions and animations, I added them to everything. It eventually started to annoy me how it felt like it was slower...

My solution is to not animate when you highlight something (or at least one main feature of the UI element shouldn't be animated), but when you leave the UI element, some transition or other animation may occur. This makes it feel better if you move your mouse across many buttons. It feels faster and you can see where you just highlighted.

 

Perhaps kind of offtopic, sorry about that.


In Topic: Best libraries to start a rendering engine project

15 May 2015 - 06:48 PM

I always thought that using window management APIs like SDL/glut is a rookie move. I got that feeling because I remember years ago when I first got into this, I used SDL and the window took forever to load.

Glut loads faster but the SDL window loading incident made me think this way.

Professional devs build their own window management library (and I mean input management as well), or use pro commercial apis like Qt, no?

 

Lol, what are you talking about? Took forever to load? If it was 20 seconds or so, a subsystem probably failed to load. Usually solved by restarting your computer. This has only happened to me once in 4 years of programming though. Game controller subsystem failed for some reason.

 

You probably did something wrong though. My games start in less than a second.

 

In my opinion, you only want to build your own window management library if you want to do fancy stuff. For regular window features, SDL is fine. 


PARTNERS