Advertisement Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

102 Neutral

About thestien

  • Rank
  1. thestien

    Repositioning circles on collision

    Hi Maybe you should check for collision if there is move them back so that they are now on the bounds of the collision and then change there velocity that should stop them getting stuck inside each other. oops i think i misread the question. so move the centre of the colliding circle back along the direction of travel -x, -y, by the amount of distance between the two radius of both circles. then handle the colision
  2. thestien

    Unity - Assets and tools to get started

    hi jefferytitan, have you been on the assest store in unity and downloaded all the free bits and pieces on there also the tutorials on the unity website come with some very good assests i found a FPS tutorial but its not listed when i visist the website so maybe google unity 3d FPS tutorial that has a few nice models and stuff. the ones from the asset store and tutorials should be good enough to show people although they may not all be in the same style the can just act as spaceholders until you find the right kind of models you need.
  3. Hi FLeBlanc i wish i was your boss because i would give you a promotion and a payrise thank you for doing that for me you have gone well above the call of duty now its in c++ i can understand your code fully and also use it as a base for future programs i make. i also think im begining to understand the benefits of learning this way over oo. and now i have the fun of learning and expanding on your example im sure it will open up a whole new rabbit hole for me to fall into but at least now i have a map and a candle to find my way out perhaps ill need to learn mapreading also lol Hi Beernutts that looks very cool i will have a good read of it soon it looks very interesting at the moment i think its quite alot of info in one project to wrap my head around but once i finish teething on this examples then i can have a good chew at yours i cant thank you enough and im sure i will be back to call on your knowledge soon
  4. Cor i know one thing Lua is a bit complicated to understand ive read a few basic love2d tutorials and i still struggling to translate your code also i tried to run your script but i must be doing something wrong as it says no code to run, any ideas? Many Thanks again
  5. thank you so much that was a very kind thing to do the first post was more than enough but the second one is truely amazing i think i understand exactly how this works now and will be studing this tread for a while but now i have the tools and the theory to move away from inheritance and focus on components i have looked on google for this kind of example one that is simple enough to understand but shows exactly what is going on i just hope it will help future noobs like me well i know it will. thank you for helping me edit: i have never used Lua and i have been reading a little to try to understand your code it seems like an awesome language i am going to test your code and then try to convert it to c++ but i think i may try to learn Lua one day
  6. Hi FLeBlanc, All i can say is wow!! or perhaps thank you very much i think i will need to re read your reply a few times but that is exactly what i needed. the reason i said pong is because it is a simple game and i have made a version using inheritance but i have been intruiged by components and now i think im really beginning to grasp it. i could see the power of it before but not how to implement it. lots of phrases in your reply i will need to google but this is more than enough for me to get started on designing a component type game well thanks again this has been an amazing response i appreciate your time and effort
  7. hi Kauna thanks for your reply. im really just trying to understand how i would go about using a component system. the problem is i am struggling to find good examples and the ones i do find are a bit complex im sure i half understand it but not quite how to implement it and seeing as pong is a very simple game i figured it would only need a few components and it would be easy to see how it works. so really its just how does component design work and how do i start to make one. my above post isnt an example of my design rather a template to use to show me what component design really is. thanks again for your help
  8. Hi Kelicant i think Lazy Foo tutorials are quite good for beginning game programming. there isnt a specific menu tutorial but he has an article on gamestates that could be quite useful for you. The tutorials use c++ and SDL and are quite simple in the way they are written and at the bottom of every tutorial is the source codes and any needed files. there is also tutorials for setting up SDL to work depending on your operating system and compiler. just search lazyfoo in google should be first one that comes up.
  9. Hi Guys i would like to re-phrase my question into an actual question. #1 do you have any example of a simplest version of a component system in the context of an actual game? i have looked on google and only really seem to find snippets which i dont fully follow. #2 based on my first post am i in the right ball park in terms of how i percieve component based design? #3 do you know any good books or web pages aimed at idiots like me who cannot grasp the concept fully or ones that implement them into a working program. many thanks you help and wisdom is much appreciated
  10. thestien

    DirectX 9 teething problems

    I have had similar problems before i think that maybe your sprite isnt being loaded maybe the path name is wrong or the sprite is in the wrong folder. i think this is where the problem is D3DXCreateTextureFromFile(d3ddev, "arrow.png", &sprite); maybe try to get the code to break at this point if it fails to load then you can see if the sprite is loaded.
  11. Hi Guys n Girls, First of all i am not asking for a detailed coded example i dont care about the specific language or graphics although if you do want to type semi c++ then i could probably understand it a little faster I wouldnt say im dumb but i have been having a bit of trouble grasping the component based code and i think it would help me if you could show me how you would implement this in a simple game like pong or something else quite simple. How i understand components is that say i have classes cMove, cDraw, cCollision ect i then have an cEntity object which takes a pointer to each component i need it to have. so maybe class cEntity { cPosition* coords; cMove* mover; cDraw* drawer; cCollision* collider; } now whether that is right or wrong im not sure but after that i am stuck as to how to implement it do i simply make a container of components and fill it from each type of different cEntity i have so i could end up with. // these are the walls names componentArray[0] = topWall.cPosition; componentArray[1] = bottomWall.cPosition; componentArray[2] = leftWall.cPosition; componentArray[3] = rightWall.cPosition; // and then maybe for (int i = 0; i < totalcomponents; i++) { componentArray->whereIsMyPosition(); } now please dont judge my code style i know it may be difficult to read but it is purley for an example im just wondering if i am on the right track or if i am not could you please show me with a similar example. Many Thanks in advance
  12. thestien

    Include problems

    i am sorry for a trivial response below but i must of posted this as you posted your reply i am at work so i am slowly typing the replies. that is a very complete and concise reply and i can see how it is perfectly correct thank you for your help not only in fixing my problem but in increasing my understanding and helping me to become a better programmer. as now i can have a project that has many files and not every thing crammed in one main.cpp i had come across include guard and pragma once before and tried to use them but now i know how to do it properly i dont think i will have any problems anymore:) well not with #include's thank you for your help it is much appreciated EDIT: To Reply to rip-off the below reply was for Olof Hedman Ah ok cool i will try that later thanks for the help does that mean that i should put global variables in the .cpp globals.h void myFunction(); globals.cpp int myInt; const int myOtherInt = 1; void myfunction() { //do stuff }
  13. thestien

    Include problems

    ok i have reread the first reply and have tried to change all of my names and even tried #pragma once. still no joy though it must be something im doing i mean i know it works as they all include SDL files and they dont conflict. CObject.h #ifndef _OBject_ #define _OBject_ #include "globals.h" #endif CObject.h #include "globals.h" #ifndef _OBject_ #define _OBject_ #endif CObject.h #ifndef OBject_ #define OBject_ #include "globals.h" #endif CObject.h #include "globals.h" #ifndef OBject_ #define OBject_ #endif CObject.h #pragma once #include "globals.h" CObject.h #include "globals.h" #pragma once i have 3 classes a globals.h and a main so i have 4 .h files and 4.cpp files i have tried to change each one as per the above example and each time i still get the multiple definitions i only get problems with the "globals.h" where should i put the includes? the header files for my classes dont need to know about the globals but the .cpp's do. oh i almost forgot i dont know if this will be relevant but my globals.h has both declaration and definitions should i seperate them into a .h and a .cpp? many thanks again
  14. thestien

    Include problems

    hi guys thanks for the replies. i have tried both of these ways but it still gives the same errors i changed _COBJECT_ to COBJECT_ ect. is the problem where i am including them i mean should i include them in the .h or .cpp files? i find that if i dont include it in my main.cpp then i dont get the error( although i get lots of other errors which are caused by not including globals.h) but i need it in main any ideas thanks again guys
  15. Hi Guys, i always seem to get this problem even after searching the web and i feel its time to get closure. i have a few functions that i want several classes to all use. but because all the classes are linked in some way it always says these functions are already defined. -------------------------- globals.h somefunction(); --------------------------- CObject.h #include "globas.h" class CObject { }; ------------------------- CBullet.h #include "CObject.h" #include "globals.h" class CBullet : public CObject { }; --------------------------- CPlayer.h #include "CObject.h" #include "globals.h" class CPlayer : public CObject { }; main.cpp #include "CObject.h" #nclude "CBullet.h" #include "CPlayer,h" #include "globas.h" i can get the inheritance to work but i want the classes to use stuff from the globals like constants and functions . normally i would just stick all the classes and my globals in my main cpp but thats not easy to sort my code out when i have problems or need to change it. many thanks in advance
  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. 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!