• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.
Sign in to follow this  
Followers 0
phil67rpg

pong game and opengl

15 posts in this topic

well I want to  post a pong game I am working on, I am almost finished, I wanted to get some feedback on my game. I am using vs 2012 and I am compiling the release version of my game, are there any switches I should use in order for my compiler to put out the release version of my game.

 

0

Share this post


Link to post
Share on other sites

At the top next to your Local Windows Debugger (play button) two to the right it should say Debug, click on this and go Release.
you probably only set to include things (if you include any other libraries) in the Debug mode so you have to reset them for release in your project properties.

0

Share this post


Link to post
Share on other sites

Also, if you can, test that your program runs on another machine than your own (even a virtual machine) before and inform people of what they need to download (any frameworks and so on) if you can't bundle them along. That way you can avoid the predictable 5+ posts of "it doesn't work".

0

Share this post


Link to post
Share on other sites

It doesn't work. More specifically, it still links to a bunch of debug-level DLL's, including msvcp110d.dll, msvcr110d.dll, and so on.. if you're a Visual Studio developer you will have those, but other people certainly won't. What you need to do is:

 

1. ensure you are building everything in release mode

2. if at all possible, link statically to the MSVC libraries (see google, stackoverflow, ..)

3. test yourself that it works on a different computer before providing a download link!!

 

Until you do that, nobody except you and possibly other VS developers here will be able to run your pong game without going dll-hunting.

0

Share this post


Link to post
Share on other sites

[attachment=17479:pongzip.zip]well I tried  this on my laptop and it works except that you have to extract it to a regular folder and I cant get the sound to work also.

1

Share this post


Link to post
Share on other sites

attachicon.gifpongzip.zipwell I tried  this on my laptop and it works except that you have to extract it to a regular folder and I cant get the sound to work also.

 

Works! No sound, it seems to be that the audio library you're using doesn't seem to support wave files with format other than PCM. If I substitute the .wav file with a PCM-encoded audio file, it works fine. Perhaps you can reencode your file to PCM and it should work then (did the sound work on your development machine?)

 

Some feedback:

- the paddle isn't very responsive, to move it quickly we either have to bash the up/down keys (which is slow) or keep them pressed (which has a delay before you start moving). I know this comes from how keystrokes are handled in Windows, because I assume you are relying on the KeyUp/KeyDown events. To make this better, you can try not using the events but instead, in your game loop, checking the keyboard state to see if the up/down arrow keys are pressed or not, and react accordingly.

- there is something wrong with the collision detection at the edge of the paddles, the ball will start spasming inside the paddle instead of bouncing back at an angle, eventually coming back out the same way it entered. We'd have to see the code to diagnose this one.

- the AI is unbeatable.

- after some period of time, everything gets slower (not sure if this intended, but it does make the game easier).

 

Other than that it looks pretty good! Are you going to share the source code as well?

1

Share this post


Link to post
Share on other sites

The other paddle moves at the speed of the ball on the y axis, theoretically making it impossible to even get one point.

0

Share this post


Link to post
Share on other sites
I'm sort of wondering why you didn't just provide the source along with the binary so we could give a better analysis of why things might be broken or ways you can improve your design/literal code.
1

Share this post


Link to post
Share on other sites

It's relatively easy to build a "perfect" computer player for Pong, but a bit more challenging to provide a beatable but fun opponent.  Take a look at how human players typically play the game, and try to add in some of the same behaviours and mistakes.

 

Try the following:

  • When the ball is moving away from the AI paddle, move the paddle back to the centre position.  A real person might overshoot or fall short by a small but randomised amount rather than moving exactly to the centre.
  • When the ball is moving towards the AI paddle a typical human player will try to anticipate where the ball is going and move the paddle there, but will make small mistakes and occasionally mis-predict, especially if the ball is bouncing up and down a lot.  Add in some small random variation to have the paddle overshoot or fall short of the correct position.
  • Have the paddle attempt to correct any errors when the ball is getting close -- a real human player always panics and tries to correct their mistakes once they notice they're in the correct spot.

You can probably improve further on the above method, but it should be a good starting point at a more realistic, less unbeatable computer player. smile.png

0

Share this post


Link to post
Share on other sites

well I tried to get the computer to  move up and down and up on its own again but cant seem to figure it out, could I get a little help on this problem.AI is new to me.

0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0