Powered by Invision Power Board

 
  Pages: (10) « First ... 3 4 [5] 6 7 ... Last » ( Go to first unread post ) Reply to this topicStart new topicStart Poll

> Giygas learns the art of C++
United States
Giygas
Posted: Sep 27 2009, 05:35 PM
Quote Post


Standard Member
[*]

Group Icon
Group: Members
Posts: 910
Member No.: 4767
Joined: 24-November 07

Status: (0d) [--]


After finding that Data Structures are very useful ( and very easy ) to use, I have moved onto my next concept- Which just happens to be an expanded version of Data Structures, the Class. Yay!
PMEmail Poster
Top
United States
Giygas
Posted: Sep 28 2009, 04:54 PM
Quote Post


Standard Member
[*]

Group Icon
Group: Members
Posts: 910
Member No.: 4767
Joined: 24-November 07

Status: (0d) [--]


I found the best way for me to use and abuse classes to learn about them, by using them in a very short, 3-5 room text adventure game. It's going well so far!
user posted image
It actually works better than I though. Originally, I thought I was going to have to write out commands that checks if you wrote "examine pencil" or "take paper" as a whole, but later realised that having it check for take, examine or use as the first word and then the second word being the object you interact with works better, and was easy. Actually, I figured it out by mistake, but whatever.
PMEmail Poster
Top
Unspecified
Lightning
Posted: Sep 28 2009, 05:10 PM
Quote Post


Ignorance isn't stupidity but choosing to remain ignorant is
[*][*]

Group Icon
Group: IRC Operators
Posts: 6381
Member No.: 583
Joined: 31-August 04

Status: (0d) [--]


gj


--------------------
click here to change my avatar. / gosh why are you even here lightning
hacker, n.an individual who enjoys learning computer system details and how to capitalize on his or her capabilities...not a criminal.
(from webster's new world hacker dictionary)
fedora linux 10
Fedora 10 Final!

Download today!
quality web comics (stories):
  1. girl genius: adventure! romance! mad science!
  2. punch an' pie: try a slice of life, then swallow.
  3. dresden codak: most interesting comic ever
quality web comics (one-shots):
  1. a softer world: truth and beauty bombs
  2. smbc: saturday morning breakfast cereal
  3. buttersafe: pictures and probably some words
"Religion is comparable to a childhood neurosis." - Sigmund Freud
“It is not by delusion, however exalted, that mankind can prosper, but only by unswerving courage in the pursuit of truth.” - Bertrand Russell
“To kill an error is as good a service as, and sometimes better than, the establishing of a new truth or fact.” - Charles Darwin
PMUsers WebsiteMSN
Top
United States
Eugonner1990
Posted: Sep 28 2009, 06:21 PM
Quote Post


Kagamine Rin ftw!!


Group Icon
Group: Members
Posts: 32
Member No.: 6414
Joined: 27-July 09

Status: (0d) [--]


great job ^^ a very inspirational topic imo. you're learning so fast too!

i took two C++ classes in college, so if you need some help then I will try to help you as best as i can =)


--------------------
~Eugonner
PMEmail Poster
Top
United States
Giygas
Posted: Sep 29 2009, 06:19 PM
Quote Post


Standard Member
[*]

Group Icon
Group: Members
Posts: 910
Member No.: 4767
Joined: 24-November 07

Status: (0d) [--]


QUOTE (Eugonner1990 @ Sep 28 2009, 06:21 PM)
great job ^^ a very inspirational topic imo. you're learning so fast too!

i took two C++ classes in college, so if you need some help then I will try to help you as best as i can =)

Thank you, and thank you Lightning. You have been quite helpful!

On the topic of that little 3 room adventure game, i'm almost done. I just need to add some extra lines of text ( For when you do things other than what you need to do ) and it'll be mostly done, unless I find some gay bug in the process...
It's a pretty small game, with about 4 rooms actually. All you do is:
take pencil; take paper; go east; use pencil&paper; go west; use paper; go north; use keycard
Then you're pretty much done. However, i'm proud of it, and it's my first "bigger" C++ 'game' with about 256 lines of code right now.
Any suggestions on what to tackle next in terms of what to learn?
PMEmail Poster
Top
United States
RetroXYZ
Posted: Sep 29 2009, 07:53 PM
Quote Post


Standard Member
[*][*]

Group Icon
Group: Members
Posts: 2714
Member No.: 4325
Joined: 27-August 07

Status: (0d) [--]


Something you may want to look into is vectors. Vectors are essentially arrays with no limit:
http://www.cplusplus.com/reference/stl/vector/

In case you didn't know, strings are vectors. std::string is a vector for char.
PMEmail PosterMSN
Top
United States
Giygas
Posted: Oct 14 2009, 04:57 PM
Quote Post


Standard Member
[*]

Group Icon
Group: Members
Posts: 910
Member No.: 4767
Joined: 24-November 07

Status: (0d) [--]


Back on the trail and heading towards Dynamic Memory.
I actually remember being annoyed at how I couldn't do something like that in game maker and it made it seem really limited.
:s
PMEmail Poster
Top
Unspecified
WWakerFAN
Posted: Oct 14 2009, 05:21 PM
Quote Post


