Search Results

Search found 84 results on 4 pages for 'monsters'.

Page 1/4 | 1 2 3 4  | Next Page >

  • Balancing Player vs. Monsters: Level-Up Curves

    - by ashes999
    I've written a fair number of games that have RPG-like "levelling up," where the player gains experience for killing monsters/enemies, and eventually, reaches a new level, where their stats increase. How do you find a balance between player growth, monster strength, and difficulty? The extreme ends of this spectrum are: Player levels up really fast and blows away monsters without much effort Monsters are incredibly strong and even at low levels, are very difficult to beat I've also tried a strange situation of making enemies relative to players, i.e. an enemy will always be at 50% or 100% or 150% of player stats (thus requiring the player to use other techniques instead of brute strength to succeeed). But where's the balance, and how do you find it? Edit: For example, I am expecting to hear things like: Balance high instead of balance low (200 HP and 20 str is easier to balance than 20 HP and 2 str) Look at easiest vs. hardest monsters, and see what you have in terms of a range

    Read the article

  • Random movement of wandering monsters in x & y axis in LibGDX

    - by Vishal Kumar
    I am making a simple top down RPG game in LibGDX. What I want is ... the enemies should wander here and there in x and y directions in certain interval so that it looks natural that they are guarding something. I spend several hours doing this but could not achieve what I want. After a long time of coding, I came with this code. But what I observed is when enemies come to an end of x or start of x or start of y or end of y of the map. It starts flickering for random intervals. Sometimes they remain nice, sometimes, they start flickering for long time. public class Enemy extends Sprite { public float MAX_VELOCITY = 0.05f; public static final int MOVING_LEFT = 0; public static final int MOVING_RIGHT = 1; public static final int MOVING_UP = 2; public static final int MOVING_DOWN = 3; public static final int HORIZONTAL_GUARD = 0; public static final int VERTICAL_GUARD = 1; public static final int RANDOM_GUARD = 2; private float startTime = System.nanoTime(); private static float SECONDS_TIME = 0; private boolean randomDecider; public int enemyType; public static final float width = 30 * World.WORLD_UNIT; public static final float height = 32 * World.WORLD_UNIT; public int state; public float stateTime; public boolean visible; public boolean dead; public Enemy(float x, float y, int enemyType) { super(x, y); state = MOVING_LEFT; this.enemyType = enemyType; stateTime = 0; visible = true; dead = false; boolean random = Math.random()>=0.5f ? true :false; if(enemyType == HORIZONTAL_GUARD){ if(random) velocity.x = -MAX_VELOCITY; else velocity.x = MAX_VELOCITY; } if(enemyType == VERTICAL_GUARD){ if(random) velocity.y = -MAX_VELOCITY; else velocity.y = MAX_VELOCITY; } if(enemyType == RANDOM_GUARD){ //if(random) //velocity.x = -MAX_VELOCITY; //else //velocity.y = MAX_VELOCITY; } } public void update(Enemy e, float deltaTime) { super.update(deltaTime); e.stateTime+= deltaTime; e.position.add(velocity); // This is for updating the Animation for Enemy Movement Direction. VERY IMPORTANT FOR REAL EFFECTS updateDirections(); //Here the various movement methods are called depending upon the type of the Enemy if(e.enemyType == HORIZONTAL_GUARD) guardHorizontally(); if(e.enemyType == VERTICAL_GUARD) guardVertically(); if(e.enemyType == RANDOM_GUARD) guardRandomly(); //quadrantMovement(e, deltaTime); } private void guardHorizontally(){ if(position.x <= 0){ velocity.x= MAX_VELOCITY; velocity.y= 0; } else if(position.x>= World.mapWidth-width){ velocity.x= -MAX_VELOCITY; velocity.y= 0; } } private void guardVertically(){ if(position.y<= 0){ velocity.y= MAX_VELOCITY; velocity.x= 0; } else if(position.y>= World.mapHeight- height){ velocity.y= -MAX_VELOCITY; velocity.x= 0; } } private void guardRandomly(){ if (System.nanoTime() - startTime >= 1000000000) { SECONDS_TIME++; if(SECONDS_TIME % 5==0) randomDecider = Math.random()>=0.5f ? true :false; if(SECONDS_TIME>=30) SECONDS_TIME =0; startTime = System.nanoTime(); } if(SECONDS_TIME <=30){ if(randomDecider && position.x >= 0) velocity.x= -MAX_VELOCITY; else{ if(position.x < World.mapWidth-width) velocity.x= MAX_VELOCITY; else velocity.x= -MAX_VELOCITY; } velocity.y =0; } else{ if(randomDecider && position.y >0) velocity.y= -MAX_VELOCITY; else velocity.y= MAX_VELOCITY; velocity.x =0; } /* //This is essential so as to keep the enemies inside the boundary of the Map if(position.x <= 0){ velocity.x= MAX_VELOCITY; //velocity.y= 0; } else if(position.x>= World.mapWidth-width){ velocity.x= -MAX_VELOCITY; //velocity.y= 0; } else if(position.y<= 0){ velocity.y= MAX_VELOCITY; //velocity.x= 0; } else if(position.y>= World.mapHeight- height){ velocity.y= -MAX_VELOCITY; //velocity.x= 0; } */ } private void updateDirections() { if(velocity.x > 0) state = MOVING_RIGHT; else if(velocity.x<0) state = MOVING_LEFT; else if(velocity.y>0) state = MOVING_UP; else if(velocity.y<0) state = MOVING_DOWN; } public Rectangle getBounds() { return new Rectangle(position.x, position.y, width, height); } private void quadrantMovement(Enemy e, float deltaTime) { int temp = e.getEnemyQuadrant(e.position.x, e.position.y); boolean random = Math.random()>=0.5f ? true :false; switch(temp){ case 1: velocity.x = MAX_VELOCITY; break; case 2: velocity.x = MAX_VELOCITY; break; case 3: velocity.x = -MAX_VELOCITY; break; case 4: velocity.x = -MAX_VELOCITY; break; default: if(random) velocity.x = MAX_VELOCITY; else velocity.y =-MAX_VELOCITY; } } public float getDistanceFromPoint(float p1,float p2){ Vector2 v1 = new Vector2(p1,p2); return position.dst(v1); } private int getEnemyQuadrant(float x, float y){ Rectangle enemyQuad = new Rectangle(x, y, 30, 32); if(ScreenQuadrants.getQuad1().contains(enemyQuad)) return 1; if(ScreenQuadrants.getQuad2().contains(enemyQuad)) return 2; if(ScreenQuadrants.getQuad3().contains(enemyQuad)) return 3; if(ScreenQuadrants.getQuad4().contains(enemyQuad)) return 4; return 0; } } Is there a better way of doing this. I am new to game development. I shall be very grateful to any help or reference.

    Read the article

  • How to add monsters to a Pokemon game?

    - by Michael J. Hardy
    My friends and I are starting a game like Pokemon and we wanted to know how will we add monsters to the game? We're using VisualBasic because my friend's brother said it would be easier. So far we can put pictures of the monsters on the screen and you can click to attack and stuff. Right now when we want to add a monster we have to make a new window. This will take us a long time to make all the windows for each type of monster. Is there a tool or something to make this go faster? How do game companies do this?

    Read the article

  • How to synchronise the acceleration, velocity and position of the monsters on the server with the players?

    - by Nick
    I'm building an MMO using Node.js, and there are monsters roaming around. I can make them move around on the server using vector variables acceleration, velocity and position. acceleration = steeringForce / mass; velocity += acceleration * dTime; position += velocity * dTime; Right now I just send the positions over, and tell the players these are the "target positions" of the monsters, and let the monsters move towards the target positions on the client with a speed dependant on the distance of the target position. It works but looks rather strange. How do I synchronise these properly with the players without looking funny to them, taking into account the server lag? The problem is that I don't know how to make use of the correct acceleration/velocity values here; right now they just move directly in a straight line to the target position instead of accelerating/braking there properly. How can I implement such behaviour?

    Read the article

  • How or why would this mechanic (not) work to bring game balance to a singleplayer RPG? [closed]

    - by 0xFFF1
    Mechanic details The player, the monsters, and the merchants act as three separate parties. The player needs to beat up monsters for exp points and resources to sell and to buy potions from merchants to continue to fight. The monsters need healing and reviving to survive (also bought from merchants) and the merchants need potion ingredients from the player and the monsters to make potions to sell. These potions are only able to be processed in such bulk by merchants thus their potions would be cheaper than making them yourself. Only the monsters can farm ingredients in bulk. Only the player is or has to be overly aggressive (in bulk). Monsters can farm and produce "Level up candies" that do the work of exp. they are eaten right away after they are made and are never stockpiled or held for fear of the player and merchants who want to sell to the player. The monsters will defend themselves. Reviving is very expensive. The merchants can be found either with a concerned expression or a grinning expression based on how much profit they are making compared to their morale standing. The economies of each monster town and merchant city are distinct but interconnected. Magic Swords are worth a lot. So what I need to know is what concerns would there be to design a game around this mechanic and/or design this mechanic around a developing game. which would fare better? Is game balance an issue here? (how strong the monsters get or how quickly they die off based on the player's input into the system), Or is game balance solely in the hands of the player? (he decides if he overkills monsters or get underleveled.) What do I need to think about to make sure it isn't too easy or too hard to swing the amount/strength of monsters compared to the player and the amount of profit the merchants get vs the player. Would indicating how out of whack things are getting in game help with this?

    Read the article

  • Cliché monsters to populate a steampunk fantasy setting dwarven dungeon?

    - by Alexander Gladysh
    I'm looking for a list of cliché monsters for a steampunk computer game (assume one kind or another of casual rogue-like RPG), to populate lower levels of ancient dwarven-built dungeons. Dwarves are a technology/science race in the setting I am aiming for. The world is a low-magic one. I'm stuck after listing various mechanical golems, gigantic spiders (every dungeon must have some of them!), and maybe a mechanical barlog as a megaboss. What would player expect? What are the key cultural references for such setting? I know a couple of games with suitable steampunk dwarves, but none are detailed enough in the underworld monsters area. Please point me in the right direction. (If you have a single funny monster suggestion, please mention it in comments, not in answer. ;-) )

    Read the article

  • Turn-Based RPG Battle Instance Layout For Larger Groups

    - by SoulBeaver
    What a title, eh? I'm currently designing a videogame; a turn-based RPG like Final Fantasy (because everybody knows Final Fantasy). It's a 2D sprite game. These are my ideas for combat: -The player has a group of 15 members (main character included) -During battle, five of the group are designated as active, and appear in the battle. -These five may be switched out at leisure, or when one of the five die. -At any time, the Waiting members can cast buffs, be healed by the active members, or perform special attacks. -Battles should contain 10+ monsters at least. I'm aiming for 20, but I'm not sure if that's possible yet. -Battles should feel larger than normal due to the interaction of Waiting members, active members and the increased amount of monsters per battle. -The player has two rows in which to put the Active members: front and back. -Depending on the implementation, I might allow comboing of player attacks and skills. These are just design ideas, so beware! I have not been able to test this out yet- I have no idea yet if any of these ideas bunched together will make for a compelling game. What sounds good on paper doesn't necessarily have to be good in practice! What I'm asking now is how to create the layout for this. My starting point are the battles in Final Fantasy VI, with up to 5-6 monsters on the left and the characters on the right- monsters on both sides if it's a pincer attack. However, this view would not work feasible with my goal of 20 monsters and 5 characters. All the monsters on the left would appear cluttered unless I scale them far far back. If I create a pincer-like map, then there would be no real pincer-attack possible. If I space the monsters out I force the player to scroll the screen- a game mechanic I've come across and not enjoyed imho. My question is: does anybody have any layouts or guides for designing battle maps in turn-based RPGs, especially with a larger number of enemies taken into consideration? How should it look? I am not asking for specific combat mechanics, just the layout for the moment.

    Read the article

  • Designing spawning system

    - by Vlad
    I played this game recently http://www.kongregate.com/games/JuicyBeast/knightmare-tower and I am amazed by the way how different monsters are beign spawned. I personally developed my own shooter game and I added time based but also count based spawing system. By count based I mean when there are 5 enemies on stage stop spawning. But this is one example. My question is how are these spawning mechanism built, is there some pattern or some theory how they are built? Are there some online materials/pages where I can improve my knowledge? To sumarize, let just say we have 6 types of monsters. I start the game and kill of monsters of type 1,2 and 3 all the time. Once I pass the first ceiling, like in the game above, monster type 4 appear. ANd so on. As I progress trough the game, the same system of 6 types of monsters stay, but they become more and more resilient and dangerous. So I must also improve to be able to destroy the same monsters but now stronger. My question is simple, are there some theories built or written for developing this type of inteligent systems? Note: This is a general question, not tied up with some game or how exactly should the game work. I am capable to program my own mechanisms but I think I need some help. Thanks.

    Read the article

  • Best pathfinding for a 2D world made by CPU Perlin Noise, with random start- and destinationpoints?

    - by Mathias Lykkegaard Lorenzen
    I have a world made by Perlin Noise. It's created on the CPU for consistency between several devices (yes, I know it takes time - I have my techniques that make it fast enough). Now, in my game you play as a fighter-ship-thingy-blob or whatever it's going to be. What matters is that this "thing" that you play as, is placed in the middle of the screen, and moves along with the camera. The white stuff in my world are walls. The black stuff is freely movable. Now, as the player moves around he will constantly see "monsters" spawning around him in a circle (a circle that's larger than the screen though). These monsters move inwards and try to collide with the player. This is the part that's tricky. I want these monsters to constantly spawn, moving towards the player, but avoid walls entirely. I've added a screenshot below that kind of makes it easier to understand (excuse me for my bad drawing - I was using Paint for this). In the image above, the following rules apply. The red dot in the middle is the player itself. The light-green rectangle is the boundaries of the screen (in other words, what the player sees). These boundaries move with the player. The blue circle is the spawning circle. At the circumference of this circle, monsters will spawn constantly. This spawncircle moves with the player and the boundaries of the screen. Each monster spawned (shown as yellow triangles) wants to collide with the player. The pink lines shows the path that I want the monsters to move along (or something similar). What matters is that they reach the player without colliding with the walls. The map itself (the one that is Perlin Noise generated on the CPU) is saved in memory as two-dimensional bit-arrays. A 1 means a wall, and a 0 means an open walkable space. The current tile size is pretty small. I could easily make it a lot larger for increased performance. I've done some path algorithms before such as A*. I don't think that's entirely optimal here though.

    Read the article

  • How can I find out what is stopping my object from disposing properly?

    - by SLC
    I have a rather large and complex game in C#, and in it are various monsters. The monsters are created in the game by a MonsterCreator, and each monster has various plugins that are loaded from external DLLs. When my monsters die, they call a method in the MonsterCreator, and the MonsterCreator removes them from the game map, removes them from its own internal list of monsters, and then finally calls the Dispose() method on the monster itself. The dispose method calls the dispose method of each plugin, then clears up any of its own code. This seems to work fine, with lots of monsters, but somewhere there is a bug that crops up after a while, where a monster dies, but it has already been removed - it seems the callback telling the MonsterCreator is being called over and over, when the monster should have been removed on the first call. The likely candidate is that some of the plugins for the monster register themselves with an Event that pulses them every X number of seconds so they can perform logic. Stepping through I can see that they are unregistering with the Event when they die, but something is getting through still and I don't know what it is. Do you have any advice for debugging the problem? I can't post code really because it's split across a ton of libraries and plugin dlls, so it's more a case of figuring out the best way to debug it. I threw an exception in code when the monster died callback method is thrown and the monster cannot be found on the map to be removed, so I have the misbehaviing Monster, is there a way I can see what is still linked to it?

    Read the article

  • C++ Array of pointers: delete or delete []?

    - by Jasper
    Cosider the following code: class Foo { Monster* monsters[6]; Foo() { for (int i = 0; i < 6; i++) { monsters[i] = new Monster(); } } virtual ~Foo(); } What is the correct destructor? this: Foo::~Foo() { delete [] monsters; } or this: Foo::~Foo() { for (int i = 0; i < 6; i++) { delete monsters[i]; } } I currently have the uppermost constructor and everything is working okey, but of course I cannot see if it happens to be leaking... Personally, I think the second version is much more logical considering what I am doing. Anyway, what is the "proper" way to do this?

    Read the article

  • :order does not work on :include

    - by SpyrosP
    Hello there, i'm wondering why this gives me an error : DiscoveredLocation.find_all_by_user_id(user.id, :include => [:boss_location, :monsters], :order => 'boss_location.location_index ASC') It seems as if it's trying to execute a really long query and i get an error like : Mysql::Error: Unknown column 'monsters_discovered_locations_join.boss_location_id' in 'on clause': SELECT `discovered_locations`.`id` AS t0_r0, `discovered_locations`.`user_id` AS t0_r1, `discovered_locations`.`boss_location_id` AS t0_r2, `discovered_locations`.`created_at` AS t0_r3, `discovered_locations`.`updated_at` AS t0_r4, `boss_locations`.`id` AS t1_r0, `boss_locations`.`name` AS t1_r1, `boss_locations`.`location_index` AS t1_r2, `boss_locations`.`min_level` AS t1_r3, `boss_locations`.`needed_gold_to_open` AS t1_r4, `boss_locations`.`created_at` AS t1_r5, `boss_locations`.`updated_at` AS t1_r6, `monsters`.`id` AS t2_r0, `monsters`.`name` AS t2_r1, `monsters`.`strength` AS t2_r2, `monsters`.`dexterity` AS t2_r3, `monsters`.`magic` AS t2_r4, `monsters`.`accuracy` AS t2_r5, `monsters`.`minGold` AS t2_r6, `monsters`.`maxGold` AS t2_r7, `monsters`.`hp` AS t2_r8, `monsters`.`level` AS t2_r9, `monsters`.`armor` AS t2_r10, `monsters`.`first_class` AS t2_r11, `monsters`.`weapon_id` AS t2_r12, `monsters`.`imageName` AS t2_r13, `monsters`.`monster_type` AS t2_r14, `monsters`.`boss_location_index` AS t2_r15, `monsters`.`boss_location_id` AS t2_r16, `monsters`.`created_at` AS t2_r17, `monsters`.`updated_at` AS t2_r18 FROM `discovered_locations` LEFT OUTER JOIN `boss_locations` ON `boss_locations`.id = `discovered_locations`.boss_location_id LEFT OUTER JOIN `boss_locations` monsters_discovered_locations_join ON (`discovered_locations`.`id` = `monsters_discovered_locations_join`.`boss_location_id`) LEFT OUTER JOIN `monsters` ON (`monsters`.`boss_location_id` = `monsters_discovered_locations_join`.`id`) WHERE (`discovered_locations`.`user_id` = 986759322) ORDER BY boss_location.location_index ASC The models associations are : class BossKill < ActiveRecord::Base belongs_to :user belongs_to :monster class DiscoveredLocation < ActiveRecord::Base belongs_to :user belongs_to :boss_location has_many :monsters, :through => :boss_location has_many :boss_kills, :through => :monsters class BossLocation < ActiveRecord::Base has_many :discovered_locations has_many :users, :through => :discovered_locations has_many :monsters Any ideas ?

    Read the article

  • How do i provide a custom session ID getter/setter in asp.net

    - by Monsters
    I want to pass the sessionID as a json parameter, I can see how to override SessionIDManager and such, but this just covers custom creation/validation of sessionID's as opposed to where it actually gets the sessionID from. There is of course 'cookieless' which puts it in the url, but that doesn't work for me either. So i'd like to override the session handling so I can specify where it should look for the sessionID.

    Read the article

  • Storing and Finding Art Assets

    - by ashes999
    I've started down a line of art asset development that will allow me to (hopefully) reuse and improve assets for several games. But how do I go about storing and finding them? Let's say for example I decide to focus on RPGs for ~2 years. I would create items, monsters, etc. and store them somewhere. How would I categorize them and make them easier to search later on? Is the best solution "use directories with broad categories like landscape/items/monsters/etc.?"

    Read the article

  • I need to sell an almost-complete MMORPG project. How can I do that?

    - by Tomasz
    I need your help. We have to sell MMORPG at an advanced stage. The game has a unique engine, written on the need for the game, graphics, sound, map editor, web site etc. As it happens in the play mmorpg we can develop the characters, monsters. We can fight with other characters or to establish cooperation in solving the challenges. We can fight using own monsters, or throwing their own cards with spells. Unfortunately we have no idea how to promote the game. Ended fund and I think the whole team surrendered. How can I find a buyer? Where can I find him? Thank you for your help.

    Read the article

  • RPG Monster-Area, Spawn, Loot table Design

    - by daemonfire300
    I currently struggle with creating the database structure for my RPG. I got so far: tables: area (id) monster (id, area.id, monster.id, hp, attack, defense, name) item (id, some other values) loot (id = monster.id, item = item.id, chance) spawn (id = area.id, monster = monster.id, count) It is a browser-based game like e.g. Castle Age. The player can move from area to area. If a player enters an area the system spawns, based on the area.id and using the spawn table data, new monsters into the monster table. If a player kills a monster, the system picks the monster.id looks up the items via the the loot table and adds those items to the player's inventory. First, is this smart? Second, I need some kind of "monster_instance"-table and "area_instance"-table, since each player enters his very own "area" and does damage to his very own "monsters". Another approach would be adding the / a player.id to the monster table, so each monster spawned, has it's own "player", but I still need to assign them to an area, and I think this would overload the monster table if I put in the player.id and the area.id into the monster table. What are your thoughts? Temporary Solution monster (id, attackDamage, defense, hp, exp, etc.) monster_instance (id, player.id, area_instance.id, hp, attackDamage, defense, monster.id, etc.) area (id, name, area.id access, restriction) area_instance (id, area.id, last_visited) spawn (id, area.id, monster.id) loot (id, monster.id, chance, amount, ?area.id?) An example system-flow would be: Player enters area 1: system creates area_instance of type area.id = 1 and sets player.location to area.id = 1 If Player wants to battle monsters in the current area: system fetches all spawn entries matching area.id == player.location and creates a new monster_instance for each spawn by fetching the according monster-base data from table monster. If a monster is fetched more than once it may be cached. If Player actually attacks a monster: system updates the according monster_instance, if monster dies the instance if removed after creating the loot If Player leaves the area: area_instance.last_visited is set to NOW(), if player doesn't return to data area within a certain amount of time area_instance including all its monster_instances are deleted.

    Read the article

  • Fold a Papercraft Monster to Decorate Your Desk for Halloween

    - by Jason Fitzpatrick
    If you’re looking for a last minute and subtle way to add a little dash of Halloween to your office, these papercraft monsters are perfect for perching on your monitor stand. Courtesy of the designers at AnimateMe, there are a total of seven different papercraft monsters of all shapes and colors. Each free template includes the monster itself, plus tiny little humans to run in terror from the monster. Hit up the link below to download the templates and folding instructions. Monster Papercraft [via Neatorama] What Is the Purpose of the “Do Not Cover This Hole” Hole on Hard Drives? How To Log Into The Desktop, Add a Start Menu, and Disable Hot Corners in Windows 8 HTG Explains: Why You Shouldn’t Use a Task Killer On Android

    Read the article

  • Creating meaningful and engaging quests

    - by user384918
    Kill X number of monsters. Gather Y number of items (usually by killing X number of monsters). Deliver this NPC's package to this other NPC who is far far away. etc. Yeah. These quests are easy to implement, easy to complete, but also very boring after the first few times. It's kind of disingenuous to call them quests really; they're more like chores or errands. What ideas for quests have people seen that were well designed, immersive, and rewarding? What specific things did the developers do that made it so? What are some ideas you would use (or have used) to make quests more interesting?

    Read the article

  • How should I manage persistent score in Game Center leaderboards?

    - by Omega
    Let's say that I'm developing an iOS RPG where the player gains 1 point per monster kill. The amount of monsters killed is persistent data: it is an endless adventure, and the score keeps on growing. It isn't a "session score" like Fruit Ninja, but rather a "reputation score". There are Game Center leaderboards for that score. Keep killing monsters, your score goes up, and the leaderboards are updated. My problem is that, technically, you can log out and log in using a different Game Center account, kill one monster, and the leaderboards will be updated for the new GC account. Supposing that this score is a big deal, this could be considered as cheating, because if you have a score of 2000, any of your friends who have never played the game can simply log into your iPhone, play the game, and the system will update the score for their accounts, essentially giving them 2000 points in the leaderboards for doing nothing. I have considered linking one GC account to a specific save game. It won't update your score unless you're using the linked GC account. But what if the player actually needs to change their GC account? Technically they would be forced to start a new game and link their account to that profile. How should I prevent this kind of cheat? Essentially, I don't want someone to distribute a high schore to multiple GC accounts, given the fact that the game updates the score constantly since it isn't a "session score". I do realize that it isn't quite a big deal. But I'm curious about how to avoid this.

    Read the article

  • How to reset a List c# and XNA [on hold]

    - by P3erfect
    I need to do a "retry" option when the player finishes the game.For doing this I thought to reset the lists of Monsters and other objects that moved at the first playing or which have been "killed".for example I have a list like that: //the enemy1 class is already done // in Game1 I declare it List<enemy1> enem1 = new List<enemy1>(); //Initialize method List<enemy1> enem1 = new List<enemy1>(); //LoadContent foreach (enemy1 enemy in enem1) { enemy.Load(Content); } enem1.Add(new enemy1(Content.Load<Texture2D>("enemy"), new Vector2(5900, 12600))); //Update foreach (enemy1 enemy in enem1) { enemy.Update(gameTime); } //after being shoted the enemies disappear and i remove them //if the monsters are shoted the bool "visible" goes from false to true for (int i = enem1.Count - 1; i >= 0; --i) { if (enem1[i].visible == true) enem1.RemoveAt(i); } //Draw foreach (enemy1 enemy in enem1) { if(enemy.visble==false) { enemy.Draw(spriteBatch, gameTime); } } //So my problem is to restart the game. I did this in Update method if(lost==false) { //update all the things... } if(lost==true)//this is if I die { //here I have to put the code that restore the list //I tried: foreach (enemy1 enemy in enem1) { enemy.visible=false; } player.life=3;//initializing the player,points,time player.position=initialPosition; points=0; time=0; }//the player works.. } } they should be drawn again but if I removed them they won't be drawn anymore.If I don't remove them ,instead, the enemies are in different places (because they follow me). Any suggestions to restore or reinitialize the list??

    Read the article

  • Find by include nil object error in rails

    - by SpyrosP
    I've been trying hard to solve this problem but i really don't know what is happening. I have this small piece of code : DiscoveredLocation.find_by_user_id(user.id, :include => [:boss_kills]) The models are : DiscoveredLocation(id, user_id, boss_location_id) BossKill(user_id, monster_id) and associations : Monster belongs_to :boss_location Monster has_many :boss_kills BossKill belongs_to :user BossKill belongs_to :monster DiscoveredLocation belongs_to :user DiscoveredLocation belongs_to :boss_location DiscoveredLocation has_many :monsters, :through => :boss_location DiscoveredLocation has_many :boss_kills, :through => :monsters When i executed the find_by i get this error : NoMethodError in BossesController#index You have a nil object when you didn't expect it! You might have expected an instance of Array. The error occurred while evaluating nil.each If i change the include option to any other model, like :monster, it works great. I'm pretty much owned by this problem :P. Maybe somebody can help me ? :)

    Read the article

  • How do you reference another element in a xaml list

    - by Ball
    I'm using xaml as a datastore because It's quick and we haven't yet defined a file format. But I can only seem to create xaml that is a pure tree, even if it is acyclic. I know how to create a list of items in xaml, but How do I share objects in two lists? Below is an example of what I'm trying to say. <CreaturFile> <CreatureFile.Monsters> <Monster Name="Kobold" x:Name="Mepo"/> <Monster Name="Goblin"/> </CreatureFile.Monsters> <CreatureFile.Encounters> <Encounter> <Reference ElementName="Mepo"/> </Encounter> </CreatureFile.Encounters> </CreatureFile>

    Read the article

  • Indie Games See The Linux Market

    <b>Blog of Helios:</b> "Sure, I've played all the repository shooters...bloody chunks flying and monsters galore. I have a short attention span...mostly because I suck at shooter games. I just don't play them often. But every now and then, one game catches my eye. For this post, that game is Caster."

    Read the article

1 2 3 4  | Next Page >