Jump to content

  • Log In with Google      Sign In   
  • Create Account

FREE SOFTWARE GIVEAWAY

We have 4 x Pro Licences (valued at $59 each) for 2d modular animation software Spriter to give away in this Thursday's GDNet Direct email newsletter.


Read more in this forum topic or make sure you're signed up (from the right-hand sidebar on the homepage) and read Thursday's newsletter to get in the running!


menyo

Member Since 09 May 2010
Offline Last Active Today, 01:19 AM

Posts I've Made

In Topic: Adding item modifiers

12 November 2014 - 02:44 PM

Yeah i noticed, I'm wondering what the power of an Interface exactly is. Why shouldn't i just add a class and implement that when needed?

 

I'm currently expirimenting with a simple class holding all the stats. This class is used in the entity class (player and NPC objects) and in Items. When a item is equipped it adds all it's stats to the player (or NPC if i would ever add that). When it is unequipped it removes these stats.

 

I'm wondering if i should implement Interfaces because of my initial question.

//Should be implemented by weapons
public interface IDamageStat {
    void AddDamage(Entity entity);
    void RemoveDamage(Entity entity);
}


//Should be implemented by rings and necklaces
public Interface IResistanceStats {
    void AddResistance(Entity entity);
    void RemoveResistanceStat(Entity entity);
}


//Etc...

Coding each stat(group) at the appropriate item type. Or just add every stat for each item even if a armor could never alter damage. Design wise i bet using Interfaces is the way to go but this would add a lot of unnecessary implements and coding. Any thoughts?


In Topic: Adding item modifiers

12 November 2014 - 12:23 PM

I am very interested in the method Tom Rijnbeek provides but i lack the knowledge to implement this properly. I did some research on Interfaces but i cannot see how this would help me.

 

For what I understand I could add a Interface like this:

Interface IModifier
{
    private int minDamage;
    //Etc...

   //Now i could add a method that adds (or subtracts when unequiped) this to the totals of the weapon and/or player.
   public void Apply(Entity player)
   {
        player.minDamage += minDamage;
        //Etc,..
   }   
}

In Topic: Experienced programmer, looking for most effective/efficient way to dive into...

27 October 2014 - 04:34 PM

For C++:

http://stackoverflow.com/questions/388242/the-definitive-c-book-guide-and-list

For OpenGL:

https://www.opengl.org/documentation/books/

http://gamedev.stackexchange.com/questions/32876/good-resources-for-learning-modern-opengl-3-0-or-later

 

P.S. For the fundamentals of graphics programing you'll need some math knowledge - analytical geometry, linear algebra.

For the shaders part you can start by checking out some theory on shading/illumination: http://en.wikipedia.org/wiki/List_of_common_shading_algorithms

If you're into ray-tracing too, I'd recommend more math + http://www.pbrt.org/  + http://www.scratchapixel.com/

And here you can find plenty of good stuff on the subject: http://blog.selfshadow.com/

^This^

 

These are some interesting reads even for someone that in not mainly interested in graphics programming or even 3D. Wish i could give some more upvotes.


In Topic: Do i really need to deep copy this?

27 October 2014 - 04:23 PM

As to your C# question, it took me some time to look it up in all of my tests on pathfinding. But it seems I do re-initialize it every time as well. Since at the start of the pathfinding I know the open and closed flags should be always false and walkable flag does not change I just iterated the map and reset the flags before I request a path.

 

So creating a second NodeArray[][] and reset the NodeArray[][] i work on with that should be cheaper then iterating over it and resetting each flag "manually"? This is a simple solution, almost too simple :). One would think that behind the scenes the exact same thing happens or does just the memory pointer change?


In Topic: Educational game - model, platform and other stuff

19 October 2014 - 08:50 AM

You will not be able to transform someones game to your liking and monetize it without the makers/copyright holders consent and source code. But a simple question and answer game can be coded very easy in any frame work but you do need programming skills.

 

Spamming is forbidden, at least in most countries so be carefull with publishing it on any network that is not your own without the owners consent.

 

Best platform? What platform do these 10.000 potential customers use? There are plenty of frameworks that port to multiple platforms when finished. I would go for Java/LibGDX and port it initially to Windows/Android/HTML5 (Free) and if there is a market get the IOS license (paid, RoboVM) as well.

 

Obviously you need some basic programming experience but other then that once you get to know your framework/engine then a simple trivia game should be easy to make.


PARTNERS