• 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.

antiHUMANDesigns

Members
  • Content count

    60
  • Joined

  • Last visited

Community Reputation

58 Neutral

About antiHUMANDesigns

  • Rank
    Member
  1. You can access the elements of an array is a second way aswell. [source lang="cpp"]int array[10]; // create the array int *p = array; // create a pointer of the same type and assign it to the start of the array.[/source] Now, using pointer arithmetics, you can access the elements by adding a number to the pointer, such as "p+1", which is the same thing as array[1]. "p" by itself would be the same thing as array[0]. This actually what arrays do, but I think the compiler keeps a note on how many elements the array was created with, to help you with not going out of bounds. Also, you need to "delete" arrays that have been created with "new" by typing "delete[]". Pointer ariothmetics is not just an alternative way of traversing an array, but is something more or less needed, so it's good to know it. I'm a bit rusty on programming atm, so don't bash me too hard if I wrote something stupid or made some silly mistake. EDIT: oh, and using an array normally (array[0]) dereferences automatically, but if you use "p", it's not dereferenced, so you need to write "*p" to get the actual value of the element, instead of the address to it. Just wanted to point that out, even if I felt it was obvious.
  2. [quote name='zacaj' timestamp='1340576162' post='4952457'] This is known as an IDE. A compiler just takes the name of a file and makes an exe, it doesnt include an editor. For Windows the best IDEs are Visual Studio (which is made by Microsoft), Code::Blocks, and Eclipse. I don't know about eclipse but I know Visual Studio and Code::Blocks include a compiler with them. Id recommend you download Visual Studio 2010 Express edition to start. Alternately, there are lots of text editors that you can code in, such as Notepad++ which you can also configure to run a compiler, or even just open a command prompt to run the compiler from [/quote] Dev-C++ is at least as good as Code::Blocks, I would say. Definitely better than Eclipse in my opinion. So ye, I recommend Dev-C++ if you, like me, think Visual Studio feels too cumbersome.
  3. I know why! Because when maya repeats textures, it only works in maya. To repeat textures, you should change the actual UV layout. Maya does something internally which is not exported. That is, assuming you're repeating using the attributes in the window/sidebar to the right. If you repeat the texture in the UV editor, by scaling your UV's up, it'll work, assuming there's nothing else wrong.
  4. There used to be a great little program called "Nendo", which I started with some 10 years ago. Not sure it even exists anymore, but it sure was lovely to work with. It really felt like sculpting, for some reason.
  5. [quote name='SimonForsman' timestamp='1340562608' post='4952386'] [quote name='Mitsos175' timestamp='1340559334' post='4952377'] In every search that i do everybody says that's is not important to know C in order to learn C++. [/quote] Its not, they're different languages, knowing one of them makes learning the other easier since they are related but learning one in order to learn the other is counterproductive. [/quote] When looking at books and stuff, they often say you don't need to know C to learn C++, and I think that's the kind of thing he, or they, meant, because they're all-inclusive (EDIT: I mean, the book teaches everything without need for prior knowledge) . But the difference between C and C++ really is pretty small (compare C to QBasic and the difference is bigger), so if you learn C++, you know a lot (if not most) of C, for example. If you already know C, then moving to C++ is only a little more than an adjustment. (Not trying to understate the difference, because there sure is a difference, but the difference is small for beginners, I think we can agree.) So, yes it is counter-productive to learn C before you learn C++, if you think about it, but it's not useless to do so. I don't see a reson to downvote what Simon said, because technically he's right.
  6. [quote name='Mitsos175' timestamp='1340559334' post='4952377'] I know a little bit php but a little. So in that case what you tell me to do? In every search that i do everybody says that's is not important to know C in order to learn C++. [/quote] PHP looks a lot like C, which helps. Advanced PHP even has classes and such, like C++. But still, PHP is a scripting language, and C++ is not. Just a little bit of PHP might not help you very much in C++, but at least it helps you understand how programming languages work, which mean you're past the first step. Hey, just give it a try? If you look at a few starter tutorials and think "WTF are they saying?", then... well, play around more with PHP, maybe, I don't actually know.
  7. [quote name='Mitsos175' timestamp='1340558177' post='4952371'] So it's a good of start and study c++? [/quote] If you have no experience at all... nah? I'd love to say yes, but only if you can handle it. If you know a little of some Basic-style language, or even C or PHP, then yes, you should be fine with starting C++. But from nothing, it'll probably overwhelm you.
  8. meh? This wasn't supposed to be a new post, just an Edit. 8|
  9. [quote name='Cornstalks' timestamp='1340555145' post='4952360'] [quote name='antiHUMANDesigns' timestamp='1340554577' post='4952357'] *snip* [/quote] Templates may not be perfect, but if you don't see their value, you haven't been using C++. [font=courier new,courier,monospace]std::string[/font] works because of templates, [font=courier new,courier,monospace]std::cout/cin[/font] work because of templates, <algorithm> works because of templates, [font=courier new,courier,monospace]std::vector[/font] works because of templates, etc. In your own code, templates can help a ton too (for making a generic resource cache, for example, or making a vector (mathematical vector, that is) or matrix library, rather than duplicating the code, increasing the amount of work it is to maintain everything). [quote name='antiHUMANDesigns' timestamp='1340554957' post='4952359'] But if you do'nt use classes, I don't think it's C++ code either. [img]http://public.gamedev.net//public/style_emoticons/default/tongue.png[/img] [/quote] There is so much wrong with that statement I'm not even going to try to correct it... But we're getting side tracked now, and I think some of these discussions would be better in a new thread. Let's not hijack the OP's thread. [/quote] I obviously use std::string from time to time. If I don't see their value, that doesn't mean I'm not using C++. I don't understand your logic here. My personal disposition towards certain bits of code has no impact on what language I am writing in. None whatsoever. It's like saying I don't drive a car just because I chose to never use the cigarette lighter, which is a part of the car. But let me repeat it to make it clear: I do use std::string sometimes. I'm not bothered by it. Can we start scrutinizing your preferences now? This is starting to feel like a witch hunt. Really. EDIT: OH, btw, when I say "...then I don't think it's C++ code either", then that is obviously an opinion, seeing as I used the word "think". Now, I see why you don't want to try to "correct" my opinion. Thank you for that.
  10. [quote name='Cornstalks' timestamp='1340554126' post='4952355'] For the love of all things holy, people, please trim the quotes! [quote name='antiHUMANDesigns' timestamp='1340549821' post='4952326'] Oh, you're right, I'm known to suffer from over-engineering complex. Might be my asperger acting up. But I'm sorry, I just can't agree that using OOP ever makes for bad C++, even in small applications. We might have different viewpoints on this, and I think neither of us would go as far as to shout "Truth!™". Properly formatted and divided into separate files, even small programs look and feel so much better to work with in OOP. And I still think it makes them easier to update and whatnot. But in this very thread, to me it's about advocating abstraction. [/quote] It's not that you just over-engineered stuff. It's that it's not very good code. You wrote an empty constructor (why?), you used a C header (<time.h> (the C++ version is <ctime>)), you're using C-style casts (instead of C++ style casts), you're not including the header to use [font=courier new,courier,monospace]s/rand()[/font], you're using the [font=courier new,courier,monospace]s/rand()[/font] from C (and not the [font=courier new,courier,monospace]s/rand()[/font] from C++), etc. You're being hypocritical of the "you're using C, not C++." And as rip-off showed, you're using OOP wrong. There is [b]no[/b] need for SlotMachine to be a class (it's got [i]one[/i] function, and no member variables). There's no need for the Application class either, as idiomatic C++ wouldn't be using classes like that. If you want evidence that not everything needs to be in a class, take a look at the <algorithm> header. Some programming languages have done the disservice of teaching people that Everything Is An Object And Belongs In A Class, which is so far from true it's not even funny. OOP is great, but it's unfortunate that it's so misunderstood, and teaching a beginner to over engineer isn't doing him/her any favors. For what it's worth, I commend you for trying to help. The reason I'm being a bit harsher than normal though is because you're being quite stubborn and this is in For Beginners, where details matter. And for the record, you can do OOP in C. It's not just a C++ thing. C++ never meant for everything to be wrapped up in a class, and it intended for free standing functions to be used in addition to its other features that complement OOP. [/quote] Ah, man, I tried to re-write the OP's code as quickly as possible, and I made the constructor thinking I would put something there, and ended up not doing so, but leaving it like that. I didn't know it would come under scrutiny. Most people just write small snippets of code (or even pseudo-code) to show something, but I undertook to re-write it all as an example for a beginner, but it ended up being scrutinized by professionals instead. Had I known... <time.h> instead of <ctime>, once again an honest mistake from trying to rush it. Doesn't change the point I was trying to make, though. If you look back, it's about the C++ way of thinking, not which libraries you use. I disagree that SlotMachine shouldn't be a class. This is a quick prototype, or a first-version of the "game". If I wanted to add things to the slot machine, having it as a class already is a good thing. You might not like it, but to be completely frank and brutally literal, I don't give a shit, because it wasn't written for your enjoyment. It's C++, it compiles without errors, I like it, it allows for further development nicely... I'm happy with it. In OOP, the slot machine is an object. I stand by that. I don't see how it matters what the class contains. The slot machine is an object, and when I pull it's lever, that's a method for that object (or, member function). Making it a function is not OOP, making it a variable won't work, so what would you make it? I chose to make it a class, and until until you can change my mind as to why it shouldn't be (performance is not an issue in this application, for example), I stand firm. And I don't put everything in a class either. In my own projects, I have "lose" functions for getting random floating point values, for example. I never said everything needs to be a class, but I do claim that some things should be classes, because it makes logical sense if you consider how they are being handled. I can probably find some way to make a getRandomFloat() function to become an object, by looking at it like a pseudo-random number generator, but I don't see how I would make an actual slot machine into a function or a variable, and not feel silly about it.
  11. [quote name='andrew111' timestamp='1340553247' post='4952348'] [quote name='antiHUMANDesigns' timestamp='1340547802' post='4952317'] Don't you agree that C++ without OOP could just be C instead? Most of the improvements in C++ are related to abstraction. If you chose to ignore those, you might as well go with C? Do note that I'm trying to teach a beginner the difference between C and C++. I dont have any other agenda here. But don't get me wrong, I never meant to claim that you can't write C++ procedurally. I agree that it will compile, but I'm also quite sure that the only reason it will still compile is because C++ never got a chance to get free of C. Stroustrup himself says that C is obsolete, and that he wants C++ to be free of it. [/quote] I'm not sure if you've programmed in c, I've used it a bit for writing libraries, and the main problems I have with it, are things that c++ has introduced shortcuts for, and of course its painfully lacking of the standard template library (So you have to implement your own lists, hashmaps etc). So not defining classes isn't really equivalent to c code. [quote name='antiHUMANDesigns' timestamp='1340550633' post='4952331'] And mixing procedural and OOP is the same application simply feels right-off stupid to me. I see no defense for it. (OR, more correcly: I see no defense for ME to do that.) [/quote] I know the feeling, I dislike mixing functional code with imperative code, but I think procedural and oop can fit together fine. I know the feeling of over obsessing with oop from when I first started programming. If you want to see programming from another perspective, to see why oop isn't so important, you should look at a functional language like scheme ([url="http://racket-lang.org/"]racket[/url] is a good implementation) or [url="http://www.haskell.org/haskellwiki/Introduction"]haskell[/url]. Also if you're interested in alternate oop systems, look at [url="http://www.gigamonkeys.com/book/object-reorientation-classes.html"]clos[/url] (common lisp object system), I think it's a vast improvement over the c++/java/c# oop system. Knowing some of these things, I believe will help you put things in a better perspective. [/quote] No, I agree it's not equivalent to C code just because you don't use classes. But if you do'nt use classes, I don't think it's C++ code either. It feels more like some kind of mix...which I don't enjoy. As for procedural and OOP... you know, the term "procedural" is something I probably end up using widely and wrongly. I lack formal education and I may get the terminology wrong. I've always programmed alone, for about 19 years, so I've never needed to express these things in words, to others. I do my best to express myself, but it obviously comes out wrong at times.
  12. [quote name='Matt-D' timestamp='1340551753' post='4952340'] [quote name='antiHUMANDesigns' timestamp='1340550633' post='4952331'] [quote name='Matt-D' timestamp='1340549177' post='4952323'] {...} (tryign to cut down on the reply history here) [/quote] OK, see, from everything I've read, 99% of people have nothing but bad things to say about templates, and I chose not to use them myself. (Though by doing so it also means I'm not good at them either.) And I'm not exaggerating when I say 99%. I can't recall one single person, besides you, who has said anything good about templates. I just made personal choice not to use them, but I admit that I no longer remember straigh off-hand why that is. And don't get me wrong, I write things procedurally at times aswell. I just don't think it'd be a good thing to teach people to do things the easy way. Maybe I'm at fault, I'm not a licensed teacher. And, perhaps due to my aspergers, I do surely over-engineer things, because I want everything to make sense. And mixing procedural and OOP is the same application simply feels right-off stupid to me. I see no defense for it. (OR, more correcly: I see no defense for ME to do that.) [/quote] Well, I prefer to look at quality over quantity. If templates are good for Abrahams, Alexandrescu, Gurtovoy, Meyers, Stepanov, Stroustrup, and Sutter, they're good enough for me :-) // So, now you'll be hopefully able to recall a few more people besides me who said something good about them [img]http://public.gamedev.net//public/style_emoticons/default/biggrin.png[/img] I would presume that 99% of people you've talked with / read are probably still stuck in the early 1990s "C with Classes" approach and aren't really using C++, since templates are a pretty fundamental feature thereof [img]http://public.gamedev.net//public/style_emoticons/default/biggrin.png[/img] // Chances are they were using ancient (late 1980s/early 1990s) compilers that didn't support much beyond the pre-standard "iostream.h" and simply couldn't compile template-based code well or at all -- so, no wonder they had bad experience ;] I have to say, it takes some major intellectual laziness though to never try a feature again just because a decade or two decades ago one had a bad experience... If you want to catch up, I'd recommend: [url="http://www.moderncppdesign.com/book/main.html"]http://www.moderncpp.../book/main.html[/url] [url="http://www.boostpro.com/mplbook/"]http://www.boostpro.com/mplbook/[/url] If you're already familiar with OOP and design patterns, you can see the first book as trying to achieve the abstraction without the run-time performance overhead penalty -- for instance, what's known as "strategy pattern" in the Design Patterns book (using the OOP) way is really stemming from a common software engineering principle and (re)introduced as "policy based design" (using the GP) in the Alexandrescu's book. You shouldn't trust other people, you should pick up the book, examine it, and determine the costs/benefits yourself! That's why this part of your statement worries me: "and I chose not to use them myself. (Though by doing so it also means I'm not good at them either.)" This is exactly the WRONG approach -- you should FIRST become good at a feature in order to be able to assess whether it's good or bad for your project(s) and choose what's right, otherwise you're unable to do so (and no, reading/listening to other people, including me, is not enough -- personal experience is vital!). Only then you're able to pick and choose optimally. Take the "virtual" keyword, for example -- are you sure that when you need polymorphism in your code it *always* has to be dynamic/run-time polymorphism? If not, are you aware that C++ allows you to have static/compile-time polymorphism with absolutely zero run-time costs /* [url="http://en.wikipedia.org/wiki/Curiously_recurring_template_pattern"]http://en.wikipedia....emplate_pattern[/url] */? Perhaps it will turn out that dynamic polymorphism is exactly what you need. Perhaps not. Similarly, it may turn out that Data-Oriented Design (DOD) will be a better fit than OOP in a particular application -- [url="http://gamesfromwithin.com/data-oriented-design"]http://gamesfromwith...oriented-design[/url] -- or, in completely another application, the costs/benefits flip around. That's the beauty of multiparadigm programming -- it allows you to pick *exactly* what you need, when you need it -- no less and no more. Seriously, I recommend you to pick up GP and TMP as well -- it will make you a better programmer and a better designer. As for mixing -- again, see the links to Stroustrup's FAQ -- no offense, but I'm inclined to take the word of the C++ creator over you and "99% of people" you've encountered for what's wrong and what's right in C++ :-) [/quote] A very well written reply. +1 (Apart from your last sentence.) I understand that there are people who like templates, of course, I just haven't heard of any yet. I didn't count Stroustrup, because... well, frankly, he's biased. You misunderstand me, I didn't chose not to use them because of what others have said. They didn't make sense to me. Aren't they changing/improving templates for C++0x? As I recall, they had a pretty big flaw, which they are [finally] fixing now, so there is/was probably a reason that caused people not to like them, and likely the same reason that caused them to fix/improve it. I have no formal education in programming, so I lack a lot of the terminology, and maybe I use some of it poorly. I do my best. I also side with the creator, once I truly understand the intent and value of it. I just don't see it with templates. They're messy, first of all. I don't like using "++" in statements either, so I don't side with the creator there either, I think it's bad practice to use it in any other way that pretty much only "x++;" on it's own. and there are articles explaining why it's a bad idea, because it causes ambiguity in many cases. But C++ allows it, just like it allows many other bad practices (in different people's opinions). I just think templets fall into that category, which inherently means it's an opinion or matter of taste or style. All I'm saying is that I'm not alone in seeing it that way. And like I've said earlier, I also use C++ procedurally (mostly when testing stuff), but I would never mix 2 styles in one application if I could help it. I actually go to great lengths to avoid doing so, sometimes. Keeping one style consistenly throughout one program is deathly important to me, so that I know where to look and what to expect when I look for things in my code. But if I completely skipped classes in a program, I personally would not consider it proper C++, and I stand by this opinion, for now.
  13. [quote name='nagarjun' timestamp='1340514701' post='4952235'] [quote name='antiHUMANDesigns' timestamp='1340503855' post='4952189'] If you have a 3D model of the world, you can quite easily load it into an application and display it with openGL. Moving the camera around is about as easy as it gets. If you don't want to be encumbered by an actual engine, then what I said is really all it takes. No need for an engine that supports audio, physics, animation and so on. No need for an engine at all, really. Export the model into some easy format like .obj, or .rtg, and write or borrow a loader, and you're pretty much good to go. That is, unless you want collision detection for the camera, which I guess would be nice and make sense. Maybe you can add that too, since it's the only thing you'll need to focus on to make it work. And when you're done, you'll feel good about having done it yourself, and you'll have learnt something. [/quote] thank u for your advice.. i want to follow this method rather than using a game engine. but, can you please elobrate the procedure..i have no expernce with openGL...what are the tools i should use for this?? [/quote] [quote name='nagarjun' timestamp='1340514701' post='4952235'] [quote name='antiHUMANDesigns' timestamp='1340503855' post='4952189'] If you have a 3D model of the world, you can quite easily load it into an application and display it with openGL. Moving the camera around is about as easy as it gets. If you don't want to be encumbered by an actual engine, then what I said is really all it takes. No need for an engine that supports audio, physics, animation and so on. No need for an engine at all, really. Export the model into some easy format like .obj, or .rtg, and write or borrow a loader, and you're pretty much good to go. That is, unless you want collision detection for the camera, which I guess would be nice and make sense. Maybe you can add that too, since it's the only thing you'll need to focus on to make it work. And when you're done, you'll feel good about having done it yourself, and you'll have learnt something. [/quote] thank u for your advice.. i want to follow this method rather than using a game engine. but, can you please elobrate the procedure..i have no expernce with openGL...what are the tools i should use for this?? [/quote] Sry for the late response. OK, no experience with openGL... well, if you're decent with C++, you may be OK, because just displaying a model isn't very hard in openGL, using the most basic way, where you just specify where the vertices are, and their texture coordinates and normal. You don't need any "tools", I would say. Just find some code that loads an .obj or .rtg (or something else, if you can find it). That'll usually give you an object where all the vertices and stored, and you just iterate through it and output the vertices using glVertex. (I would definitely make it a display list, though, but that's easy to add once you get the model showing.) If you want lighting, you need to speficy the normals, which will be in that object that loaded your model, so output those aswell. And then you need to speficy light positions and turn on lighting, and some minor stuff like that. It really isn't very hard, so don't worry, just get one thing working at a time using online tutorial. It's no problem at all finding a simple tutorial on how to just output triangles, on google. It's very, very basic. Try googling and reading some of it there, and if something doesn't make sense to you, come back here and ask more specifically what you need help with.
  14. [quote name='Aurioch' timestamp='1340545703' post='4952313'] Thanks for answers, both of you. winsrp, I'm making 2D game so BoundingBox and BoundingSphere are out of question... I'll use the tutorial you gave me. It will require complete code rewrite then... Well then, I'll stick to the XNA for now and keep Unity in mind. Few 2D projects first, then I'll move on to 3D... I'll need to learn to use Blender or Maya too >.< [/quote] There's a good and free 2D physics library called Box2D (right?). You could check that out.
  15. I did some 3D modeling for a small game that used XNA, and the collision detection/response seemed to be lacking. It acted really weird once the speeds increased. But of course, it might have been the programmer's fault, but it seemed to improve once he switched to another library for physics. ("Bullet" library, I think.)