Please create an account to participate in the Slashdot moderation system

 



Forgot your password?
typodupeerror
×
Programming Games

Ask Slashdot: How To Find Expertise For Amateur Game Development? 188

New submitter es330td writes "I'd like to write a program that takes the old cannon game to another level, but instead of the path being a simple parabolic arc, the projectile will move through a field of objects exerting gravitational attraction (or repulsion) and the player will have to adjust velocity and angle to find the path through the space between launch point and the target.In an ideal world, this would end up as one of these Flash based web playable games, as that would force me to fully flesh it out, debug and complete the app. I doubt this will ever be commercial, so hiring somebody doesn't make sense, and I wouldn't learn anything that way either. I have been programming for almost 20 years, but the bulk of my work has been in corporate programming, primarily web (Cold Fusion, ASP & C#.Net,) or VB6 and then C# Windows GUI interfaces to RDBMS. I have never written a graphics based game, nor have I ever written something using the physics this will require. Once upon a time, I could program in C but I think I would be much better off to work with someone rather than try to roll my own unless good books exist to flatten the learning curve. Any advice on how to proceed?"
This discussion has been archived. No new comments can be posted.

Ask Slashdot: How To Find Expertise For Amateur Game Development?

Comments Filter:
  • Javascript (Score:4, Informative)

    by Vixe ( 1846608 ) on Friday March 09, 2012 @08:24PM (#39307753)
    If you learn javascript and make it a web-based type deal, you can use something like processing js [ http://processingjs.org/ [processingjs.org] ] to handle the graphics for you.
  • by mangu ( 126918 ) on Friday March 09, 2012 @08:25PM (#39307777)

    Physics simulation of rotation is complicated because you are handling matrices and vectors. Google David Baraff [google.com] for a good reference. Russell Smith's ODE [ode.org] is a good library for this.

  • Too late! (Score:5, Informative)

    by togofspookware ( 464119 ) on Friday March 09, 2012 @08:25PM (#39307785) Homepage

    Angry birds is already doing it [angrybirds.com].

    This is what someone called, uhm, 'emergent ideas', or something. You think of something new only to find out someone else announced the same project a week ago!

  • Stackexchange (Score:5, Informative)

    by Letharion ( 1052990 ) on Friday March 09, 2012 @08:29PM (#39307817)
    http://gamedev.stackexchange.com/ [stackexchange.com] is a great place to ask game development related questions.
  • by Anonymous Coward on Friday March 09, 2012 @08:30PM (#39307829)

    You seem to be an expert programmer, so I'll just point you to the XNA library here [http://msdn.microsoft.com/en-us/library/bb198548.aspx] and let you figure it out from there.

  • Re:20 Years? (Score:2, Informative)

    by gangien ( 151940 ) on Friday March 09, 2012 @08:31PM (#39307851) Homepage

    Haven't interviewed a few people with 'decades of experience', that is not surprising. I just interviewed a guy with 15 years of experience that couldn't tell me how a hash table works. But he certainly new a lot of buzzwords.

  • Re:Too late! (Score:5, Informative)

    by pjt33 ( 739471 ) on Friday March 09, 2012 @08:34PM (#39307887)

    I did it three years ago as an entry for the Java4k Game Contest: Gravitational Fourks [java4k.com]. And my inspiration was a game I played on the Acorn Archimedes in the early 90s.

  • first small step... (Score:4, Informative)

    by Tastecicles ( 1153671 ) on Friday March 09, 2012 @08:35PM (#39307899)

    have a look at this [newtondynamics.com].

  • Re:Stackexchange (Score:5, Informative)

    by Anonymous Coward on Friday March 09, 2012 @08:36PM (#39307915)

    I'm currently a student studying game programming, and http://www.gamedev.net/ has been a godsend. The forums are by far the best I've found. There is a Help Wanted section, and it varies in how serious or deadlined the projects are, so that could be a good place to find a potential partner.

    If you're familiar with C#, look into XNA. The framework is built in C#, it's free and its projects can be run on PC/XBOX Indie/Windows Phone. Other options would be Flash or the Unity engine (can run in browsers, scripted with C# or Javascript).

    I like your idea, could be a fun casual game.

  • html5 (Score:4, Informative)

    by gr7 ( 933549 ) on Friday March 09, 2012 @08:39PM (#39307945)

    Read about the canvas element. You should be able to write the whole thing in javascript. You should be able to get an extremely basic version up and running within a few hours. Just play around a bit in javascript and read about <canvas>. The physics is trivial - you store the x,y vx,vy value of everything that is moving (velocity x,y). You add vx to x every cycle through your loop. You adjust vy by gravity through every cycle. Also known as ay. And you also adjust vx,vy by every gravitational point nearby. You calculate the distance sqrt((x1-x2)^2+(y1-y2)^2 ) to each object and use gravity formula which is realted to 1/distance squared so you can get rid of that sqrt and make the code more efficient. Then find the portion of accel that is due to x and y. Anyway, it's just a few hours work. Just give it a shot - don't read any books - just find an html primer website that talks about <canvas>.

  • Physics, etc (Score:5, Informative)

    by Dan East ( 318230 ) on Friday March 09, 2012 @08:56PM (#39308091) Journal

    Well, you can look at existing physics engines, like Box2D, but it won't do what you want by default. Games of the type you're talking about simulate motion in discrete steps - usually once per frame. However, you can also decouple your motion (physics) from the rendering, but you usually only need to do that for very precise physics simulations that need to be reproducible time after time (when you decouple physics then the physics engine can always run at some fixed time interval, like 1/60th of a second, which is how realistic physics engine like Box2D function best).

    Essentially you have a simulation going, in which each object has a position in floating point precision. Each frame you calculate the duration of the previous frame in milliseconds, then you move all your objects the appropriate amount over that discrete time step. So if your frame is 10 milliseconds, and an object has an X velocity of 1 unit per second, then you increment its X value .01 units. The next frame might take twice as long to render at 20 milliseconds (maybe you have more objects, or some other multitasking app used some CPU time) so you have to move your objects twice as far - .02 units. The math is very simple. Then after moving all the objects you render them into screen space.

    As for the attractors / repulsors, you also store a velocity value for each moving object. Then each frame you calculate the distance to each attractor / repulsor, and modify the velocity based on the strength of the attractor / repulsor attenuated by (divided by ) its distance from your object. You can make it as simple or complex as you'd like. You can factor in mass, use linear or exponential repulsive effects, etc. Now if you start getting into collision detection and resolution, then things can get very complex if you're dealing with objects more complex than circles or really, really fast moving objects. For example, say you have a bullet traveling really fast, and it is heading towards a thin barrier (wall). One frame the bullet could be on one side of the barrier, and the next frame it moved so far that it is on the other side. In other words, there wasn't a frame in which the bullet was exactly in contact with the barrier. Those things can get complex to simulate, and it gets even worse when both objects are moving at the same time.

    The key thing is grasping the concept of discrete time steps, and moving objects a variable distance each frame depending on how long the previous frame took to render. You can't just hardcode the game to run at, say, 1/60th a second, because if it is running on a slower device than you tested on, or if the device is multitasking and can't spend as much processing time on your app, then things will seem to run in slow motion and be herky-jerky. The other key thing is the idea that the positions of your objects do not (and should not) correspond directly to screen coordinates. Say your world is 100x100 units. Well, when you render it, you simply scale it so that the 100 is the width of the display (if you're using something like OpenGL to do your drawing, then you just set the matrix scale appropriately). So the "real" position of the objects, and all that simulation, occurs at some arbitrary coordinate system, and then is scaled appropriately when the objects are drawn.

    As for languages, personally I recommend C++ and use OpenGL ES for rendering. Then the vast majority of your code can be used on Android, iOS, Windows, Linux, OSX, etc, but is not conducive to web-based like Flash or Java.

  • Re:Stackexchange (Score:5, Informative)

    by The Optimizer ( 14168 ) on Friday March 09, 2012 @09:10PM (#39308223)

    Mod parents up. I've been making games professionally for over 15 years, and I was going to mention both of those sites.

    My general advice, when asked, "How do I learn to make games" is to 1) Look around online as there are communities and resources all over, and 2) Just start making something, anything. Do it rather than talk about it. Start with something small - an early Atari 2600-class game project - and expand as you become comfortable and more knowledgeable and experienced.

"May your future be limited only by your dreams." -- Christa McAuliffe

Working...