Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

271 Neutral

About KittyPlaysViolin

  • Rank
  1. KittyPlaysViolin

    Start learning C# togheter with XNA?

    First of all this just is my opinion. I'm not trying to limit C++ to anything at all. Though, I like to use it when I do "low level stuff"; making a custom direct3d rendere, interfacing with C or assembly, embedded programming, dll injecting... you get the point. When I sit down with a UML class diagram, containing hundreds of classes (maybe describing a game?) I tend to pull out the C#/.Net combo. I do admit this is a personal choice and it does reflect the fact, that I was schooled in C# and thought myself C++ on the side, acknowledging the limitations of C#/.Net in a unmanaged capacity. I know that C++ can facilitate oo programming just fine, but I do like syntactic and technological "simplicity" of C#, when I have to build bigger systems. Again, it could just be the fact, that C# was my introduction into programming. I was taught with very strict oo discipline... all the jazz; KISS, UML, design patterns and automatic garbage collection etc. Bit of a ramble there, and probably off-topic, but I think you know what I'm getting at   Haha of course! I was just adding my side to it as well to make sure the argument was balanced and so it didn't just seem like there was not particularly many reasons to pick C++ Actually, after reading this post and my conversation with you I think I'm actually going to pick up C# again and see how it goes. Of course I'm still mostly going to be working with C++ and SFML :P
  2. KittyPlaysViolin

    Start learning C# togheter with XNA?

    SFML offers hardware acceleration right off the bat as long your OpenGL is running on the hardware(you have the right drivers) :D While I like SDL's features I generally prefer SFML since it is way more modular/c++/oop/whatever and easier for me to structure programs with.   I don't think you should limit C++ to HLSL, especially considering the wide array of both 2d and 3d graphics libraries/engines/frameworks available. There's still OpenGL with GLSL, Allegro, SDL, SFML, Irrlicht, Ogre3D and so many more. And OOP is not just limited to C#/XNA. You can achieve that with C++ just as fine, and SFML is structured really well for OOP. Also, switching languages shouldn't be an issue. At a certain point in learning languages you can easily draw parallels between languages and it becomes progressively easier to learn new languages. Yes C++ does have to deal with memory, and C# being a managed language has the luxury to gloss over this. I don't think you should ever lock in to any language. I do however second your suggestion on Unity. It's a wonderful program and I only wish I had more time to spend learning it :P      Like you I also started with TNB tutorials on Java but quickly after I switched over to a variety of books in several different programming languages, as while he does teach the general idea pretty well, he does not follow a lot of coding standards and his instruction can sometimes lead to some bad programming habits. If you still want to give C++ another shot I recommend reading the tutorial at cplusplus.com or at learncpp.com Those are both great resources. If you do go this route I highly recommend SFML. The documentation is absolutely wonderful, and they have great resources available. Also if you like coding tutorials, CodingMadeEasy on YouTube(as well as on his personal website) basically walks through the SFML documentation using video examples and does a pretty good job at it(though he does assume fairly strong grasp on the C++ language). I can't say much about C# as I've had minimal exposure to it, but from what I do know I can say that the language syntax and style is very similar to Java. I can't say anything about XNA as it lies out of my area of expertise.
  3. KittyPlaysViolin

    Tile Map Editor/Collision Detection

    Crusable: Ah thanks Crusable! Yes this is what I was thinking of but in reverse. I did not know SFML had a VIew class that took care of these things, that is very nice. The method I was thinking of using was one I used back when I was developing my game in Java. I was keeping my player on the center of the screen but  moving the background around him, but I guess this is a lot more intuitive!  DekuTree64:  Oh okay that clarifies things a lot more. I will be experimenting with the method you suggested as well others in order to see what works best for me. Thanks a lot! :]
  4. KittyPlaysViolin

    Java books

    Hey Crusable! Just saw your reply on my post :] Anyway, for Java books I have several in my bookshelf but I think the one I find the most useful is Java All in One For Dummies. It's a pretty thick book but it's not heavy and it's jam packed with information. The style is highly accessible and rarely is it dry like the other Java books I have. And speaking of the other Java books I have in case you would want to check those out as well I have Learning Java from O'Reilly, Killer Game Programming in Java from O'Reilly again, and Developing Games in Java by David Brackeen. I have other small books but I mainly used those for the exercises when I was just learning computer science for the very first time. The two books by O'Reilly have a lot of information but I personally find them very dry. All in all I think my favorite recommendation to give is the All in One Java for Dummies book :] it covers all the core classes and gives you a good working knowledge of Swing. Killer Game Programming in Java has a more extensive coverage of Swing and the likes but it is more hefty, more expensive, and really really dry. Good luck with Java and Android development! -Adrian
  5. KittyPlaysViolin

    How To Creage A Game .

    Hafido: Just a little tidbit, you don't need to include your name as one of the topic tags :) Your question is quite vague so I'll do my best to answer it in the most general way I can :] You have several paths you can take depending on your background and your preferences, so I'll just try to list a basic plan for you. Remeber to definitely check out everyone elses advice on here. Hit up the search bar and check out questions like yours. Also the links jbadams posted are great links that will give you a good perspective and what you should take into account. Well, here goes! 1. You already have a firm grasp of programming in one or more programming languages If this is the case then you have a good head start! At this point I would recommend deciding whether or not you want to use an engine, use a library with your programming language of choice, or do everything yourself. a) You have an engine of choice: Excellent! At this point I would recommend reading around, definitely picking up the docs for the engine and briefly scanning them until a very specific issue pops up, at which point you can pinpoint that in the docs. Most likely the engine's site or community forum will come with a variety of excellent tutorials. I would highly recommend you make your way through these, and integrate yourself into the community there as well as here and whenever you have any specific questions, make the posts as directed as you can to expedite the process and make it easier and more enjoyable for everyone involved :) b) You have a programming language of choice and a library of choice Great! I'm assuming you already have a working level or higher of proficiency with the language so at this point all you really need to do is learn your library. Just like with the engine, direct yourself over the library site, download the docs, and integrate yourself into the corresponding community and sections of that community over here at gamedev.net There are bound to be tutorials and examples galore of your engine laying around the internet; at that point just exercise some google-fu and thou shalt find what thou seeketh, or something. Definitely check out open source projects that use your library to get a good idea of how to use the library. Watch lots of YouTube videos about your library, seeing other people's work is great inspiration and motivation to keep going :) c) You have a progamming language and are going to build everything yourself I honestly have no advice here except I applaud your determination and wish you the best! Maybe get familiar with your operating system and how to program native apps, and....yeah....this is out of my area of expertise :P 2. You have no experience in programming or very little a) Game creation software There are many game creation suites out there that can help you create games with little to no programming knowledge. Hit these sites up and check out their products and see if any are to your liking. From there, just like any other piece of software like Excel or Powerpoint it's all about learning the features. After that you can start focusing on design and how to actually make games. b) Learning a language or two Great! Pick a language, hit the books,internet,YouTube, what have you and venture forth. After you have a solid grasp of a language of choice, redirect yourself to section 1 of this post :P   After you have picked your tools the rest is slightly less technical and deals more with design itself. At this point you have to decide on a couple things but for now the simplest path would be to choose whether you want to make a clone game for practice, or try your hand at your own game. I. You want to make a clone game This is a great place to start, and I'm sure many of us started here. First, familiarize yourself with the game. Play around with it, but also take note of the many aspects of the game. I don't just mean the gameplay, but notice the artwork, music, user interface, and all the details you can. Once you're ready, break out good old pencil and paper and try "sketching out" a model of the game. If you are using object oriented programming, try modeling what classes you will need, the methods they will have, and how the objects will interact with each other. After you have a general idea of the game, start with a plan, and go from basics to advanced. Code up your game making sure to SAVE and DEBUG regularly. This part is crucial if you want to avoid punching a hole through your computer 13 hours later when you end up with an unusable amalgam of code that doesn't look like anything, nor does it do anything anymore, and oh, you forgot to save so it's all gone anyway. Once you have a working game, play it! Sometimes we get so focused on the actual development part that we forget to sit back and admire our work, however sloppy or great it might be. From there you can add your own modifications to it to give your own personal touch. Congratulations! You made a game :) II. You want to make your own original game. This is a little bit harder than creating a clone game but it has its rewards as well. The first thing I suggest of course is just playing games you like until you get some inspiration. Jot down your ideas on pencil and paper and play around with those. Once you have a general idea of what you want to do in the game, it's time to narrow your scope. A lot of times when starting a new project we go crazy and try to add in everything we can possibly imagine, and things just become unmanageable and insurmountable. Focus on a core element of the game be it a mechanic, artwork, or anything that you can really center the game around. Then you can just refer to section roman numeral I and go from there designing your game's hierarchy. Congratulations! You have made your own original game! Show it off to the people at gamdev.net and we'll play it and let you know what we think :) Well there's my behemoth of a post. Take it as you will, but I hope it helped you in some way or another :) For the future, try to keep your posts as directed as possible so people can respond so specific questions and we can all make progress much faster. I hope you find the answers you are looking for and manage to get started in game programming. I wish you the best of luck! -Adrian
  6. KittyPlaysViolin

    Tile Map Editor/Collision Detection

    DekuTree64: Nice name haha :] No, unfortunately at the moment my tile map editor is pretty bare bones. It's not even an editor in the truest sense of the word as I don't have a GUI and whatnot for it. All I have is a console application which generates a map of tiles from a map of pixels. What do you mean here by scripting? I've been fuzzy on that term for that longest time. Are we talking about the same scripting that you can use to create cutscenes within your own engine? If so I wouldn't mind some clarifcation on how that works haha. Like do I just write a text file with a set of commands and write something to parse those commands and move game objects with it? But again, that's a different story.     How would you store this map information to make it easily modifiable to changes such as camera movement, changing of tiles(my game revolves around "combat gardening" haha)? Farmdve: Not exactly, like I said, my "editor" is pretty bare bones, and pales in comparison with Tiled. At the moment I'm just having it read an image file of pixels and make a bigger image file of tiles. But that's purely for viewing, I then have to repurpose it to actually create an array or some kind of data structure to hold all the tiles in a map and display them, allow modification, etc. I'm not too familar to structs as I've largely just used classes when I needed some kind of structure to hold various types of data. I came to C++ from Java, so I didn't reaally see much benefits to using structs over classes. May I ask then how you go about drawing your map and moving it? Are you iterating through your Map struct and displaying each Tile individually on the screen and just moving them all together that way? Karsten_: Those are some pretty neat graphics that you have for your environment! Were they hand drawn and scanned in? I really like the feel they have to them. Yeah your tile editor is leaps and bounds beyond mine. How did you go about developing the GUI for the editor? And I'm guessing those lines and points are for some kind of enemy/entity AI? Do you include initial placement of entities such as the player, enemies, items, and the such in your map editor? And if so how do you do this? Are you using some kind of layering system to place them on top of the tiles? Thanks everyone for your replies!
  7. KittyPlaysViolin

    Tile Map Editor/Collision Detection

    Thanks for the reply Crusable! So are you then saying that I can use my existing method, but then instead of drawing one whole image that I should draw struct by struct? My concern with that then is how the map would move. The movement I usually use is the one found in Pokemon games where the player remains in the center and the map moves in the background around him until he reaches the edge of the map at which point the player actually moves along the map. If I were to do this method and had a map of say 64x64 tiles would I hold all these tile structs inside of an array, and then upon prompt for movement loop through the array and change all the positions accordingly? Wouldn't there be massive performance issues with this? How big of a map could I do without having to section areas and have the player go through loading screens? Sorry if I have a lot of questions >_< I do not know enough about this subject as I didn't get far in my previous project but am now really starting to get into this one. Thanks for your help again!
  8. Hey everybody! I'm continuing in my SFML endeavors and I just recently finished a tile map editor. Given a tilesheet and the size of each tile, the program is able to take a "map" where one specific color corresponds to a tile. At the moment you have to hard code the values of each color-tile pair, but I will make it so that it can read in a text file that has the color pairings(if anyone has a better way of doing this I'd be interested). Now my issue lies here. At the moment my map editor only takes one image and creates another one out of it. I can display this image as the background and move it accordingly when my character moves yadda yadda. However I do not really understand where the collision detection is going to fit in here.Is it possible to have this information handled within the tile map editor itself? I remember ages ago when I first started Java I created a Tile class and each Tile said whether or not it was "walkable". However I have foregone that step in this case so I am at a bit of a loss at what to do.   While reading the forums I found some people talking about using "layers". So I would draw my map in the background as usual, but at the same time have an invisible layer on top of that with which the sprites/entities interacted with. But I would like this to be automatically coupled with the tiles(e.g. grass is walkable tile, but stone is not). Also on a similar note, I am curious as to the best way of storing this "walkable" information. As some objects could become walkable later on should the user use a certain item, for example water if the user gets into a boat. I don't think this should change water's walkable property, but instead override it somehow. Again, I am lost here.  I will include the code as an attachment as well as in the post itself for the map editor in case it is of use to the discussion. Thanks again for the help! -Adrian Map.h and Map.cpp #ifndef MAP_H #define MAP_H //SFML Includes #include <SFML/Graphics.hpp> //C++ Includes #include <iostream> #include <string> using namespace std; class Map { public: //Ctors Map();//Don't use this lol Map(string rawMapFile,string tileFile,int tSize);//Accepts map of pixels, tile spritesheet, and the size of each tile //Methods void process();//Takes map of pixels and turns it into map of tiles void initTileColors();//Initializes the color values for each tile private: sf::Image rawMap; //The map generated by the user where each pixel represents a tile sf::Image tileSpriteSheet; //The map generated by the program and saved to disk for user int numOfTiles;//How many tiles the user has in their spriteSheet int tileSize; //The size of each tile in the spriteSheet, MUST BE SQUARE sf::Color tileColors[]; }; #endif //SFML Includes #include <SFML/Graphics.hpp> //Personal Includes #include "Map.h" //C++ Includes #include <iostream> #include <string> using namespace std; //Ctors Map::Map() { } Map::Map(string rawMapFile,string tileFile,int tSize) { //Loads the rawMap image if(!rawMap.loadFromFile(rawMapFile)) { cout<<"Could not load file: "<<rawMapFile<<endl; } //Loads the map's tile spritesheet if(!tileSpriteSheet.loadFromFile(tileFile)) { cout<<"Could not load file: "<<tileFile<<endl; } //Sets the size of each tile in the spritesheet and how may tiles there are tileSize = tSize; } //Methods void Map::initTileColors() { //******************************** //REMINDER!!! Make this user customizable through text file or something //******************************** tileColors[0] = sf::Color(0,0,0,255);//Ground tileColors[1] = sf::Color(100,100,100,255);//Stone tileColors[2] = sf::Color(255,255,255,255);//Sky } void Map::process() { //Creates a blank image the size of rawMap times the size of each tile in tileSpriteSheet sf::Image processedMap; processedMap.create(rawMap.getSize().x * tileSize,rawMap.getSize().y * tileSize); //Takes map tile spritesheet and turns all magic purple pixels into transparent pixels tileSpriteSheet.createMaskFromColor(sf::Color(255,0,255,255),0); //Loops through every pixel on the raw map //When a pixel matches a color in the tileColors array it copies over the appropriate tile from spritesheet //To the processed image for(int x = 0; x < rawMap.getSize().x; x++) { for(int y = 0; y < rawMap.getSize().y; y++) { //Ground if(rawMap.getPixel(x,y) == tileColors[0]) { processedMap.copy(tileSpriteSheet,x * tileSize,y * tileSize,sf::IntRect(0,0,tileSize,tileSize),true); } //Stone if(rawMap.getPixel(x,y) == tileColors[1]) { processedMap.copy(tileSpriteSheet,x * tileSize,y * tileSize,sf::IntRect(8,0,tileSize,tileSize),true); } //Sky if(rawMap.getPixel(x,y) == tileColors[2]) { processedMap.copy(tileSpriteSheet,x * tileSize,y * tileSize,sf::IntRect(16,0,tileSize,tileSize),true); } } } processedMap.saveToFile("C:/Users/Adrian/Desktop/NewMap.png"); cout<<"Success"<<endl; }
  9. KittyPlaysViolin

    SFML Directory or File not found

    ^As I recall, all of your personal includes(files that you create yourself) should be surrounded by quotes and not angle brackets. At least that's the rule I follow and it seems to work. As Spyderzone said I believe this is the issue and not xxx.h vs xxx.hpp
  10. KittyPlaysViolin

    [SFML 2.1] Growing Plants

    Ah, thanks for the replies guys! Just giving a quick update and some clarification. I scrapped the idea of using the RectangleShape class and decided to inherit from Sprite, as that took care of a lot more stuff for me. Also, my trees and plants aren't going to be geometrical entities themselves. Instead they are going to be textures. When a plant grows to a certain point it will change out textures, and some plants will even get a bigger texture. For example my tree would go from being 8x8 to 8x16. At this point I believe if I pass a bigger texture to the sprite using setTexture it would automatically scale itself as Sprite does not have a setSize method like RectangleShape did. kd7tck: That sounds like something really cool to research but alas that falls outside of the scope of my current ability and project :P I am merely dealing with tree sprites and the such. But thanks anyway! AllEightUp: I like the rules you have set up there, I think though my system will only worry about the plant's current hydration,temperature(accounts for sunlight as well as climate), and something resembling overall health. As it stands my game is going to be sidescrolling and my character is going to plant plants in pots, water them, and defend until they grow, at which point he can use them as allies. Once they mature enough, he can transfer them out of the pot into the ground to defend a certain location or provide access to certain location.  ex. Player starts out at their home, brings out a pot and plants a seed, waters it, and takes it outside for it to start growing. Monsters walking around can aggro at a certain distance and come towards you. You protect the plant and it matures to its second stage. This plant is a basic Rose Thorn and can fire thorns at enemies. You pick up your pot and walk forward, the Rose thorn automatically attacking enemies as they come into range. You scavenge whatever you need from the area and take care of your plant's needs. Your plant matures to stage three and you head back home to plant it outside your base. Your plant is now permanently there, unless you decide to move it with the trowel(small plants only, and this reverts them to stage 2). It becomes night time and you retreat inside your base. Tower defense stage  starts up and you must use the plants you have available to defend your fortification. If you made a Tree and added a Vine to it for example you could use it to easily scale between different levels of your fort to help your plants protect your home. After enough scavanges and seige defenses you are able to take some of your materials, one of your potted plants, and head to a new area, leaving behind your plants to reclaim the area for nature. What do you think? :]  
  11. KittyPlaysViolin

    What do I learn after the basics?

    Hello! Congrats on finishing the book and the basics :] At this point, without fully understanding what your "basics" encompass, I would suggest tackling small projects and going from there. You'll be learning how to use things as they come up. When I finished my basics I went on to try and make my version of Pong. This is great because it gets you familiar right away with using Swing. Before you jump into the coding though I would highly suggest you get pen and paper and write down what you think you are going to need. ex.   Two Paddles Ball Score System Collision detection between paddle and ball Collision detection between paddle and goals Bounce mechanism etc From there on you can decide how you want to structure your classes, and once you have those written down, decide what methods each class should have and which classes should be responsible for which interactions. From then on, get to your favorite IDE/text editor and start coding away. Whenever you run into trouble, hit up the debugger, set up some breakpoints, use System.out.println(), and try to figure out what's wrong, If you can't figure it out, break out the Google-Fu, and if that doesn't work, then post over here and people will help you as best they can :] So just pick a game that you would like to make and go from there. Add your own modifications too! My Pong had a "boost" bar that charged up every time you successfully deflected the ball, once it was full you could press spacebar and the ball's velocity would quadruple for a fraction of a second(in whichever direction it was already heading, so yes you could kill yourself haha). Once you have a couple of games under your belt and you feel more solid in your Java, it's time to start looking at libraries. I don't know too much about Java libraries but if you're going to eventually go into 3D, take a look at JOGL, LWJGL, and others that are currently slipping my mind...but yeah just look around/ask around and you shall find them :] Oh and also you should pick up a nice reference book to keep on your desk. I have the Java documentation bookmarked sure, but I always keep my Java for Dummies All in One desk reference. The book has served me wonders for a long time.  Anyway, sorry for the long post. I hope some of what I said has been of use to you, and if not, I'm sure many other people will post useful information. Congratulations again and I wish you the best of luck and most of fun in your gamedev endeavors! -Adrian
  12. KittyPlaysViolin

    [SFML 2.1] Growing Plants

    Hello everyone! it's been a long while since I've posted. I'll keep this topic short and sweet. I just finished C++ at school and decided to start a project. Main game mechanic revolves around growing plants and using them in combat(still have a few ideas on this floating around but that's for another post another day ). I am in the early stages and have decided to represent the plants as rectangles and have them slowly increase their height to grow upwards. I have created a Plant class that inherits from sf::RectangleShape. Plant has width, height, x, and y floats.When I create a new plant it will take a constructor Plant(float w, float h, float x, float y). It will then use setSize(sf::Vector2f(w,h)) for its size and then position itself using setPosition(x,y). As it is, when I change the height of the plant using setSize(), the plant would grow downward. If I were to have the plant grow upward I would have to increase its height while also shifting it down using either setPosition() or move(). This doesn't really seem optimal but I can't really think of any better way of doing this. Another concern is whether the variable growthRate of plants should be handled by a varying multiplier, or "tick". Perhaps better phrased, should I "grow" all the plants at the same time and they vary how much they grow( every 10 seconds plants grow a variable height y), or should I grow all plants a universal height and they vary how often they grow( every plant grows 10px but they each grow every t seconds). Any thoughts? -Adrian EDIT: I was being silly and completely forgot how inheritance worked, solved it quickly, and removed that part. The part pertaining to the actual plant growth still remains though. Sorry! I was too quick to post
  13. KittyPlaysViolin

    OpenGL Setup Issues

    Thanks for your help guys! I'm not very knowledgeable when it comes to compilers and the like, but I was able to do things correctly(finally) on MSVC. This whole library deal is very new to me. I still wasn't able to resolve the problem with Code::Blocks unfortunately :( I will try your suggestions just for curiosity's sake to see if I can fix it, but at least now I have something I can work with. Thanks! -Adrian
  14. KittyPlaysViolin

    OpenGL Setup Issues

    Hello everybody! I finally decided to jump in and start learning some OpenGL. I am using Code::Blocks and the MinGW compiler. I am also using freeGLUT for windowing, as well as GLEW for the handling of extensions. I am running Windows 7 and my AMD HD 6450 has it's drivers all up to date. I believe the problem I am having is specifically with GLEW. The reason I say this is because I was able to open up a window with freeGlut and everything was fine and dandy until I tried adding in GLEW Whenever I try building my project it throws me "undefined reference to ___" errors to several OpenGL functions. The weird part too is for example when it complains about glEnableVertexAttribArray it says: undefined reference to `_imp___glewEnableVertexAttribArray Now I'm not too knowledgeable to these things so I tried exercising my Google-fu. Alas my opponent was too strong and I was soundly defeated. The only possible lead I have is that the GLEW lib is not being recognized because the GLEW binaries are not compiled for MinGW, but only for Visual Studio. Please let me know if you can come up with any solutions, I have been tearing out my hair in frustration at this issue for quite some time now. As some added information I am following these tutorials on OpenGL codewise: http://ogldev.atspace.co.uk/index.html However, I used LazyFoo's tutorials to set up OpenGL on Code::Blocks. Thank you so much for your help! -Adrian  
  15. KittyPlaysViolin

    Impact of Using Outdated Resources

    [quote name='Daaark' timestamp='1357703697' post='5019350'] Python 2.x isn't an outdated standard, it's just an older version. [/quote] Thank you! I didn't think of it that way. I guess the reason why I'm confused is because like in OpenGL, there's a huge difference between the older versions which are now deprecated(fixed function pipeline) vs the programmable pipeline. Python's not my first language so I guess I should be fine just diving in with what I got and adapting to the new stuff as it comes :] Only one other thing though that had piqued my interest. When I was searching around for differences between HTML 4 and HTML 5 and Python 2.x and Python 3 I found a lot of negativity directed towards the newer versions and people saying that the switch would never happen and that it was a bad idea and stuff. Why is this? Is it just because of the amount of the code base that would then become legacy code? As far as I understand it in HTML's case, "switching" to HTML 5 isn't going to affect people who wrote their code in the older standard. But anyway I digress. Thank you very much for your help.I will go ahead and get started on Python.
  • 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!