Jump to content
  • Advertisement

xaviarrob

Member
  • Content Count

    37
  • Joined

  • Last visited

Community Reputation

103 Neutral

About xaviarrob

  • Rank
    Member
  1. xaviarrob

    Java Open AL questions

    So I'm fairly new to the Open AL library, I've been using Open GL for quite some bit (I spent quite a bit of time learning the ins and outs of the rendering pipeline) and am now really confident in the results I have achieved. I've been looking into bringing sound into the game (what better feedback to have when you have little characters animated walking around on the screen already) so figured it would be a good time to get into the sound system. A friend of mine recommended Open AL so here I am. I've read through what documentation I could find but have a few questions of the functionality of things. AL10.alSourcei(sources.get(index), AL10.AL_BUFFER,buffers.get(index)); AL10.alSource3f(sources.get(index), AL10.AL_POSITION, 0,0,0); These are only two of the examples. The sources.get and buffers.get are both calling the relevant index from a hashmap. Basicly what I understand these do is they create the source with the given data (the buffer, with it's position, with the gain you set, etc.). Is my understanding correct? I am wondering because I am looking to load the sound sources in only when a level is loaded (So not all sounds for the whole game are loaded when a single level is loaded. Additionally I was looking to use ALint and ALfloat Where are these located or am I missing an import? I can't seem to find them/documentation on them. Thanks for the help!
  2. xaviarrob

    C++ Tic Tac Toe

    Thanks for all the comments, I'm still learning so it really helps to see better ways of doing things. I use Code::Blocks and I haven't really messed with any settings. ( don't wanna screw something up). Could you explain what an assertion is? I haven't learned about them yet (I'll go look up what it is too). Also in this bool inputPrompt() { cout << "Enter your choice\n"; // Don't stream lots of string literals separately. // By merging them like this, you get a better picture of the output. cout << "1|2|3\n"; cout << "=======\n"; cout << "4|5|6\n"; cout << "=======\n"; cout << "7|8|9\n"; return cout; } How does this return what they input? I thought cout was only for what was printed to the console already?
  3. xaviarrob

    Need a new name...

    and the name of my company shall be srand(time(0);
  4. xaviarrob

    C++ Tic Tac Toe

    you're a life saver, I don't know what I was thinking in writing a multidimensional array and only using one variable. Wow I actually had made the two variables just never put them in there for some reason. Me asking dumb questions *facepalm*
  5. xaviarrob

    C++ Tic Tac Toe

    I know it's somthing to do with it, I don't know what tho, that was what the question was.
  6. xaviarrob

    C++ Tic Tac Toe

    I actually have never used a debugger could you recommend one? Updated after the break fixes. #include<iostream> using namespace std; void printBoard(char array[3][3]); void resetBoard(char array[3][3]); void playerInput(char tempArray[3][3]); //forward declarations int main() { char board[3][3]; bool gameWon = false; //Declared variables //Board setup resetBoard(board); printBoard(board); cout << "Please enter the designated letter corrisponding to the location you want to select. " << endl; //Begin game loop do{ playerInput(board); //checkWin(gameWon); //printBoard(board); }while(gameWon=false); printBoard(board); } void resetBoard(char array[3][3]){ for(int i = 0;i <=3;i++){ array[0] = '*'; } for(int i = 0;i <=3;i++){ array[1] = '*'; } for(int i = 0;i <=3;i++){ array[2] = '*'; } } //Prints the board on the screen. void printBoard(char tempArray[3][3]){ char left = 'y'; char middle = 'n'; char right = 'n'; int incriment = 0,incrimentTwo = 0; for(int a = 0;a <3;a++){ for(int i = 0;i <3;i++){ while(incriment==0){ cout << " " << tempArray;//these while statements draw the board out middle = 'y'; left = 'n'; incriment = 1; } while(incriment==1){ cout << "|" << tempArray << "|"; middle = 'n'; right = 'y'; incriment = 2; } while(incriment==2){ cout << tempArray; incriment = 3; } } cout << endl; incriment = 0;//incriment is set back to 0 so when it goes through the for loop again it checks all while loops. Once the for loops run out it causes this not to run for an infinite cycle. if(incrimentTwo < 2){ cout << "=======" << endl;//this prints the bars onto the board without printing anything on the bottom. incrimentTwo++; } } } //This function sets the letter each player uses, then it gets the input from the user and puts it into the array. void playerInput(char tempArray[3][3]){ char playerPiece; int playerChoice; bool spotTaken = false; int turnNumber = 0; if(turnNumber % 2 == 0){ playerPiece = 'x'; }else{ playerPiece = 'y'; } cout << "Enter your choice" << endl; cout << "1" << "|" << "2" << "|" << "3" << endl; cout << "=======" << endl; cout << "4" << "|" << "5" << "|" << "6" << endl; cout << "=======" << endl; cout << "7" << "|" << "8" << "|" << "9" << endl; cin >> playerChoice; switch(playerChoice){ case 1: if(tempArray[0][0] == playerPiece){ cout << "Spot taken, choose another." << endl; spotTaken = true; }else{ tempArray[0][0] = playerPiece; } break; case 2: if(tempArray[0][1] == playerPiece){ cout << "Spot taken, choose another." << endl; spotTaken = true; }else{ tempArray[0][1] = playerPiece; } break; case 3: if(tempArray[0][2] == playerPiece){ cout << "Spot taken, choose another." << endl; spotTaken = true; }else{ tempArray[0][2] = playerPiece; } break; case 4: if(tempArray[1][0] == playerPiece){ cout << "Spot taken, choose another." << endl; spotTaken = true; }else{ tempArray[1][0] = playerPiece; } break; case 5: if(tempArray[1][1] == playerPiece){ cout << "Spot taken, choose another." << endl; spotTaken = true; }else{ tempArray[1][1] = playerPiece; } break; case 6: if(tempArray[1][2] == playerPiece){ cout << "Spot taken, choose another." << endl; spotTaken = true; }else{ tempArray[1][2] = playerPiece; } break; case 7: if(tempArray[2][0] == playerPiece){ cout << "Spot taken, choose another." << endl; spotTaken = true; }else{ tempArray[2][0] = playerPiece; } break; case 8: if(tempArray[2][1] == playerPiece){ cout << "Spot taken, choose another." << endl; spotTaken = true; }else{ tempArray[2][1] = playerPiece; } break; case 9: if(tempArray[2][2] == playerPiece){ cout << "Spot taken, choose another." << endl; spotTaken = true; }else{ tempArray[2][2] = playerPiece; } break; default: cout << "Error" << endl; } if(spotTaken == true){ playerInput(tempArray); }else{ turnNumber++; } }
  7. xaviarrob

    C++ Tic Tac Toe

    Thanks, I didn't even think about that being a problem. It still looks like i'm having the same problems tho.
  8. xaviarrob

    C++ Tic Tac Toe

    #include<iostream> using namespace std; void printBoard(char array[3][3]); void resetBoard(char array[3][3]); void playerInput(char tempArray[3][3]); //forward declarations int main() { char board[3][3]; bool gameWon = false; //Declared variables //Board setup resetBoard(board); printBoard(board); cout << "Please enter the designated letter corrisponding to the location you want to select. " << endl; //Begin game loop do{ playerInput(board); //checkWin(gameWon); //printBoard(board); }while(gameWon=false); printBoard(board); } void resetBoard(char array[3][3]){ for(int i = 0;i <=3;i++){ array[0] = '*'; } for(int i = 0;i <=3;i++){ array[1] = '*'; } for(int i = 0;i <=3;i++){ array[2] = '*'; } } //Prints the board on the screen. void printBoard(char tempArray[3][3]){ char left = 'y'; char middle = 'n'; char right = 'n'; int incriment = 0,incrimentTwo = 0; for(int a = 0;a <3;a++){ for(int i = 0;i <3;i++){ while(incriment==0){ cout << " " << tempArray;//these while statements draw the board out middle = 'y'; left = 'n'; incriment = 1; } while(incriment==1){ cout << "|" << tempArray << "|"; middle = 'n'; right = 'y'; incriment = 2; } while(incriment==2){ cout << tempArray; incriment = 3; } } cout << endl; incriment = 0;//incriment is set back to 0 so when it goes through the for loop again it checks all while loops. Once the for loops run out it causes this not to run for an infinite cycle. if(incrimentTwo < 2){ cout << "=======" << endl;//this prints the bars onto the board without printing anything on the bottom. incrimentTwo++; } } } //This function sets the letter each player uses, then it gets the input from the user and puts it into the array. void playerInput(char tempArray[3][3]){ char playerPiece; int playerChoice; bool spotTaken = false; int turnNumber = 0; if(turnNumber % 2 == 0){ playerPiece = 'x'; }else{ playerPiece = 'y'; } cout << "Enter your choice" << endl; cout << "1" << "|" << "2" << "|" << "3" << endl; cout << "=======" << endl; cout << "4" << "|" << "5" << "|" << "6" << endl; cout << "=======" << endl; cout << "7" << "|" << "8" << "|" << "9" << endl; cin >> playerChoice; switch(playerChoice){ case 1: if(tempArray[0][0] == playerPiece){ cout << "Spot taken, choose another." << endl; spotTaken = true; }else{ tempArray[0][0] = playerPiece; break; } case 2: if(tempArray[0][1] == playerPiece){ cout << "Spot taken, choose another." << endl; spotTaken = true; }else{ tempArray[0][1] = playerPiece; break; } case 3: if(tempArray[0][2] == playerPiece){ cout << "Spot taken, choose another." << endl; spotTaken = true; }else{ tempArray[0][2] = playerPiece; break; } case 4: if(tempArray[1][0] == playerPiece){ cout << "Spot taken, choose another." << endl; spotTaken = true; }else{ tempArray[1][0] = playerPiece; break; } case 5: if(tempArray[1][1] == playerPiece){ cout << "Spot taken, choose another." << endl; spotTaken = true; }else{ tempArray[1][1] = playerPiece; break; } case 6: if(tempArray[1][2] == playerPiece){ cout << "Spot taken, choose another." << endl; spotTaken = true; }else{ tempArray[1][2] = playerPiece; break; } case 7: if(tempArray[2][0] == playerPiece){ cout << "Spot taken, choose another." << endl; spotTaken = true; }else{ tempArray[2][0] = playerPiece; break; } case 8: if(tempArray[2][1] == playerPiece){ cout << "Spot taken, choose another." << endl; spotTaken = true; }else{ tempArray[2][1] = playerPiece; break; } case 9: if(tempArray[2][2] == playerPiece){ cout << "Spot taken, choose another." << endl; spotTaken = true; }else{ tempArray[2][2] = playerPiece; break; } default: cout << "Error" << endl; } if(spotTaken == true){ playerInput(tempArray); }else{ turnNumber++; } } The problem I'm having is when I enter 1 into the loop, it sets all the array elements to x. (when it should obviously only set one). The second problem is when I enter 2-9 I get no input into the variables at all (the characters stay *
  9. xaviarrob

    League of Legends

    Like I said before, look at the class curriculam list. There will be classes on it that have "Graphic" and not programming in them. also they could be in the form of Photoshop/3ds max classes.
  10. xaviarrob

    MMO: How do you level?

    So after a swift read over this whole topic this is why I'm excited for Guild Wars 2. I don't understand why all MMO's don't have systems like they have set up. Instead of it feeling like a game where you invite someone to your group, if you're just doing what the person next to you is doing you don't even have to be in a "group" to work for the same common objective. I think this will make the whole "dungeon queuing" feel of having random players whenever you play when you want all the time throughout the game. It will also get rid of any dumb queue times where you're waiting to do something since everything in the game scales according to the number of players participating. Now I'm sure there will still be places where you need a few people to do something efficiently but you won't have to worry because other people are going to want to do what you're doing too. The best thing by far (minus getting rid of any queue system) is the fact that you won't have to wait on a healer/tank ect. Of course this is just speculation till the game launches because we will never know how it works till we actually play but I believe having this kind of system in place will make the whole "Playing" experience as a whole more "Playing" than waiting.
  11. xaviarrob

    League of Legends

    To clear up here: graphical programming == good graphic design == bad I think? Keep in mind when making these life choices that a backup plan is always a good idea. Example, you get a CS degree but cant get a game programming job, could you live with being an IT guy or a network administrator? My apologies to any CS people if that's uniformed in the details, but you get the idea. Example, I took a physics and engineering degree because I had NO IDEA (still dont) what I wanted to do, but this left a whole lot of doors open. [/quote] Precisely what you said here. If you want to be a programmer and it's truly what you want to do, go for a degree without graphic design. Graphical programming is just another way of how I would say is learning the specific graphic libraries you want to use. You can learn to use stuff like 3DS max and all the stuff you need to make temporary models or w/e on the internet if you wanna be a programmer, no need to pay for it. For getting a job right away, either would be perfectly ok (depending on your location of course and the jobs available there). With becoming a game programmer it's always recommended even if you go to school to make your own games on the side to show that you can actually use the knowledge you've learned. You will usually take a test on the language specific to the company anyway (to show you know the language). The biggest thing to remember is if down the line you want to have that nice Game Programming job is for you to learn what you need to know, on your own or not, and work on your own projects whenever you can. Also remember that a lot of companies have advancement opportunity so say you're a QA guy at a video game company you could always work your way up (as hard as it is).
  12. xaviarrob

    League of Legends

    You honestly have to look at the class curriculum. You have to be really careful when picking a school for this because you can be screwed over if you don't look and make sure you're learning what you want/need to be. If you just want to do the programming you'll probably see classes on c++, c#, or even java. Stay away from any VB classes because this isn't going to be what you're looking for. Also you want to look and see if the degree has graphical programming classes in it too because a lot of schools mix graphic design with programming and you probably don't want that kind of degree. If you want to look at others discussing a similar topic refer to here Schools
  13. xaviarrob

    League of Legends

    It all depends on what you want to do. Personally I would go to school for a Bachelors in Computer Science. Take note that "Computer Science" is the whole shebang not just game development. However there are schools that offer Computer Science degrees but you do it in a game developers sense if you get what I mean. You could get an arts degree but I would NEVER recommend it over a computer science degree. This is of course assuming you want to be a programmer and not a graphic artists ect.
  14. xaviarrob

    League of Legends

    While I think the faq is nice this is a bit better I belive... I don't usually try to advertise to people about things but if you aren't a complete computer nerd already(assuming you're not since you're a business major) This guy does a bunch of tutorials on pretty much anything out there. They aren't going to be everything you need to know but they will defiantly get you started to a point where you can get a book or use google to find out the more in depth stuff. The New Boston I would always recommend starting in C++ but it isn't for everyone. C++ is one of the most versatile languages out there and if you can learn it with a Graphics API on top (Open GL or Direct X ect....) I think you get the most benefit from it. If you're thinking of making something like LoL I would think if you couldn't find some sort of engine this would be the way to go. There's always going to be a debate on what language is "best" but everything has it's place. For learning c++ book wise I'd suggest C++ Primer plus 5th edition I used this book and it was a great help. It gives exercises with each chapter which is nice. for graphic API I'd suggest you learn Open GL assuming you want the game cross platform. OpenGL SuperBible
  • 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!