• Advertisement


  • Content count

  • Joined

  • Last visited

Community Reputation

144 Neutral

About MotorBully

  • Rank
  1. [size=4][sup]Using your brain and Viewing the requiring of the players can greatly lead you to creat a fun and enjoyable game !!Friends[/sup][/size]!
  2. Best way of learning C++?

    Doing the c++ programming exercises everyday is surely boring!!!!once you learn a chapter , you should try to find some interesting problems and use the c++ to solve it, this will make you to be interested in C++ and also develope your thinking,your speed of study will going throw the roof.[img]http://public.gamedev.net//public/style_emoticons/default/biggrin.png[/img]
  3. How to get started?

    "C++Primer" is pretty good.Although the Author is sometimes wordy,it's surely detailed and careful.C++ can be used to the large game programming for it's fast operation efficiency.Jave is easy to write and learn,but i think it's suitable to the mobile phone game.You know whatever SDK or language you like,the game programming is the same.If you are in command of one language , another will be easily to learn.
  4. How to get started?

    I suggest that you should read the book which called "Windows Game Programming Gurus".It includes many skills of how to make a whole PC game such as 2D and 3D technology,sound inserting and so on.The DirectX is surely the first selection you should conside .If you decide to make the game ,you must stick to it.
  5. How to add a line to the two dimensional array?

    "vector"!That's a good method ,i have already forgot it.I should spend some times learning it again.
  6. How to add a line to the two dimensional array?

    Thanks, "i"is sure a small accident,but it is not the main problem,i still not find a correct method to add a line to this dynamic array.The old method is worse.
  7. How to add a line to the two dimensional array?

    I try to compile that and run the program, but the program always fail to work.,why could be that?
  8. The question is the same as topic.Here is the first code[code]#include <iostream.h> void main() { int m = 3 ,n =2,i,j; int **data = new int*[m]; for(i=0;i<m;i++) { data[i] = new int[n]; } for(i =0;i<m;i++) { for(j= 0;j<n;j++) { data[i][j] = i*j; } } for(i=0;i<m;i++) { for(j=0;j<n;j++) { cout<<"data["<<i<<"]["<<j<<"]="<<data[i][j]<<"\n"; } }[/code] then ,i want to add a line to the "array"(a array) and give the number to this line which is [code] m = m+1; for(i=0;j<n;j++) { data[m][j]=(m+2)*j; }[/code] Is that adding "m += 1" to the code right?
  9. 2D vs 3D and some other newbie questions

    Yeah,Satharis's word was quite right.To be a modest person,and you will get a wide road to walk on. But if you have nothing special , i suggest you ?learn more.When you make some good friend who is good at what you sign,you can try it.
  10. What to choose?

    XNA must be your choice if you haven't got enough time.But, if you both love to make game by pure code and have got enough time to study ,I think C++ and DirectX are the best choice.
  11. Basic game phyics problem

    First,you must be sure that there has no problem in your code.The key is your algorithm.If your want to make a Physics Class game,your have to think about the Range Problem,you cannot let your dog jump or fly too fast to show it within the scene.The friends on top of me mentioned Direction Problem,but he hadn't solve the problem that the dog fly too fast or breaking of gravity and so on.I can give you a current idea,here is my code [code]//This is the unreal code if(the dog.y >= ceiling) { the dog.y = ceiling +- the dog.height; the dog.v -= the dog.v; } //and you can according to this concept,add wall or floor; [/code] How to deal with the gravity,the gravity is closely linked to the floor. If the dog fall to floor,dog cannot fall under the floor ,so you must add some code to that.The gravity must be remove,and the dog's place must be on the floor when it's under floor. I haven't got any related code in my computer,but you can refer to my concept.
  12. Collision Detection is very important to the Flash! Now , i have been making a game about basketball,but there is a big skill problem blocked my game development which is about the collision detection algorithm of two balls. I have defined the name "ball" and "balll".They are all from Ball Class.Ball Class have got the Attribute ,such as ball.vx,ball.vy,ball.radius,ball.v; Here is my code [code] sina = (ball.y - balll.y)/(ball.radius + balll.radius); cosa = (ball.x - balll.x)/(ball.radius + balll.radius); distance = Math.sqrt((ball.x - balll.x)*(ball.x - balll.x) +(ball.y - balll.y)*(ball.y - balll.y)); if (distance <= (ball.radius +balll.radius)) { v = Math.sqrt(ball.vx * balll.vx + ball.vy * balll.vy); ball.x = balll.x+cosa*(ball.radius+balll.radius); ball.y = balll.y+sina*(ball.radius+balll.radius); ball.vy *= 0.8; ball.vx *= 0.4; ball.vx = (v * cosa); ball.vy = (v * sina); balll.vx = -(v * cosa); balll.vy = -(v * sina); }[/code] Now , if the speed of ball is so fast , two ball will l overlapped together and they will not move or move slowly.How can i solve this problem?
  13. Useful links

    Good, The heaven for beginners!
  14. collision code

    Sorry,I think i [color=#000000][font=Arial]give an irrelevant answer,and add a new question.But they are looked same.You can refer to it or ignore it.[/font][/color]
  15. collision code

    It looks like PhysicsEngine in game,about the [left]collision detection.[/left] [left][color=#282828][font=helvetica, arial, verdana, tahoma, sans-serif][size=3]Last month,[/size][/font][/color][/left] [left][color=#282828][font=helvetica, arial, verdana, tahoma, sans-serif][size=3]I had the same problem as you .Now,i still not solve this problem,i think that it surely not easy.[/size][/font][/color][/left] [left][color=#282828][font=helvetica, arial, verdana, tahoma, sans-serif][size=3]If the thing is ball,you can use my code.[/size][/font][/color][/left] [left][color=#282828][font=helvetica, arial, verdana, tahoma, sans-serif][size=3]I'm not sure this will help you a lot.But ,we are in the same problem ,i'm very happy to share that.[/size][/font][/color][/left] [left][color=#282828][font=helvetica, arial, verdana, tahoma, sans-serif][size=3]This code use the ActionScript in Adobe Flash.[/size][/font][/color][/left] There are two balls,one called ball,the other is balll.(not the same). [code]function onEnterFrame(e:Event) { ball.y += ball.vy; ball.x += ball.vx; balll.x += balll.vx; balll.y += balll.vy; sina = (ball.y - balll.y)/(ball.radius + balll.radius); //their sin corner and cos corner (Rectangle Function) cosa = (ball.x - balll.x)/(ball.radius + balll.radius); distance = Math.sqrt((ball.x - balll.x)*(ball.x - balll.x) +(ball.y - balll.y)*(ball.y - balll.y)); //this is the distance between two balls if (distance <= ball.radius +balll.radius) { double v; v = Math.sqrt(ball.vx * balll.vx + ball.vy * balll.vy); ball.vx = (v * cosa); ball.vy = (v * sina); balll.vx = -(v * cosa); balll.vy = -(v * sina); } }[/code] My problem is that if two balls overlap,the ball will not move , i can't find a good formula to not not let them overlap when "distance == ball.radius+balll.radius", My idea is if (distance <= ball.radius +balll.radius) { Remove two ball to the position where they crash.//it will be seen that they are not overlap . ......... } But i cannot do it!It is still a question.
  • Advertisement