Siddharth Bhat

Members
  • Content count

    8
  • Joined

  • Last visited

Community Reputation

133 Neutral

About Siddharth Bhat

  • Rank
    Newbie
  1. rather than send an impulse, why not create small particles in a radius and then give the particles an impulse? ofc, the particles would have to ignore gravity. That way, the explosion is transmitted realistically
  2. I have a few questions :)   on which line does it crash? you can use the angelScript debugger to step through code and figure out exactly where it's crashing.   As for the sizeof() operator, I'm not (entirely) sure, but why not overload a function in the C++ side like so?  template <typename T> unsigned int SizeOf(T *x){ return sizeof(T); } //register the function for different types. I haven't used AS in a while, so I'm //not really sure about the parameters :) ASengine->RegisterGlobalFunction("unsigned int sizeof(int @T)", asFUNCTION(SizeOf<int>), asCALL_CDECL); ASengine->RegisterGlobalFunction("unsigned int sizeof(float @T)", asFUNCTION(SizeOf<float>), asCALL_CDECL); //. //. //. //and so on for all other types
  3. so, you have "components" that provide access to data, and "Services" to use those components and bring out behaviour, is that correct?   As far as I'm aware, something like this is implemented in the way you talked about, have an entityManager class, that has one list of all entities in the game, and another list of all Services.   On each frame tick, the entityManager asks the Service classes to "operate" on the entities. So, (pseudocode) entityManager{ ...other members... void Update(float dt){ for(int i = 0; i < whatever_end_index; i++){ //loop over all services Service *service = this->services[i]; service->processObjects(this->objectsList, dt); } } }    where Service is an abstract base class. Service receives the list of all Entities in the game (this can be optimized, of course, so that Service holds a reference to the list). the Service then checks if the Entity has _ALL_ the Components that it needs. If the Entity does have all the components needed, it goes ahead and processes the Entity. if not, it goes to the next one, and so on...   for a more concrete example, check out the Artemis Entity Framework, or my own engine (albeit rough around the edges).   It's a problem I've grappled with quite a few times. I've used multiple approaches (make the Component class have both logic and data, use "mixins", and all other wacky ideas.), but this is the most extensible one I've found. At some point, you'll find yourself blurring the line between data and logic. Unless you want to create the Observer Pattern for each class (which is not really feasible due to both size and memory constraints), such pure separation is pretty much impossible IMHO. But, we can try to keep the divide as strict as possible :)   Hope this helps!
  4. nice article!   An intro as to what binomial coffecients are and the alternate  nCr (combination) notation that you're using might help. it took me a full 15 seconds to figure out that combination was represented that way :)      Also,  .is not the simplest equation to follow if you're not familiar with binomai coefficients. Why not just implement the naive way first (n! / ( r! (n - r)! )) and talk about this equation  in a separate section? 
  5. This seems quite similar to AntTweakBar. Neat little library anyway :)
  6. I'm kind of confused - you seem to be asking both about loading data from XML as well as how to implement a generalized casting system.    Anyway, as for the implementation details, if I remember correctly. warcraft 3 used to have standardised names for different things. Spell animations  were given names such as Spell1, Spell2, etc. Attack animations had names such as Attack1, AttackCrit and AttackSpin. The game engine would pick an animation out of a "list" of animations that you allowed. So for example, an attack might have two animations enabled by it - Attack1 and Attack2. Whereas a specialized spell might only have one animation attached, such as SpellSummon. you only needed to supply the animation names. The animations were build into the models (the animations could be baked into the models using 3dSMax. I'm not sure about how it was done, as I've never ventured into the modelling side of things, but I'm pretty sure there was a plugin provided by blizzard for animation.)   As for particle effects and particle systems, the were known as "buffs". Buffs had no gameplay impact at all. They were used to attached particles and trails to "attachment points" on the model. these attachment points were also baked into the model. common attachment points included (hand,left), (hand,right), and chest. There were also other, more specialzed attachment points that only worked on a few models such as (mount). Anyway, these buffs could have a duration associated with them, and the particles expired after the duration.   When the particles were created, they played their "created" animation. and then they looped an intermediate animation. on being destroyed, they played their "destroyed"  animation. Like I said, particles were controlled indirectly through buffs.    As for storage, blizzard has it's own format (.MPQ I think), with it's custom method for storing objects. I don't remember the details, but the wikipedia page has some decent information.   Hope this helps :)
  7. hi! well, I really appreciate the offer :) I can send you the source code , plus the placeholder resources if you want.It's just a hobby of mine though. I do take it seriously, though I may not be able to continue development when school starts, because I'll be in 10th grade (study, study, study :( ). So, yeah! If you're okay with this, then sure! I'd love some help...
  8. bump . Hoping for more ideas and inputs
  9. thanks for the replies guys! I'll surely implement all of these
  10. Hi all! So, I've been programming since 4 years, and am using SDL ( a rendering engine ) as well as Chipmunk ( a physics engine) since the past year. I've created some small games using the two. I program for a hobby and not for a living ( I'm in 10th grade). The idea is that of a hotseat game (2 people playing on the same computer). the two players are spherically shaped balls, and can destroy each other by pushing them into environmental hazards such as spikes and fire. The catch is that you can modify your surrounding area's properties to give you various powers .The areas where properties have been changed are called "Mediums". For example, you can create a "feather" medium around you that pushes anyone inside it upward, or a "Cannon" medium that amplifies your speed when you exit it . These "mediums" decay over a specific period of time( not sure how much). Mediums can overlap over one another. So , you can create some cool effects. for Example, by overlapping the "feather" and "Cannon" medium, you can push yourself really high (since the feather medium takes you up, and the cannon medium pushes you more). The aim is to destroy your enemy by pushing them into hazards through skill and smart uses of Mediums. I got this idea when our Physics teacher was explaining how the properties of Sound varies with different Mediums. I'm confident I can program this, but I want to expand this idea so it can be cooler . I'm not exactly super creative, so I decided to ask you guys on medium ideas as well as some stuff I could add. Thanks all! P.S : I'm not an expert programmer, nor a physics expert. So please explain if you've posted something complicated P.P.S : English is not my first language, so I'm sorry if there is any ambiguity or if there are any grammar mistakes. P.P.P.S : I'm open to all kinds of help, be it tips or help with the actual programming. BUT, It's strictly non- profit, and I'm just programming this to play it with my friends . If you want to use this idea, go ahead and do.
  11. thanks for all the input guys! I really appreciate it
  12. Hi all! this is my first post in gameDev forums . I've been using SDL and Chipmunk for around 6 months now with the intention of making a small game. BUT, the problem is, I have no ideas. I first planned on making a game like Forces ([url="http://compsci.ca/blog/forces/"]http://compsci.ca/blog/forces/[/url]), but I tried it out, and found it to be quite boring. So, I dropped the idea. I'd like a simple but fun idea that may be difficult to implement. I don't mind as long as it's a cool one . P.S I'm in 9th grade, so I don't know a helluva lot of Physics, Maths, or Trigonometry, though I do know a fair bit of C++ (classes, inheritance, polymorphism , data structures and related concepts ) Thanks All!