Jump to content
  • Advertisement

armond

Member
  • Content Count

    181
  • Joined

  • Last visited

Community Reputation

168 Neutral

About armond

  • Rank
    Member
  1. Thanks, that was very informative. Can these information be stored in a file? I'd appreciate if you could provide me a visualization of how it may look like. Thanks very much and I greatly appreciate your inputs!
  2. Hi guys, So I've been wondering about this for a long time. If you've ever played the type of games like Final Fantasy Tactics and most specially, Super Robot Wars then you'll probably know what I'm talking about. Before anything else, here's a short clip of SRW. Alright, Super Robot Wars is a turn-based strategy game which shows Animated fighting robots upon commencing an attack. I was wondering how the sequence of animations are made, and how are they timed so the unit being attacked reacts timely (as if being hurted). In SRW, robot units has multiple attacks and multiple animations for those attacks, how are these attacks stored/tracked and how does the engine know which sequence of animation is gonna be pulled off? I'm just asking for "any idea" of how this is done. Maybe you've done something like this before. Fighthing games are the closests thing I could think of but I don't know how specific moves are done in that type of game too. I would appreciate your inputs to satisfy my burning curiosity. Thanks!
  3. @Samith - Yes you got my point right! So having a wave class is preferable over loading from a file? I was hoping to add some flexibility so the game is configurable outside of the executable file. But thanks a lot!
  4. Hi guys In Manic Shooters what is the ideal way of creating enemy waves? Like Enemy wave 1 - Should appear at start of level Enemy wave 2 - Should appear after first wave of enemies has all been destroyed or have left the screen Enemy wave 3 - Should appear when player is half the length of the entire level Boss - Should appear once all enemies are gone and player have reached a certain length of the level? The way I did this before is create a map in a text file like xxxx0x0 000xx00 xxx0000 0000000 I hope you could relate to what I'm trying to say. I'm just trying to move all objects at once at preferably the same speed until they reach the screen. This is a little messy from my experience as enemies sometimes tend to overlap each other. I can't seem to orchestrate the scene as I want to. Any ideas? Thanks!
  5. Hi guys I'm working on one of the bosses for my sidescrolling shooting game(2d). And in my game world(this is C++ btw), this is one pointer to a boss object Boss* boss = new AnyBoss(); There are mainly two issues that I have right now 1. How to make the SnakeBoss's body follow the head smoothly. 2. How would the ship collide with the boss's body. To tackle problem #1 1. I have two classes right now, SnakeBoss and SnakeBody. I have a List(vector) of SnakeBody's in class boss. The algorithm for movement is done in the SnakeBoss's move method SnakeBoss::move(int _x, int _y) { prevX = x; prevY = y; for (int i = 0; i < MAX_SNAKE_BODIES; i++) //move the bodies { if (i == 0) { snakeBodies[0]->move(prevX, prevY); //move the first body } else { sBodyPrevX = snakeBodies[i -1]->getPreX(); sBodyPrevY = snakeBodies[i -1]->getPreY(); snakeBodies->move(sBodyPrevX, sBodyPrevY); } } Sprite::move(_x, _y); //just move the head } This is moving the bodies, but in a very stupid way. It doesn't look like the bodies are actually following the head. Problem #2 Since there is only one pointer for both Boss and Ship in my game, I could easily do collision detection on them using bounding boxes. if ( ship->collides(boss) ) { ship->takeDamage(); } However, this time, my boss has several bodies that I need to test collision with. And I can only do it with one. Changing the single boss pointer to an array or list doesn't seem like a good idea. I'd like to hear your suggestions guys. Thanks!
  6. In my previous game which was a side scrolling shooting game, I made all my coordinates as integers. This game me problems with regards to precision and the way my objbects moved, was way too fast. Coming from a Java background, I made accessor and mutators for my class members like x and y which I later on just made public and sometimes, access is encapsulated through a move(x, y) method. I just want to ask, would it be a better idea to make my coordinates float? And would it be better to default access to coordinates to public? Thanks!
  7. This happened to me on two different computers. Before, I was on a PC with 1 Gb of RAM. I can't remember the whole specs but for sure I was running on a core duo PC. I had no problem running on P4 PC (these are all running on windows BTW) with 512 MB or below. Only those with 1 gig and higher. There is no error in my code. The progress bar would just stop after compiling 2 or 3 files and though I'm still able to click the cancel button the compilation won't stop. Has anyone here had the same experience I had on a PC with memory greater than 512MB? The versions I tried are dev-cpp 4.9.x.x and wxdev-cpp 6.10-2
  8. Having observed the old shooting games such as R-Type http://www.sawtoothdistortion.com/evolutionaryprototype/images/rtype3/index.html I noticed that bosses isn't made of just a single sprite or object. Same for the normal enemies that flies around and shoots you. In my current project, I only have a single List(actually, a vector) where I store all the enemies. I actually have the following data structure. 1 List for Enemies 1 List projectiles A pointer to a boss Now, suppose the boss is some sort of snake or Centipede wherein it has many parts with different behaviors, or the other parts would just follow a certain body part such as the head. How is this implemented with the old games? Thanks!
  9. armond

    New to J2ME developing

    A follow up question which I think would also be beneficial to the topic starter. How do you structure your classes in J2ME? In J2SE, we would usually have something like Enemy extends Sprite KickAssMonster extends Enemy can we also do this in J2ME? Can we do them in separate files also? Or do we program as if we're programming in structured C? Thanks!
  10. Hi guys! Actually this doesn't happen only with dev-cpp but to mingw itself. I'm just wondering since in my machine which has 512MB of RAM and another which has 192MB this doesn't happen. However, here in my office machine which has a 2GB RAM, the compiler would start then hang for the rest of its life. This also happened before I upgraded to 2GB, before I only had 1GB. I already formatted the PC and reinstalled Dev-Cpp(even downloaded another one). I have lots of other IDE's here and this only happens with dev-cpp so far..
  11. Hi guys! I was wondering if it's ok to keep a separate list of player projectiles and enemy projectiles? Or would it be better to just keep them in one simple list and have a member called bool hostile in the Projectile class? This is how my class looks like right now... #ifndef _PROJECTILE_H_ #define _PROJECTILE_H_ class Projectile : public Sprite { protected: bool active; bool fired; Direction direction; int angle; public: virtual ~Projectile(); public: virtual void update(); virtual void move(int x, int y); virtual bool isFired(); virtual bool isActive(); virtual void makeInactive(); }; #endif Thanks!
  12. armond

    Over-Engineered?

    Hi! I think I solved the problem now. Before, I could only apply the Weapons to the main ship and the Vulcan(Projectile) would only go right. After talking to a friend, it would seem that I'm missing some important members... Direction and angle, that is. Thanks!
  13. armond

    Over-Engineered?

    Hi guys! Still on the sidescrolling shooter thing... Right now, I have two superclasses. Mainly, the Weapon and Projectile classes. class Weapon { protected: int x; int y; int ammo; int maxAmmo; int fireRate; int waitCount; int weaponLevel; public: virtual ~Weapon(); public: virtual void dragWeapon(int x, int y) = 0; virtual void fire() = 0; virtual void recharge() = 0; virtual void fullCharge() = 0; virtual char* getWeaponName() = 0; virtual void incrementWeaponLevel(); }; class Projectile : public Sprite { protected: bool active; bool fired; public: virtual ~Projectile(); public: virtual void update(); virtual void move(int x, int y); virtual bool isFired(); virtual bool isActive(); virtual void makeInactive(); }; and several classes would extend from theser two superclasses. Now, I have subclassess called VulcanGun which extends from Weapon, and Vulcan which extends from Projectile. Here are the implementations. #include "globals.h" VulcanGun::VulcanGun() { //std::cout << "Creating VulcanGun object...\n"; } VulcanGun::VulcanGun(int x, int y, int ammo, int maxAmmo, int fireRate, int wLevel) { this->x = x; this->y = y; this->ammo = ammo; this->maxAmmo = maxAmmo; this->fireRate = fireRate; this->waitCount = 0; weaponLevel = wLevel; } VulcanGun::~VulcanGun() { } void VulcanGun::dragWeapon(int x, int y) { this->x = x; this->y = y; } void VulcanGun::fire() { if (waitCount <= 0) { int pfPoolSize; switch(weaponLevel) { case 1: ProjectileFactory::projectilePool.push_back( ProjectileFactory::getProjectile(VULCAN) ); pfPoolSize= ProjectileFactory::projectilePool.size(); ProjectileFactory::projectilePool[pfPoolSize - 1]->move(x, y); waitCount = fireRate; play_sample( SoundManager::getSample(VULCAN_GUN_FIRE_SFX), 255, 0, 2000, 0); break; case 2: ProjectileFactory::projectilePool.push_back( ProjectileFactory::getProjectile(VULCAN) ); ProjectileFactory::projectilePool.push_back( ProjectileFactory::getProjectile(VULCAN) ); pfPoolSize= ProjectileFactory::projectilePool.size(); ProjectileFactory::projectilePool[pfPoolSize - 1]->move(x, y); ProjectileFactory::projectilePool[pfPoolSize - 2]->move(x, y + 20); waitCount = fireRate; play_sample( SoundManager::getSample(VULCAN_GUN_FIRE_SFX), 255, 0, 2000, 0); break; case 3: ProjectileFactory::projectilePool.push_back( ProjectileFactory::getProjectile(VULCAN) ); ProjectileFactory::projectilePool.push_back( ProjectileFactory::getProjectile(VULCAN) ); ProjectileFactory::projectilePool.push_back( ProjectileFactory::getProjectile(VULCAN) ); pfPoolSize= ProjectileFactory::projectilePool.size(); ProjectileFactory::projectilePool[pfPoolSize - 1]->move(x, y); ProjectileFactory::projectilePool[pfPoolSize - 2]->move(x + 10, y + 10); ProjectileFactory::projectilePool[pfPoolSize - 3]->move(x, y + 20); waitCount = fireRate; play_sample( SoundManager::getSample(VULCAN_GUN_FIRE_SFX), 255, 0, 2000, 0); break; default: break; } } } void VulcanGun::recharge() { --this->waitCount; } void VulcanGun::fullCharge() { this->waitCount = 0; } char* VulcanGun::getWeaponName() { return "Vulcan Gun"; } #include "globals.h" /* Vulcan::Vulcan() { } */ Vulcan::Vulcan(int x, int y, int w, int h, int speed, bool active, bool fired) { this->x = x; this->y = y; this->width = w; this->height = h; this->speed = speed; this->active = active; this->fired = fired; animation = new Animation(BitmapManager::getBitmap(VULCAN_SPRITE), 5, 4, BY_WIDTH); } Vulcan::~Vulcan() { //std::cout << "Deleting Vulcan...\n"; } void Vulcan::update() { if (this->x < SCREEN_W) { move(this->x + speed, this->y); animation->animate(); } } void Vulcan::move(int x, int y) { this->x = x; this->y = y; } void Vulcan::draw() { draw_sprite(GameManager::buffer, animation->getCurrentAnimationFrame(), this->x, this->y); } as you can see with that, the VulcanGun and Vulcan classes seems to be too specifically designed for the main ship. I could not reuse them for use of the enemies. Do you guys have any idea what I could be missing? Thanks!
  14. What I want is for my enemies to move a little, throw some stuff on the player then go somewhere else(retreat, charge, etc). If I had for example pre-defined paths in a file... Like: moveLeft, moveRight, Shoot, Shoot, Shoot, moveRight, moveRight, moveRight is this what you guys mean?
  15. Thanks! I think I got the idea! :)
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!