Standard Member


Group Icon
Group: Members
Posts: 13
Member No.: 4650
Joined: 2-November 07

Status: (0d) [--]


QUOTE (RetroXYZ @ Sep 30 2009, 10:53 AM)
Something you may want to look into is vectors. Vectors are essentially arrays with no limit:
http://www.cplusplus.com/reference/stl/vector/

In case you didn't know, strings are vectors. std::string is a vector for char.

Keep in mind that you should choose the structure that's best for the job, a vector provides is quick for accessing a particular object, but adding objects quickly is slow because it needs to resize the array it stores internally when it becomes to small to fit those elements. A linked list is slow for accessing a particular element as you need to irritate threw each element until you get to the one you want, but adding elements is fast because each element has a pointer to the next element and so on and so forth.
PMEmail Poster
Top
United States
Giygas
Posted: Oct 14 2009, 07:48 PM
Quote Post


Standard Member
[*]

Group Icon
Group: Members
Posts: 910
Member No.: 4767
Joined: 24-November 07

Status: (0d) [--]


So I finally found a good use for arrays. \o/

user posted image
Tic Tac Toe :O

Really lazy right now, maybe i'll change the 1's and 0's to X's and O's, but I really need to find a goo way to do AI.
Right now, the AI just checks if 1 is marked yet, then 2, then 3, and marks the first one thats not marked. Pretty much impossible to lose... Got to find a good way that will make your tricks not work every time, but also not make it impossible.

I actually had to check some uh... "Inspiration" C++ videos, like some games people made and showed off with it. It really helps knowing that eventually, I could do something like that. :3
PMEmail Poster
Top
United States
RetroXYZ
Posted: Oct 14 2009, 08:19 PM
Quote Post


Standard Member
[*][*]

Group Icon
Group: Members
Posts: 2714
Member No.: 4325
Joined: 27-August 07

Status: (0d) [--]


Considering you're well accomplished at this point, you should probably check out SFML. It's extremely easy to use, and great for 2D graphics and sounds and stuff. It even supports networking and HTTP.

I'm assuming you're using Code::Blocks, yes? It will work with any compiler, although I found C::B to be the easiest for Windows.

This post has been edited by RetroXYZ on Oct 14 2009, 08:20 PM
PMEmail PosterMSN
Top
United States
Giygas
Posted: Oct 14 2009, 08:33 PM
Quote Post


Standard Member
[*]

Group Icon
Group: Members
Posts: 910
Member No.: 4767
Joined: 24-November 07

Status: (0d) [--]


QUOTE (RetroXYZ @ Oct 14 2009, 08:19 PM)
Code::Blocks

Not really :c
PMEmail Poster
Top
United States
RetroXYZ
Posted: Oct 14 2009, 08:43 PM
Quote Post


Standard Member
[*][*]

Group Icon
Group: Members
Posts: 2714
Member No.: 4325
Joined: 27-August 07

Status: (0d) [--]


QUOTE (Giygas @ Oct 14 2009, 09:33 PM)
Not really :c

Then, what are you using? :/

Dev-C++? Visual Studio?
PMEmail PosterMSN
Top
United States
Giygas
Posted: Oct 14 2009, 09:06 PM
Quote Post


Standard Member
[*]

Group Icon
Group: Members
Posts: 910
Member No.: 4767
Joined: 24-November 07

Status: (0d) [--]


QUOTE (RetroXYZ @ Oct 14 2009, 08:43 PM)
Then, what are you using? :/

Dev-C++? Visual Studio?

Dev C++ :o
PMEmail Poster
Top
United States
Bacteriophage
Posted: Oct 14 2009, 09:32 PM
Quote Post


injustice anywhere is a threat to justice everywhere
[*][*][*][*][*]
[*][*][*][*][*]
[*][*][KFC]

Group Icon
Group: Members
Posts: 10716
Member No.: 2411
Joined: 31-July 06

Status: (0d) [--]


code-blocks is so bamf


--------------------
PMEmail PosterUsers WebsiteAOLMSN
Top
United States
OniLink10
Posted: Oct 14 2009, 10:01 PM
Quote Post


C++ Programmer, Unofficial Physicist, and Unofficial Chemist
[*][*]

Group Icon
Group: Members
Posts: 3920
Member No.: 4907
Joined: 19-February 08

Status: (0d) [--]


QUOTE (Giygas @ Oct 14 2009, 07:06 PM)
Dev C++ :o

Dev-C++ is a little outdated. I would consider upgrading to something more recent such as Visual Studio(What? OniLink suggesting Proprietary Software?!) or Code::Blocks.

SFML is a great tool. It uses OpenGL, which will move all(or most) graphical functions to the Graphics Card, significantly improving performance for those with a Graphics Card. This also allows great additions to your games such as Pixel Shaders, which are little programs for your Graphics Card to manipulate the screen and add cool effects.


--------------------
QUOTE (Xgoff @ Sep 10 2009 @ 06:11 PM)
did you try hello's engine

