Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

204 Neutral

About Sevans

  • Rank
  1. I'm glad to see everyone's project is coming along so well. We are still working on our backend and hashing out the project milestone timeline. The only progress I can put down so far is that we have decided to use Ogre3D, Newton Dynamics, FMOD, Lua, and will loosely be following the Enginuity articles in the engine design. The backend is good to go except for the Lua console. Once that is finished let the game (developing) begin. :)
  2. Sevans

    Finding Team Members

    Not a bad idea, but I know that many people around here really don't like it when posts are in the wrong forum and they may classify this as that, so don't worry if you get any heat on it. Anyways, I might get in touch once the competition starts. This would be my first year entering this competition and I would love to form a decent team rather than fly solo.
  3. Sevans

    Universal KeyCode?

    Well I am going to start implementing a translation table, between the DI codes and my codes, boo hoo. ^.^d BUT if anyone knows of a better way to do this by simply making a few fancy schmancy method calls please let me know.
  4. Sevans

    Universal KeyCode?

    I am currently building a wrapper for DirectInput. I would like to use my own keycodes instead of the DirectInput keycodes. I am having trouble thinking up a good way to convert the DirectInput keycodes into my keycodes. Is there any universal keycode to correspond to keys? I know I could convert to ascii but sometimes information can be lost, and I would also need a function to convert from Ascii to DirectInput codes (this would be most helpful right now). Here is roughly how I want it to work. // input wrapper interface class IInputDriver { enum MyKeyCodeType { KEY_RIGHT //... }; virtual bool isKeyDown( MyKeyCodeType key )=0; }; // directinput wrapper implementation class InputDriverDX9 : public IInputDriver { // this class has all of the logic to // deal with direct input bool isKeyDown( MyKeyCodeType key ){ // at this point I have an array of bytes. // bit 0x80 is set iff the key was down at last device poll // the array is indexed by DirectInput Key Codes. // so I need to convert my MyKeyCodeType key passed in // to a DirectInput key code. // so I wonder, what would be the best value for my key codes // and how would i convert them? }; }; // how to use the input driver int main(){ // this will be done by a factory in real implementation IInputDriver *driver = new InputDriverDX9(); } Anyone got any ideas? Thanks -Sevans
  5. Sevans

    How do I add a char to a char array?

    Oldschool cstrings might not be your best bet here. Those character arrays cannot be dynamically expanded. Once you set it to a specific size (256 in your case) you cannot add a character at or passed array index 256. Your best bet (and easiest) is to use std::string. #include <string> /* ... */ std::string inputStr; char character; // get character and put in character variable // check character if( characterPasses ){ inputStr.append( character ); } // Then if you want to access the std::string like an array, you can inputStr[4]; // gets the 5th (at index 4) character // you can also do other fun things that you cannot do with old // character school arrays inputStr.length() // gets #chars long, also the size of the array if u like it that way Otherwise, if you really don't want to use string, you will need to make your initial character array large enough OR manually expand it (which can be slow). // something like this might be big enough char *inputStr = new char[1024]; // that would allow for a string that is 1024 characters long // but be sure to delete it like so delete[] inputStr; // if you wanted to expand it, you could do int smallSize; char *inputStr = new char[smallSize]; int expandedSize; // assume that you know the above variables values // so create the new char array of the expanded size char *newInputStr = new char[expandedSize]; // now copy the values from the old cstr // note this is not the fastest way to do it, but its easiest for now for( int i=0; i<smallSize; i++ ){ newInputStr = inputStr; } // now, swap the character array pointers, so input string is the expanded array char *oldCharArrayDeleteMe = inputStr; inputStr = newInputStr; // now delete/clear the old data/references newInputStr = NULL; delete[] oldCharArrayDeleteMe; /* inputStr is now a larger array, it is larger by expandedSize-smallSize again, since I have used the new operator, it will need to be deleted eventually. Note that the new operator is not necessarily needed, but it probably will be.*/ delete[] inputStr; I hope this helps. Also, I cannot stress enough that you should use std::string. Goodluck, -Sevans
  6. Sevans

    Tile Organization Tool

    Thanks Born2Code :) At least now I know it is a very useful idea. I am debating between changing the map editor since it is open source, or writing my own organization tool. We'll see. Thanks again, -Sevans
  7. Sevans

    Tile Organization Tool

    Yeah, just a pain to write a new converter for a different map editor file format, but I think that is what I am going to do. I am definitely going to keep the tile organizer idea around, and maybe implement one myself. -Sevans
  8. Hi, I have been using a map editor that only supports 1 texture file per map. It has begun to become a pain. I have been copying and pasting sections of tiles from one tile file into another tile file for far too long. Has anyone heard of an organizational tool that will do this for you? Something along the lines of letting you drag and drop tiles from one image to another? Thanks much, -Sevans
  9. Sevans

    Map Format

    /slaps forehead. Thanks, I thought something was wrong with my math. I should have just looked it up online. Just another reason why I hate 'concept only' taught courses. I should know that off the top of my head without looking it up.... I am going to bail on the loading map on demand. It just doesn't seem necessary and will place more restrictions on the map format than I am willing to allow. Thanks again, -Sevans EDIT: Hours later I still can't believe I did that... [Edited by - Sevans on July 11, 2007 11:16:49 AM]
  10. Hi all, I just have a quick question about map format. In the past, I have created maps that use a static size of memory. IE; map = new char[MAP_WIDTH * MAP_HEIGHT]; So, map memory footprints are the same each time. I have also read a few articles on map file format, including this one: http://www.gamedev.net/reference/articles/article739.asp which discusses loading portions of the map from a file on demand. I like the idea because it allows for large maps, but the file format required sounds almost too rigid. My question is, does/has anyone actually done this? Is the file IO actually a bottleneck? Found any workarounds for the rigidness? Also, what are your standard outdoor map sizes (tile sizes would be relevant also)? Because using the static format I first mentioned, a map of 1024x1024 has a mem usage of 1byte*1024*1024=1Gig (or am I doing that wrong)? Thanks, -Sevans
  11. Quote: Whatever language you choose, stick with it and learn it well. Many concepts remain the same across all languages, so you can take stuff with you when you move to another language. This is probably the most constructive comment on this thread. Many commenteers are correct (both for and against c++), but learning the concepts behind the programming syntax is the most important. I have found that once you understand the concepts, it is quite easy to pick up other languages. Now for my bit on syntax. Syntax, in case you are an absolute beginner, is the 'wording and grammer' of the language. Some languages have a much more natural, friendlier syntax, like Java, while others can be almost cryptic at times, like c/c++. Choosing a language that has a friendlier syntax will help you look passed the 'wording and grammer,' letting you focus on learning the concepts. And the other bit on OOP. Personally, I think it is important to start with an Object Oriented Programming (OOP) language. The OOP style helps users to visualize what is happening in their program by reflecting objects and interactions in the natural world. Lastly, my bit on programming language pitfalls. These are often 'features' provided by a programming language that, when not fully understood, can cause unexpected behavior that is very hard to debug. The language itself is built to support these 'features' and as such, the compiler often will not complain and error messages (if they appear at all) might provide a hint at best. There are potential pitfalls in every language and some have more than others. One of the potential pitfalls you will deal with in C++ is memory management, and it can be very difficult to grasp. Many other languages, like Java and C#, don't have this issue. Now that I have given you a few facts to help you make a decision (sorry if they appear biased at all :), I will give you my advice in which to choose. My advice is to choose a friendlier, OOP language to start with. And in particular, I would recommend Java. Java is easy to pickup and there are a ton of resources online (not that there aren't for other languages). If you have your heart set on C++, I would recommend choosing C# instead. It has many of the perks of Java and a lot of the power of C++. I also want to note, that I now program almost exclusively in C++. Despite this, I would still recommend learning something more friendly first. I hope my feedback helps. Good luck to you. -Sevans
  12. Woot! Nice job Ally. That's exactly what I had in mind. Sorry I was not around to post it. -Sevans
  13. Sevans

    Function defining vs. prototyping

    Thanks for the touch up on my hasty comment Oluseyi. :P
  14. Hey Ally, Grats. And since your new, I will fill ya in on something cool you can do here at GD. You can put your source code in posts using a nice format, by inserting it between source flags [ source] // code here [ /source] just like that but without the spaces after the opening [ It then looks like this // code here Hope that helps :) -Sevans
  15. Sevans

    Common Tile-Based methods?

    Well 0x000000 == NULL, so I am guessing that your texture is never actually being loaded. Make sure your syntax and path/filename are correct. Also that the format of the picture is loadable by whatever function you're calling there. Yes you will have to somehow explicitly assign a texture id to each tile. You could very easily build a loader to load text files, that store the id's of each tile. something like 0 1 0 1 1 1 1 0 2 3 0 1 1 0 1 0 0 1 0 2 0 0 1 1 1 1 1 1 1 0 2 1 0 0 1 0 1 1 1 1 0 2 3 0 Where the numbers corresponding to a texture number. I will leave that up to you, and simply point you to the resources section for tile based games". Good luck ^.^d -Sevans
  • 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!