• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.


  • Content count

  • Joined

  • Last visited

Community Reputation

112 Neutral

About kire

  • Rank
  1. Quote:Original post by DeathLetum hehe my bad im kinda sleepy and hmm im using C++ and i didint really understand what you said in ur post He says that if you loop over the array (or vector, whatever you use) you can get wordlength like this: for(int i = 0; i < arrayLength; i++) { /// char* strings: score += strlen(arrayWithWords[i]); /// C++ strings: score += arrayWithWords[i].size(); } off course this is a very basic example ;)
  2. Quote:Original post by Brash Benson No, you pretty much have the right idea. I'm no Poker expert either, but I know the basics and that sounds about right. I just wish there was an easier way to do it than "if card 1 is different than card 2, 3, 4, and 5, check the next card against all others, etc". What a pain :( Some pseudo-code straights: val = card.value(); int straightCount = 1; while(in_array(++val,otherCardsValues)) { straightCount++; } val = card.value(); while(in_array(--val,otherCardsValues)) { straightCount--; } And this in a loop so you can do this for cards 1->4. I can't think of anything better, but it doesn't look like a real pain to me, I've written worse. Checking on equal would be quite more easy i'd guess. edit: Ow, I used pseudocode for the in_array because i'm not sure java support such a function (I don't program in java often), it isn't hard to implement one yourself however. edit nr.2: this code only lets you see there is a straight, not which cards create it. edit nr.3: as i was to stupid to think of ordering cards in advance myself (look post beneath this one), the pseudo code i posted is easy to edit to create a (shorter) algorithm for straight-checking. [Edited by - kire on September 6, 2006 2:09:16 PM]
  3. Quote:Original post by hjarie oi i'm learning c++ and have made my first (simple)game its a rock paper sissors game where 2 players choose their mode and then the computer will see who wins. first question is: when the players input they mode([1]rock [2]paper or [3]sissor) they can se it on screen. now i use cin >> to get the input but is there a function to get the info without showing it onscreen? second question: is the coding any good? here it is *** Source Snippet Removed *** For your first question: afaik this isn't possible in console mode :). Code comments : you should use an initialization list for your constructor ininstead of setting the variables inside of them. So you get: speler::speler() : score(0) { } In c++ most coders use cout instead of printf (as printf is actually c-code), but it's no real error offcourse. also, your score name is not very perfect (I'm dutch myself), you now use a name "set score", which would actually mean: replace existing score with this one, a better name for example is addPoints. Even better would be, as in this game you'll always add one point: addPoint(), without arguments. Other points: your code is to much intertwined in my opinion, you should seperate things more (output in one place, game calculation in one place), but that's very normal for your first games :). You also use a lot of if/else, sometimes (not always) you could replace them with a switch structure. In my opinion it isn't good to make any member public (except some rare cases where constant use of setters & getters would be unusefull), so I'd make 'naam' private also. I hope this comment was a bit helpful.
  4. indeed, make sure you link both sdl, sdlmain (and i think user32) Mostly an ignore is not needed, you could get a warning but everything will work smooth.
  5. @sirbone72: You could try a different linking-sequence, however I'm not sure that will solve this problem. Also: are you sure your library-files are updated? for example, I get reference errors if I use this: -lSDL -lSDLmain it has to be -lSDLmain -lSDL
  6. OpenGL

    There are different ways, not? you could simply go for orthogonal rendering and use the depth buffer to create a display order in your elements, each element could then be a 2 dimensional polygon. Then you can draw textures or text to that polygon. Tbh I'm not sure myself & better suggestions are more than welcome, i'm also creating a basic UI-system atm, but I'm only creating the UI logic atm, not how it should be drawn.
  7. Quote:edit:By the way, is there any way in c++ like php to set it so that you can get an array to continue in alphabetic order after setting the first couple so I don't have to type out all of the letters? char myArray[26] for(char c = 'a'; c <= 'z'; c++) { myArray[c-'a'] = c; }
  8. "Best" solution I think is to work with gametime passed, a velocity and keystates. On keydown you put this keystate on "pressed", so you don't always have to resend this item. When the keystate is not pressed, you do nothing, which is fairly fast enough I guess, what you would do for moving forward is e.g. something like this: if(forward_key_pressed) { translate(VelocityVector*passed_time_since_previous_frame); } offcourse, in order to let it work decently you need a clear system that manages frames and such. The repeat is good for a quick fix, but isn't the nicest solution.
  9. Quote:Original post by samoz so is a virtual function in C++ the same as an abstract method in Java then? not at all. An abstract method (or "pure virtual") in c++ would look like this: virtual void abstractMethod() = 0; The virtual is the keyword that helps making polyformism in c++ easier. The decent explanation stands above ;). [Edited by - kire on September 4, 2006 1:56:41 PM]
  10. If you use a function with unknown pointer-input at least check for not null. @evillive: in that function he must use a pointer if he wants to pass by reference ;). It would be quite ridiculous to set the screen data of a local copy.