make sure to not ****ing change anything before using it!
PMEmail PosterUsers WebsiteYahoo
Top
Unspecified
Lightning
Posted: Oct 14 2009, 10:31 PM
Quote Post


Ignorance isn't stupidity but choosing to remain ignorant is
[*][*]

Group Icon
Group: IRC Operators
Posts: 6381
Member No.: 583
Joined: 31-August 04

Status: (0d) [--]


I'd recommend against Visual Studio


--------------------
click here to change my avatar. / gosh why are you even here lightning
hacker, n.an individual who enjoys learning computer system details and how to capitalize on his or her capabilities...not a criminal.
(from webster's new world hacker dictionary)
fedora linux 10
Fedora 10 Final!

Download today!
quality web comics (stories):
  1. girl genius: adventure! romance! mad science!
  2. punch an' pie: try a slice of life, then swallow.
  3. dresden codak: most interesting comic ever
quality web comics (one-shots):
  1. a softer world: truth and beauty bombs
  2. smbc: saturday morning breakfast cereal
  3. buttersafe: pictures and probably some words
"Religion is comparable to a childhood neurosis." - Sigmund Freud
“It is not by delusion, however exalted, that mankind can prosper, but only by unswerving courage in the pursuit of truth.” - Bertrand Russell
“To kill an error is as good a service as, and sometimes better than, the establishing of a new truth or fact.” - Charles Darwin
PMUsers WebsiteMSN
Top
United States
Retriever II
Posted: Oct 14 2009, 10:51 PM
Quote Post


Catalyst
[H][*][*][*][*]
[*][*][*][*][*]


Group Icon
Group: Members
Posts: 18290
Member No.: 52
Joined: 13-October 03

Status: (0d) [--]


If your plan is to only write software for Windows (which isn't a good plan in general), I think Visual Studio is unbeatable as an IDE.

I use Eclipse CDT as a cross-platform IDE. It's usable, but it doesn't really stack up to Visual Studio. I can't recommend Code::Blocks considering it hasn't seen an official release since I tried it last fall and it was broken in several ways. Your mileage may vary.


--------------------

PMEmail PosterUsers WebsiteICQAOLMSN
Top
United States
OniLink10
Posted: Oct 14 2009, 10:52 PM
Quote Post


C++ Programmer, Unofficial Physicist, and Unofficial Chemist
[*][*]

Group Icon
Group: Members
Posts: 3920
Member No.: 4907
Joined: 19-February 08

Status: (0d) [--]


QUOTE (Lightning @ Oct 14 2009, 08:31 PM)
I'd recommend against Visual Studio

I only recommend it because most software development companies use it, and it wouldn't hurt to know the Interface.


--------------------
QUOTE (Xgoff @ Sep 10 2009 @ 06:11 PM)
did you try hello's engine

make sure to not ****ing change anything before using it!
PMEmail PosterUsers WebsiteYahoo
Top
United States
Nightwing
Posted: Oct 14 2009, 11:33 PM
Quote Post


GUNS - LOTS OF GUNS
[*][*][*]

Group Icon
Group: Members
Posts: 5396
Member No.: 455
Joined: 2-June 04

Status: (0d) [--]


It's important that if you want to be a coder that you push yourself to work on this stuff whenever you have a free moment, always try to do the stuff you're not sure you can figure out and you can be great. Also, when you have a decent (academic) grasp of it, you should open up Unreal Engine 3 or some other game engine and mess with their scripting tools, see if the code doesn't confuse you, it likely will actually appear legible


--------------------
user posted image
PMEmail Poster
Top
Unspecified
Lightning
Posted: Oct 15 2009, 04:39 AM
Quote Post


Ignorance isn't stupidity but choosing to remain ignorant is
[*][*]

Group Icon
Group: IRC Operators
Posts: 6381
Member No.: 583
Joined: 31-August 04

Status: (0d) [--]


at the very least, the compilers MSVC uses aren't very good, and underneath it all that's what actually matters


--------------------
click here to change my avatar. / gosh why are you even here lightning
hacker, n.an individual who enjoys learning computer system details and how to capitalize on his or her capabilities...not a criminal.
(from webster's new world hacker dictionary)
fedora linux 10
Fedora 10 Final!

Download today!
quality web comics (stories):
  1. girl genius: adventure! romance! mad science!
  2. punch an' pie: try a slice of life, then swallow.
  3. dresden codak: most interesting comic ever
quality web comics (one-shots):
  1. a softer world: truth and beauty bombs
  2. smbc: saturday morning breakfast cereal
  3. buttersafe: pictures and probably some words
"Religion is comparable to a childhood neurosis." - Sigmund Freud
“It is not by delusion, however exalted, that mankind can prosper, but only by unswerving courage in the pursuit of truth.” - Bertrand Russell
“To kill an error is as good a service as, and sometimes better than, the establishing of a new truth or fact.” - Charles Darwin
PMUsers WebsiteMSN
Top
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

  Topic Options Topic Options Pages: (10) « First ... 3 4 [5] 6 7 ... Last » Reply to this topicStart new topicStart Poll

 




[ Script Execution time: 0.0834 ]   [ 13 queries used ]   [ GZIP Enabled ]   [ Server Load: 1.15 ]