rakketh

Members
  • Content count

    18
  • Joined

  • Last visited

Community Reputation

192 Neutral

About rakketh

  • Rank
    Member
  1. Don't like ending games

    I've had a similar idea for a (theoretical) MMORPG for a while now. When you reach "maximum level" you can breed and create a new offspring character to play. Doing this gives (at least) 2 advantages: 1) The old character can now level up further, but has perma-death: This would allow for high-risk/high-reward play such as going after a legendary treasure that can be handed down in the family until it breaks. The dungeon holding the treasure would be far too difficult for normal characters to attempt. There are other ideas such as having the older characters retire as trainers in your clan village, where the higher level they reach post breeding increases their teaching rate, so you would have to trade off training speed vs risk of dying and wasting that potential. 2) The child character can get new abilities unavailable to the parent: My game idea is loosely based on the Naruto world, where characters can master individual elements that they have innate talent for. So if your old character could use water and you breed with someone who can use wind there is a small chance that the offspring can get a new talent to combine both water and wind to manipulate ice.
  2. MMORPG combo/keybind system

    I really like this idea in terms of keyboard real-estate. I know when I used to play a rogue in WoW there were always some moves that I wanted to use occasionally, but since they weren't my main set of moves they were always out of the way and therefore difficult to hit when I needed to. The option of introducing more complicated combos appeals to me too, since it gets really dull performing the same attack over and over. I'd like to know how these moves are set up - does each stance have it's own set of moves, or do you get a bunch of moves to choose from and you put them in the stance bar yourself to create your own combos? If that is the case, does a move have "stance 1, leads into stance 2" and you chose from a set for that particular slot (or maybe could lead into a choice of stances)? Something that came to mind while I was reading is an enhancement (maybe) to the system, where the move sets represent combo steps rather/as well as stances. For example, move sets 1 and 2 could both be in the same stance or could be different stances. Characters who focus on 1 stance get more moves / more proficient at moves for that stance, while characters who flow between multiple stances have the benefit of confusing the defender, making it harder to block the attacks. Implementing this would depend on the skill system you are building into the game and also thinking up more benefits for each play style.
  3. I'm quite new to 3D programming, so stop me if you've heard this one before! Standard backface culling iterates through a set of polygons, calculates the view vector, and calculates the dot product of the the view and normal vectors. I am looking for a way to remove the requirement of iterating through all of the polygons and returning all front-facing vertices in a single operation. I have come up with the following incomplete solution: Each vertex object has a pointer to the polygons it is a member of. The vertices are stored in a sorted map (angle->vertices). If we take a 2D view, you can see that if you are looking from 0deg, you can get all of the visible vertices by returning a sub-map of angles between 270-90deg. For large objects, the view vector may vary too much accross the object, so some level of error, and/or multiple vector maps, would be required depending on view distance. The problem I am having is in finding a data structure to store the map in 3D. Standard polar coordinates have a problem of being able to see back facing normals when you look over the top if they are only just backfacing, so you can't use a simple 2 pass check. I need an efficient way of determining the sub-map. Any ideas?
  4. I am creating my first game, which is a simple puzzle game (you may have seen it before, it's not original). You have a grid of squares, red or green, and you have to get them all to green. When you select a square, it flips the colours of all squares in a 3x3 block centred on itself. I have been going off several tutorials for different aspects, but am trying to code it so that it is modular and reusable. I currently have the following parts: Model: Stores the state of the game world. For this game this is a vector of vectors of Square objects, which know state information. Performs game logic when actions are given. I have 2 child classes - PlayingModel and SelectingModel. On a move input, SelectingModel changes size, while PlayingModel changes the selected square. On an action input, SelectingModel returns GAME_WON, while PlayingModel iterates through the squares checking for a win condition and returns either GAME_WON or VALID_MOVE. Input: Polls the controller states, currently only keyboard, and sets up an array of current actions. Output: Knows how to draw the model. Currently each frame it takes the model, creates a vertex buffer, calculates the triangles to draw, and draws the scene in an orthogonal view. Controller: *Creates the main window. Creates Model, Input and Output objects. Initialises the game. Each frame gets input, updates model, calls for output. On win condition, switches between PlayingModel and SelectingModel (not elegant but I'm not polishing here) (Please comment on this design if any parts feel wrong, eg * the main window function may need to move elsewhere) I now want to move to a 3D view rather than orthogonal and am not sure where to store the graphics data. I want to be able to change between DirectX and OpenGL in the future without having to change all of the game model objects. I was thinking of Creating a GraphicsObject class in the Output module that takes a Square object in the constructor (will be generalised) and builds extra information around it such as the vertex buffer and index buffer, texturing, etc. These new objects would be held by the drawing class. Is this the best way to do it? How do I maintain the mapping between the graphics objects and the data objects? Also, if I keep a vertex buffer in the graphics object instead of recreating it each frame, do I have to manage it? Such as recreating it if the device is lost.
  5. Thanks for the replies so far. I was trying to get a feel for whether constantly having to restart a char was a big problem. I don't think that the "ultimate top level boundary" poses too much of a problem: if you consider WoW, once you get to full tier 3 epic armour and such, there is still a drive to get just that little bit extra; in a game such as EVE, which has no skill caps, players are striving to achieve an ever-decreasing performance boost every year of play. I suppose I am moving this boundary to a different position in character development. Instead of having 1 char constantly getting that little bit better, you spawn a new char with the extra potential to get better, or with a different build so your game can vary that way also. Doing it this way opens up a new part of the game, which is a large focus of my overall game plan: having elder characters. Elder characters become controllable NPCs that are added to your clan village - this would be either as an alt or in a more generic goal kind of way (comments?). Rather than having a bunch of developer-created NPCs that you have no connection to, your village is actually full of characters that you (and your clan-mates) have developed. For example if your elder char is a healer, they could open a hospital where players can respawn for a fee. The better the healer the less of a debuf the death leaves, giving an incentive for friendly players to use your healer, and therefore giving your village more capital. The game introduces a strategy to either breed early to give your village more NPCs, or less frequently to give it more knowledgable ones. For example one player may want to train their first character to a high skill level, compared to another player who breeds 5 generations in that time. The second player would have contributed more NPCs to his village, which would provide a different advantage to a village compared to the advantage of having a single strong character. There would need to be a mechanic for a population control for elder characters. This could be an aging mechanism, perma-death whilst making the NPCs still playable, a combination of the two, or some other mechanism (insert ideas here). I envisage this game is largely PvP, so the challenge is not a particular "dungeon" which would be repeated through each generation; instead "quests" would be based around player interactions so repetitive PvE content would become less of an issue.
  6. Most MMOs I've played seem to be a race to get to the max level so that you can play the "real game". My idea is that instead of having this maximum level to strive for, you can create a new character that carries on some traits of the parent. For example, if you want a fire mage you can train in fire spells. The current character will only be able to reach a certain level of spell. To progress further, you would have to start a new offspring character. In this case, the parent has been training with fire, so the offspring would start with a certain level of fire affinity. This would allow him to train his fire spells a bit faster and to a higher level. The new character could also be given traits, depending on certain circumstances. If the parent character died while retreating, the offspring might hate his father for being cowardly. In this case he would get a resolve trait which would give him a burst of health/stamina if he was nearly dead. Other traits could include hatred of a certain type of creature. I haven't fully thought out what traits could be included, so any help in this area would be appreciated. I don't want them all to revolve around the manner of the parent's death, which these two do. Because everyone would be creating offspring at different times there wouldn't be huge "n00b" areas of the game world completely abandoned and all the high level areas full of max level players. I have some ideas of what to do with the ancestor characters, such as continuing to be able to use them but with a penalty of perma-death, but would like to discuss the mechanic of constantly creating new characters here. Is this a good way to spread out characters throughout the game world? Does it put too much burden on the player to keep restarting from a lower level? Do you think it's an awesome idea :D? Are there any games that do this already? I'd like to take a look to make sure I'm not just copying an existing idea and to make sure my way has a unique angle.
  7. const return problem

    Quote:Will someone make sure that his/her x's and y's are in the right order? his :D Don't worry too much about x/y battling as that is something that will be worked out when I debug if it is wrong. I'm mainly after advice on good practices. Quote:squares = new GameSquare* [x]; squares[0] = new GameSquare[x * y]; I found this on a website when I was looking up dynamically allocated 2d arrays. The idea behind it is that you save overhead by only calling new and delete twice. I agree that it doesn't look right, but I went along with it. After another search I see that I've missed a vital point, the full example that I now find is: template < typename T > T **Allocate2DArray( int nRows, int nCols) { //(step 1) allocate memory for array of elements of column T **ppi = new T*[nRows]; //(step 2) allocate memory for array of elements of each row T *curPtr = new T [nRows * nCols]; // Now point the pointers in the right place for( int i = 0; i < nRows; ++i) { *(ppi + i) = curPtr; curPtr += nCols; } return ppi; } template < typename T > void Free2DArray(T** Array) { delete [] *Array; delete [] Array; } I agree, however, that this is unwieldy and will change the grid to a vector using the maths example provided by EasilyConfused. I have changed the bool into a GameSquare struct with a state member variable to make it easier to change its implementation in the future and to avoid the vector<bool> potential pitfalls. Quote:I think you want >= here not just >, unless the first element of each column and row is to be ignored. Yes, this is wrong, should be >= 0, < size. I blame tiredness :) thanks for pointing it out.
  8. const return problem

    Thanks for the replies and the links. That const 2-d array gets complicated fast! I'm quite new to cpp, being a Java developer by trade but wanting to learn cpp for games development as a hobby. I've read up on references now and see that they are a much better option than pointers in the way I am using them here. I've refactored my code into a new class based on your advice: GameGrid.h #pragma once struct GameSize { GameSize(int x, int y) : x(x), y(y) {} ~GameSize() {} int x, y; }; struct GameSquare { GameSquare() { state = false; } bool state; }; class GameGrid { public: GameGrid(const GameGrid &source); GameGrid(int x, int y); ~GameGrid(void); GameGrid & operator = (const GameGrid & other); const GameSize& getGameSize() { return size; } const GameSquare& getGameSquare(int x, int y); void changeGameSquare(int x, int y); private: GameSize size; GameSquare **squares; }; GameGrid.cpp #include "StdAfx.h" #include "GameGrid.h" GameGrid::GameGrid(const GameGrid &source) : size(source.size) { squares = new GameSquare* [size.x]; squares[0] = new GameSquare[size.x * size.y]; for(int ix = 0; ix < size.x; ix++) { for(int iy = 0; iy < size.y; iy++) { squares[ix][iy].state = source.squares[ix][iy].state; } } } GameGrid::GameGrid(int x, int y) : size(x, y) { squares = new GameSquare* [x]; squares[0] = new GameSquare[x * y]; for(int ix = 0; ix < x; ix++) { for(int iy = 0; iy < y; iy++) { squares[ix][iy].state = (rand() % 2 == 1); } } } GameGrid::~GameGrid(void) { if(squares != NULL) { delete[] squares[0]; delete[] squares; } } GameGrid &GameGrid::operator =(const GameGrid & other) { if(this != &other) { GameSquare **tempSquares; tempSquares = new GameSquare* [size.x]; tempSquares[0] = new GameSquare[size.x * size.y]; for(int ix = 0; ix < size.x; ix++) { for(int iy = 0; iy < size.y; iy++) { tempSquares[ix][iy].state = other.squares[ix][iy].state; } } if(squares != NULL) { delete[] squares[0]; delete[] squares; } squares = tempSquares; size = other.size; } return *this; } const GameSquare& GameGrid::getGameSquare(int x, int y) { // if(x < 0 || x > size.x - 1 || y < 0 || y > size.y - 1) return NULL; return squares[x][y]; } void GameGrid::changeGameSquare(int x, int y) { if(x > 0 && x < size.x - 1 && y > 0 && y < size.y - 1) { squares[x][y].state = !squares[x][y].state; } } Does this look like a correct implementation of the rule of 3? There is a commented out line which I'm not sure how to handle. In Java, this works since everything is treated as a reference. In this instance should I be using a pointer instead of a reference, or is there a better method? (I am of the understanding that cpp exceptions are slow!)
  9. I'm having some trouble working out how to return consts correctly to stop the returned value from being modifyable, specifically when using pointers. I have a GameState class that contains a dynamically allocated 2d grid. I want to be able to return a non-modifyable version of the grid to classes such as the graphics renderer. Here is what I have: #pragma once struct GameSize { int x, y; }; class GameState { GameState(int x, int y); ~GameState(); const GameSize * getGameSize() { return &gameSize; } const bool ** getGrid() { return grid; } void changeSquare(int x, int y); private: GameSize gameSize; bool **grid; }; The first return works fine, returning a pointer to the GameState's GameSize object which cannot be modified (please correct me if that is wrong). The second return gives the following error: 3>c:\documents and settings\administrator\my documents\visual studio 2008\projects\testgame\testgame\gamestate.h(13) : error C2440: 'return' : cannot convert from 'bool **' to 'const bool **' I've returned grid instead of &grid since it's already a pointer so passing it by value isn't an overhead.
  10. Looking for character ideas

    Another option is to use all of your ideas and have them operate slightly differently. You could start the game controlling the dinosaur and as the levels progress, the time-zone progresses also. Dinosaur->Caveman->Soccer player->Robot. Each has a different method of moving the ball about so it would increase the diversity in your game.
  11. Audio input

    I'm interested in trying to make a game similar to guitar hero, but using an electric violin connected to line-in. The stave would scroll along the screen and you play the notes as you normally would. The game would rate your pitch and timing. I'm currently learning to play (2 weeks in) and think this would be a great learning tool, as it would indicate whether you had your fingers in the right place for pitch and train tempo awareness. I don't know anything about audio programming at the moment, so I'm looking for pointers to tutorials and general information. I'll start off small, making a tuner for a specific string, then expand so that it identifies any note you are playing. I've done a quick search for capturing audio, and there are a few apis that handle audio input. I'm going to want a GUI, so was going to go with DirectX. Is DirectX's audio library up to the job, or would you recommend using another api? http://www.codeproject.com/KB/audio-video/Asio_Net.aspx has information on ASIO, but my sound card doesn't support it. There is a link to a driver which is supposedly compatible with most sound cards to provide ASIO support. Is it worth doing this for the lower latency, or is DirectInput (or another of your suggestion) good enough to do this task? I've also read up a little on Fast Fourier Transforms, which I understand I would need to use to obtain the frequencies being played. Can anyone recommend an FFT algorithm that is fast enough and accurate enough to do what I want? What difficulties am I likely to face in the first parts of development? Are FFT algorithms fast enough to do this real time? Will I have difficulty analysing the frequency curve? Anything else. Thanks for any help.
  12. FPA - First Person Audio

    Thanks for the replies, but I think everyone is misunderstanding my idea. I am not trying to emulate blindness, but rather to hear the full environment around you all of the time. Picture a wall 2 foot infront of you and another 1 foot to the right. With my output idea you would hear a high pitch to your right and a lower pitch infront. The binaural recording wiki is interesting. If there is any example of binaural recording being emulated in code, or the theory of doing so, it could be interesting to try to implement it as a headphone option.
  13. I had an idea for a game similar in layout to Wolfenstein 3D, but instead of displaying it on the screen, convert it to audio. For example, the closer the wall the higher the pitch from that point. Obviously you'd need good surround sound. The two systems I can think of are to either alter frequency or volume to determine proximity. If I wanted to add enemies to shoot rather than just have it as a maze, I could alter the wave pattern for the sound in that direction. Taking damage could be indicated by a dimming of the volume, either as a health indicator so the volume stays at the new level, or as a fluctuation just to indicate you were hit. I could also try doing it like a sonar, so you hear a blip, then a sound in all directions delayed to the distance of the wall/enemy/whatever. I'm wondering if this could work, whether there would be enough granularity in audio positioning to get a good picture of the area around you? Although I hadn't thought of this as an aid to the blind, rather just as something cool to try, is there anything out there that does anything similar? Either in gamin or as an actual imaging aid?
  14. RTS/TPS Concept - Need Gameplay Feedback

    Have you considered having the strategy part as a background command task? You could play mainly in TPS mode controlling the commander's every move. Holding a key down displays a semi-transparent map with an RTS interface to command the squads with a mouse. Since there are so few squads to control at a time performing the commands shouldn't take too much time.
  15. Dynamic Quests

    This is moving away from the current direction of the thread, but something I wanted to mention when I read the opening post was an idea to break the monotony of escort quests. Games like WoW give a repetitive escort quest with the same mobs spawning in the same places each time it is done, removing part of the challenge. My idea here is to create 2 quests in opposing factions for the same escort. E.g. Faction1: Escort the blacksmith to the forge in the volcano so he can craft uber weapon x. Faction2: We've intercepted a report that a blacksmith is travelling to the volcano, kill him before he reaches it. This would bring excitement into these sorts of quests as they wouldn't be as repetitive. It would also move PvP away from centralised areas and give meaning to skills such as tracking. You could even modify the quest based on espionage, so if you had a spy who told you they were going to make uber weapon x, the quest could change to wait until the weapon is made before interception so you can steal it.