Jump to content

  • Log In with Google      Sign In   
  • Create Account

Interested in a FREE copy of HTML5 game maker Construct 2?

We'll be giving away three Personal Edition licences in next Tuesday's GDNet Direct email newsletter!

Sign up from the right-hand sidebar on our homepage and read Tuesday's newsletter for details!


We're also offering banner ads on our site from just $5! 1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


Melkon

Member Since 21 Sep 2013
Offline Last Active Nov 18 2014 10:34 AM

Posts I've Made

In Topic: (Tower Defense) Template metaprogramming or Factory functions to avoid class...

09 September 2014 - 06:02 AM

Thank you very much, this is simplify alot of thing. :)
(i am sad, metaprogramming were more interesting. :'( )


In Topic: (Tower Defense) Template metaprogramming or Factory functions to avoid class...

09 September 2014 - 03:15 AM

Well, actually that's the point of templating it.

 

I want to be able to easily add new things to the game.

For example, i imagine a header like this:

using MageTower = Tower<MageTowerDamage, MageTowerRange, MageTowerAttackFunction, MageTowerSpecialAbilityFunction> ;

That's it, i create a new tower in 1 line, the base stats (Damage, Range, Attack Speed etc) are defined in a different header next to each other, and the complicated parts, the lambdas (how to attack, special abilities etc) are defined in another header.

 

I am not done with that design, it's pretty much just an idea, but the point of it is actually to avoid things like this:

 

enum class TowerType
{
    ARROW, MAGIC, BOMB
};

Tower& createTower(TowerType type)
{
    switch(type)
	{
	case TowerType::ARROW:
		return *new Tower(100, 50);
	case TowerType::MAGIC:
		return *new Tower(50, 100);
	case TowerType::BOMB:
		return *new Tower(300, 25);
	default:
		assert(false);
	}
}

 

 Imagine if i have 50 tower in your enum, and a 50 case in the switch statement. Even worse, there could be like 200, or even 500 minion, with the same design. It's pretty hard to read and develop further. I think the programmer just loose himself easily in that.


In Topic: Battalions, new-age online RTS

01 September 2014 - 12:38 AM

Well, without reading the pdf i can't really help you, but i think if you would speak that way, it would be more inspiring. smile.png

 

"I believe, that in a Strategic game the most important part must be the strategy: planning your infrastructure, train as optimal army as you can etc. For me it's not acceptable, when the game is decided by microing. I believe in strategic games without micro. Wanna join? :)" (actually i believe in the same, i don't play RTS-s just because of microing)

You shouldn't speak about the details, you shouldn't speak about HOW you achieve the goals, or WHAT is the goal.

You should speak about Why you make your decisions. If the Why is clear, everybody can get similar dicisions using your Why as a filter.

 

However, if you speak about What you do or How you do, everybody will have a "better" idea, and you will feel like noone understand you. smile.png

 

You can get peoples for your project who believe what you believe only if you speak about what you believe.

 

I am not a psychologist btw, sorry if it's too much in that direction... biggrin.png


In Topic: Battalions, new-age online RTS

30 August 2014 - 12:13 PM

 

But I thought surely people would be inclined to give feedback on rather or not they liked the idea.

 

 

Well you posted a really long pdf about your idea. smile.png

 

It's a great work, and it's really great that you have such a detailed idea. smile.png
However you can't expect, that someone, who don't wanna actually work on it will read it. It's really good when you share your concept with someone who work with you on that, but it's much more than an idea. tongue.png

There is too much detail to catch the point as someone, who just read alot of topic searching for something interesting. Only the peoples who are already interested will read that pdf, but you didn't inspired anyone to do that.

 

I think you would have better success by writing an overview about your idea, what do you think, what's the most unique, most interesting thing in your project? What is the thing that will inspire someone to work on it, or play with it?

The details are really important if you want to make a good game, however, to sell your idea you should focus on the point of your project. smile.png

 

Also i don't know what's the point of that topic? Do you want opinions about your idea? Do you want someone to work with? (in that case, what do you need? C++ programmer? Artist? Musician?)

 

If you would clarify these things probably you would have better success, i guess the best you can do it is clarifying these things in another topic.

 

I hope i could help, good luck! smile.png


In Topic: Why does this work?(Class prototype?)

22 March 2014 - 11:52 AM

This is "Forward declaration"

You say that there is a class "a", and the compiler shouldn't know anything about it, because in the header you don't use the functions and variables in "a".

 

http://en.wikipedia.org/wiki/Forward_declaration

 

And yes, it's good, you include less file, so you will compile faster. If you can forward declare something, it's a good idea to do it.


PARTNERS