Jump to content
  • Advertisement
Sign in to follow this  
KittyPlaysViolin

New to site! Need help with programming please

This topic is 2773 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello! I am new to this forum, and pretty much to game programming and development. A while ago I played around with ActionScript, but seeing as Windows Vista hates my Macromedia Flash MX 2004 and I don't have the money to shell out for the current Flash, I switched over to Java and C++. I am fairly new to these languages although so far I can do some basic tasks such as display text, receive user input, create variables, work with classes and objects, basic arithmetic and logical operators, if-else, do and while loops, switch statements, and other things. The problem is I don't really know what I need to learn in order for game programming, and I don't know how to go about it. I would really appreciate if I could get some feedback on what a good "path" (no pun) to follow would be. Right now I'm pretty partial to C++, but I like how with Java I know how to create graphics, as where with C++ I am not sure, but I believe I need a separate library for that? (Please correct me wherever I'm wrong). Again thank you for all your help, and just to introduce myself my name is Adrian :] it's a pleasure to meet you all.

P.S (Who likes Minecraft? :] )

Share this post


Link to post
Share on other sites
Advertisement

Hello! I am new to this forum, and pretty much to game programming and development. A while ago I played around with ActionScript, but seeing as Windows Vista hates my Macromedia Flash MX 2004 and I don't have the money to shell out for the current Flash, I switched over to Java and C++.


You can easily develop in Flash for free using FlashDevelop!

I am fairly new to these languages although so far I can do some basic tasks such as display text, receive user input, create variables, work with classes and objects, basic arithmetic and logical operators, if-else, do and while loops, switch statements, and other things. The problem is I don't really know what I need to learn in order for game programming, and I don't know how to go about it. I would really appreciate if I could get some feedback on what a good "path" (no pun) to follow would be. Right now I'm pretty partial to C++, but I like how with Java I know how to create graphics, as where with C++ I am not sure, but I believe I need a separate library for that? (Please correct me wherever I'm wrong). Again thank you for all your help, and just to introduce myself my name is Adrian :] it's a pleasure to meet you all.

P.S (Who likes Minecraft? :] )


Basically this is the part where you need to think, learning syntax and features of a programming language is all pretty easy however taking that and solving a problem, which in this case is a game, is the part that requires a lot of actual thinking. So choose a programming language and then choose a simple game to make, like Pong, and then break it down:

What does Pong need?
  • It needs a menu containing a Play and Exit button. Maybe a Tutorial button if you add some crazy new game play element.
  • It needs the actual game, where an AI will control one paddle and the player the other to hit a ball that bounces off the side of the screens, trying to get it past the AI and score a point. It also needs a pause and a way to exit the game.
    From here you already know you will have two game states which are menu and game, you could also have a third: pause but simple simple, from there you break down each of these states into smaller chunks of what they need.

    What does a menu need?
    • It needs a way to display buttons
    • It needs a way to click on buttons
    • It needs 2 or 3 buttons
    • It needs to be able to exit the game when the exit button is clicked
    • It needs to be able to move to the actual game when the play button is clicked
    • It may also need a background image.
      What does the actual game need?
      • It needs a way to display and keep track of points
      • It needs an AI that will control a paddle
      • It needs input that will control the OTHER paddle
      • It needs input that will pause the game
      • It needs collision between ball and paddle.
      • It needs collision between ball and screen bounds.
      • It needs input that will exit the game.
      • it needs a way to display both paddles and the ball.
        Then from there you choose a state and break any of the problems you have difficulty with into smaller problems!

        Yeah C++ you will need to use SFML or SDL to do 2D graphics, I would say stick with Java or AS3.

        Nice to meet you as well Adrian, Minecraft is great! :) But don't procrastinate by playing it!

Share this post


Link to post
Share on other sites
Thank you! I've been starting off slowly on C++ by trying to do some simple text based games. I noticed there were a lot of parallels between Java and C++ so I think I'll be switching back and forth to make sure I learn them both equally. Something I've been confused about though, is how I would go about making say monsters. I know I have to make a monster group that gives properties to all monsters like they all have an attack,def and hp stat, but I also want to be able to make different monsters with different levels of each stat. I wasn't sure if I had to make a new class for each monster or something, or if I could somehow make objects out of a big monster class. I'm kind of shy into entering GUI programming because I think I should get a good grasp of basics before moving on to something more intensive. =] Thank you for your reply! Sorry if I'm asking a lot of questions, I really want to make sure I understand everything.
-Adrian

P.S some of my long-term goals are to make:
Current-
A simple text based game like Pokemon
Sooner-
A game like the old SNES Zelda.
A game possibly like Golden Sun or any of the Chrono series.
Later-
A simple 3d adventure game in a escape-the-room style.

Share this post


Link to post
Share on other sites

Thank you! I've been starting off slowly on C++ by trying to do some simple text based games.


This is an excellent idea.

Something I've been confused about though, is how I would go about making say monsters. I know I have to make a monster group that gives properties to all monsters like they all have an attack,def and hp stat, but I also want to be able to make different monsters with different levels of each stat. I wasn't sure if I had to make a new class for each monster or something, or if I could somehow make objects out of a big monster class.


Well you have a lot of options, but this is what I would do

Have a MonsterCreator class that can read from file all the information for all monsters and keep it linked to a string which is the monsters name, then whenever you want to create one you just call:

Monster aMonster = monsterCreator.CreateMonster("SuperBat");

HOWEVER if you want monsters with different behaviours you would want to extend from Monster or have an Action interface that you can extend from and create 'Actions' with, you could then include what actions a monster can use and what level they can learn an action in the file (Which a monster could keep in it's class), linking up to an 'action name to action map' similar to the MonsterCreator class.

I'm kind of shy into entering GUI programming because I think I should get a good grasp of basics before moving on to something more intensive. =] Thank you for your reply! Sorry if I'm asking a lot of questions, I really want to make sure I understand everything.
-Adrian


This is a good move. No problems :) ALWAYS ask questions.



Share this post


Link to post
Share on other sites
Sign in to follow this  

  • 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!