Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

300 Neutral

About jellyfishchris

  • Rank
  1. This code does not compile, here is the log to help you :)   error C2360: initialization of 'currentgameState' is skipped by 'case' label
  2. jellyfishchris

    My First Text Based RPG help

    For those of us that cant read code formatted like that: http://codebin.org/view/94bf6d09   Ok I am confused what you actually what the program to do so I am just going to stab in the dark.   while (eHealth > 0) { eHealth - attack; if (eHealth <= 0) { cout<< "You have killed the goblin."<< endl; cout<< endl; ++stats; break; } } In your loop you are doing eHealth - attack.   So lets think about this, your doing the golbins health minus attack which is 1. Now you never store the 1 and it is just forgotten about. Now ehealth is greater than 0 because its still 8 because it is never saved. Now the program will go into an infinite loop.   However lets fix this and do eHealth = eHealth - attack; First loop:   eHealth = 1;   do if statement = no Second loop:   eHealth = -6;   do if statement = yes     output "You killed the goblin \n"     add one to stats;     break while loop;   Additionally stats was never assigned so you will get a runtime failure, so if you change it to int stats = 0;   Ok your next question is going to be it comes up with but it also printed "You have died" this is becuase you have forgotten to add a break statement for the case of attacking the goblin. So it will execute case1 which you kill the goblin, it never finds a break to break the case so it does case2 also then case2 finds a break and finishs.   Hope this is enough information and good luck!
  3. jellyfishchris


    FBX hands down, after writing my own collada loader and fbx loader as part of a personal project. FBX is much much much easier.(For me atleast)
  4. jellyfishchris

    calculator app

    Here is something to think about. What if I enter in: 7 + (6 × 52 + 3)   http://www.mathsisfun.com/operation-order-bodmas.html
  5. jellyfishchris

    Voxel engine load times

    Ok, Ill try this when I get home. Thanks for the advice
  6. jellyfishchris

    Voxel engine load times

    Would it be better to do it this approach? Also each block is 1byte.   I have done profilling and the thing that takes the longest time by a long shot is the memory allocation
  7. Hi, Ive been making a voxel engine in my spare time. Currently I have it running at 60fps easy running the same amount of voxels you would see in a minecraft world. (125 chunks each chunk is 64 ^3 blocks.)   I am loading the voxels in as a flat array like so:     m_blocks.resize(CHUNK_SIZE); for(int z = 0; z < CHUNK_SIZE; z++) { m_blocks[z].resize(CHUNK_SIZE); for(int y = 0; y < CHUNK_SIZE; ++y) { m_blocks[z][y].resize(CHUNK_SIZE); } }   then using the terrain engine to create the desired layout of the blocks. Then putting this into an octree for optimizations and then clearing the original array. Also I am using a texture atlas.   My load time for all those blocks (32768000) is about 1minute in release mode. I was wondering if you guys have any ideas on how to boost up the load times. (I will eventually make the system multi-threaded when I get around to it)   Thanks    
  8. Drop isnt a member function and your calling delete this? Delete what?
  9. jellyfishchris

    Pong v2

    I think you need to rearrange your update loop. Maybe rethink it all together. There are many calls in there which are not needed. For example you should check for collisions somewhere else, and then pass it back to the objects that are effected. Its a cleaner solution
  10. The problem your coming into is your trying to merge collision detection (Maths), and collision resolution (game logic). And you want this to be eligate, you might have to think your design a little bit and have a detection facility and this is then passed to the resolution section to handle how a ball hits a wall for example! Hope this helps
  11. jellyfishchris

    Pong v2

    Thats how I was going to suggest you should use your polymorphism, sorry for taking so long to reply! Wish this thing had notifications or something. Another point to remember is to perhaps have an array/vector of entities and call thier all respestive updates and draw calls so   instead of:   wallUp.render(g); wallDown.render(g); wallRight.render(g); paddle.render(g); ball.render(g);     Try something like     Entity m_entities[10]; for(int i = 0; i < 10; ++i) {      m_entites.draw(g); }     Obviously use a vector if you know what that is instead of a array. And put it into its own type of class called for example "EntityManager". Sorry if this code doesnt compile havnt writen java in a few years :)
  12. jellyfishchris

    Starting without wanting to find a job

      Half of that stuff, having a double major myself I dont even know. And dont see the point in knowing either.   In response to the actual post. I know how you feel, just stay in school and write code in your spare time.
  13. jellyfishchris

    Starting a FPS game ideas on where to begin?

    You have to understand building a game is very complex process and you have to have understanding of alot of theories before you just dive into this sort of thing. I like this example of what you are trying to do: Its like trying to write a book without knowing how to spell. So if you want to use this example of writing a book before being able to even read. Ill write it as if this was a guide to a preschool student wanting to write a book. 1) Learn to say a few words such as "Mum" 2) Learn to say a few sentences "I want food", "Im hungry" 3) Learn your ABC 4) Learn a few spellings such as "Cat" and "Dog" 5) Learn to write a few sentences. "The cat sat on the mat." 6) Learn more complex sentences and structures. "There once was a princess, her name was Anna" 7) Create your very first book. It will be very short and not very good 8) Back to learning complex theories for many years 9) Now your at a point to write any book etc. Ok now that thats done lets translate that back to making a 3d game without knowing how to program. 1) Choose a language 2) Write your very first "Hello World!" program 3) Write a very basic program that has methods! Example a program that once you give it $10 for an item that is $5.45 it tells you how many of each coin you need back in change. 4) Learn how programming concepts such as polymorpism, classes, etc. 5) Write a very simple ASCII game. Example a game where there is a grid of 0's and 1's. A P represents you, M represents a monster, F represents the finish line. You must get to the finish line while the monsters just choose a random number and move in that directions. 6) On to learn about data structures and algorithsm! Learn things such as vectors, binary trees, link lists, FSM etc etc. 7) Ok now we can start with a 2d game! Make mario/pacman or something very basic and similar. 8) Back to learning more structures and some game specific algorithms and demo projects practising your 3d. Example make a world where you can fire a cannon into objects. (In 3d) 9) You can write your FPS or any type of game you feel like. Please bear in mind this is what you must do if you want to make a good game or what to have a career in this industry. If you want a terrible game and just want to skip half of the lessons then you wont understand and wont be able to do alot of things. If you want that skip points 5,6,7,8.    
  14. jellyfishchris

    An enum made of structs

    I did a little shell for you to look at and fill in yourself. Consider using tinyXML to load XML. (No idea if any of this compiles, as it was only to show you what to do)     struct Move{    char*       m_cpName;    int         m_iID;    MoveClass   m_class;    Target      m_target;    int         m_iPP;    int         m_iAccuracy;    int         m_iBasePower;    int         m_iPriority;    Type        m_type;    int         m_iFlags;}; enum Moves{   TACKLE,   GROWL,   HYPER_BEAM}; class Moves{ public: bool LoadMoves(std::string filename) {   //LoadXML file   //As you load them you can tell in the XML I do <Move type = "1">   //this means that this move is tackle because in the enums its the first value   //Load in all of the related data to the move.   return true;  }  Move* GetMove(int type) {   //checking and return the move   return nullptr;  } private:   std::vector<Move*> m_listOfMoves; }; ? ?  
  • Advertisement

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!