Author Topic: C++ programming  (Read 1300 times)

0 Members and 1 Guest are viewing this topic.

Offline alecz127Topic starter

  • Beginner
  • *
  • Posts: 1
  • Helpful? 0
C++ programming
« on: October 04, 2012, 01:21:49 PM »
Hello everybody!
Brand new to these forums, I usually hang out at the Kongregate forums. Which is a flash game website.
I'm pretty fluent in Actionscript 3.0 you see, and I enjoy making games.

Recently I've wanted to get into C++ to learn robotics programming.
The people on the programming section of the forum I attend are unsure of whether or not C++ can accomplish this and have instead recommended stuff like Arduino. I understand that Arduino is a subset of C, but its really not what I'm looking for. I also do not want to deal with Java if at all possible.
I would greatly appreciate it if the language I used for robotics programming was a language I could use for other purposes such as game programming possibly, and employers would see my knowledge of the language a plus. (see the pun I made?) So I'm hoping I can use C++ to accomplish this.

My goal is to create a cheap scrapbot, the simplest one I could, maybe this is too complicated for a beginner but I'm thinking a small hunk of metal with 4 wheels that moves forward, when encountering a wall, it backs up, turns, and moves forward again, in a loop.

Any and all help is greatly appreciated and I look forward to being a valuable member of this community,

Offline newInRobotics

  • Supreme Robot
  • *****
  • Posts: 1,015
  • Helpful? 48
  • N.I.R.
Re: C++ programming
« Reply #1 on: October 04, 2012, 02:46:35 PM »
If You want to learn C++ and use it for game-making, don't bother with robots and go look for tutorials on DX and OpenGL. Qt is also something to look at.

However, if You want to program microcontrollers just for fun, You don't have to build a robot to achieve it. Buy cheapest ATmega microcontroller You can find on eBay, get cheapest programmer You can get, get some LED's, pack of mixed resistors and potentiometers and prototyping board. Then go to Google ant start looking for: AVR PWM tutorial and AVR ADC tutorial. If You can build LED dimmer regulated by pot and still find it all interesting, carry on and go for a robot project. If You decide that microcontrollers are not something You want to do, You hadn't spent that much money on it  :)

Microcontrollers normally get programmed in C or ASM, there are some nice boards that get programmed in .Net or Java, but these are way more expensive than plain ATmega chip that is programmed using C and AVRstudio IDE. I do not advice going for Arduino, as You will spend a lot of money on it, plus You will most likely be programming using Arduino IDE and Arduino subset of C. Arduinos are boards based on ATmega or ATXmega microcontrollers, so if You learn to program these on their own, You'll be able to program Arduino, but not vice versa :)

Good luck :)
"Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian W

Offline lrmall01

  • Jr. Member
  • **
  • Posts: 38
  • Helpful? 2
Re: C++ programming
« Reply #2 on: October 10, 2012, 08:11:45 PM »
You can also just go grab a C++ compiler like the one from GNU or the Visual Studio Express edition.  It sounds like you can program but perhaps don't know the C syntax so you can get familiar with the language and basic command line programs before spending any cash at all.

Offline greywanderer012345

  • Robot Overlord
  • ****
  • Posts: 133
  • Helpful? 2
Re: C++ programming
« Reply #3 on: October 13, 2012, 08:53:11 PM »
I started out programming in C++. functionx.com is a good site. Also, the book C++ For Dummies is amazingly useful. AVR MCUs, the ones many on this site prefer for robotics, can be programmed with C.

I'm confused that you do not want to learn java for game programming. I've been using C++ for a decade, but I started learning Java because it is much easier to publish java games than those written in C++. I've been programming games for android devices for a while, which uses Java. However, I have heard that Iphone apps are programmed with C++, though I believe you need to buy their libraries and software.


Get Your Ad Here