Jump to content
  • Advertisement

MotorBully

Member
  • Content Count

    21
  • Joined

  • Last visited

Community Reputation

144 Neutral

About MotorBully

  • Rank
    Member
  1. [sup]Using your brain and Viewing the requiring of the players can greatly lead you to creat a fun and enjoyable game !!Friends[/sup]!
  2. MotorBully

    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.
  3. MotorBully

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

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

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

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

    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#include <iostream.h> void main() { int m = 3 ,n =2,i,j; int **data = new int*[m]; for(i=0;i<m;i++) { data = new int[n]; } for(i =0;i<m;i++) { for(j= 0;j<n;j++) { data[j] = i*j; } } for(i=0;i<m;i++) { for(j=0;j<n;j++) { cout<<"data["<<i<<"]["<<j<<"]="<<data[j]<<"\n"; } } then ,i want to add a line to the "array"(a array) and give the number to this line which is m = m+1; for(i=0;j<n;j++) { data[m][j]=(m+2)*j; } Is that adding "m += 1" to the code right?
  9. MotorBully

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

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

    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 //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; 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 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); } 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. MotorBully

    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]
  14. MotorBully

    collision code

    It looks like PhysicsEngine in game,about the collision detection. [color=#282828][font=helvetica, arial, verdana, tahoma, sans-serif]Last month,[/font] [color=#282828][font=helvetica, arial, verdana, tahoma, sans-serif]I had the same problem as you .Now,i still not solve this problem,i think that it surely not easy.[/font] [color=#282828][font=helvetica, arial, verdana, tahoma, sans-serif]If the thing is ball,you can use my code.[/font] [color=#282828][font=helvetica, arial, verdana, tahoma, sans-serif]I'm not sure this will help you a lot.But ,we are in the same problem ,i'm very happy to share that.[/font] [color=#282828][font=helvetica, arial, verdana, tahoma, sans-serif]This code use the ActionScript in Adobe Flash.[/font] There are two balls,one called ball,the other is balll.(not the same). 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); } } 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.
  15. MotorBully

    I'm new hear,help me in C language(not C++)

    Wow!So quickly,Very Thanks!"getchar()",good idea ! getchar() can catch the charactor,but what the thing like "?#$%@",i don't sure of that.Is there any function can judge it in uniform. oh!I have solved the problem ,they are all from ASCALL,,using the char collision to sure a range. example char a; ...... if(a<='9'&&a>='0') { return true; } else false;
  • 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!