Page 1 of 2

Looking for advice on programming

Posted: Sat Jul 04, 2009 11:17 pm
by zodiac976
I am 26 years old and I have programmed in C++ for
about 8 months and currently working on an ATM
Simulator, Booklet and Text RPG.

I am just wondering how far in C++ I should be with my
current experience(maybe a list of what I should know
in C++?), if I should be using (SDL, OpenGL, Allegro, etc)
by now and what kind of projects I should be making with
my current experience?

I did take a look at OpenGL and SDL but it looks a little
complicated but I did manage to make my own sprites
move on the screen with DarkGDK but I am not sure if
that is any good compared to SDL and OpenGL. I rather
use the most popular and preferred ones.

If it helps my main goal is to be a game programmer...
one day...:lol:. I am trying to work toward a bachelors
degree in computer science and beyond ;) and nothing
is more satisfying than seeing my program work perfectly
like I wanted or seeing a sprite move :mrgreen:.

By the way, sorry for the dumb questions I guess...:|.

Re: Looking for advice on programming

Posted: Sat Jul 04, 2009 11:59 pm
by eatcomics
I think how much you should know depends on your learning curve, the amount you practice, and whether you've used a scripting language or another language before... The only way to tell would be to come up with a project, if you finish it using mostly what you already know, you're on the right track, if you don't know how to do something figure it out... That way it's a win win situation, you either learn more or you find out you're right were you need to be :mrgreen:

Re: Looking for advice on programming

Posted: Sun Jul 05, 2009 12:56 am
by zodiac976
Well to tell you the truth the 6 months in college in C++ I didn't learn
much. I had a mid-term on making a 100 by 100 array and manipulating
it like rotating, flipping and whatever else you can do with them using
indexes in which I had zero help on and aced it, I guess he saw that I
was trying hard on it.

I also had the final exam which was setting up classes with a menu to
select by which was pretty difficult in my opinion with my experience
at that time. About 1 or 2 weeks after I graduated I sat down and said
I need to make something cause I want to keep doing this cool stuff :).

* I learned more in about 2 months now than in 6 months in college
coming to the forums(my first forum to join) and just sitting down
trying to make something. I do all my programs in console which is
kinda disappointing as I don't think anyone uses that stuff but instead
uses a window application or something.*

So I started an ATM simulator which I think looks stupid. I am redoing
it at the moment and it is going great and doing what I want it to and
my text RPG is going great, I already got the basic structure and first
battle/location(the battle thing is super hard....but it is working like
I want it to so far...) and lastly my booklet which is on hold until I am
done with the ATM simulator.

To sum it up I am disappointed that I am still programming in console
and I find windows programming, SDL and OpenGL weird cause it doesn't
look like the stuff in console. Feels like I am learning another language
over again...I think? DarkGDK worked out okay I had a moving sprite but
details on the functions and stuff is limited so I decided to go back to
console.

Anywho, sorry for the giant wall of text...:lol:.

Re: Looking for advice on programming

Posted: Sun Jul 05, 2009 5:10 am
by thejahooli
If you enough C++ from doing console then I would just go for using SDL. It is not a completely different language, it's just a group of functions and structures that 'talk' to your computers hardware for you. It shouldn't be too hard to use and I would just go for it.

Re: Looking for advice on programming

Posted: Sun Jul 05, 2009 7:17 am
by programmerinprogress
Yeha, I agree with thejahooli to an extent, when I started SDL, however, I had a pretty strong footing of C++ before progressing (although I must admit my knowledge of pointers and references at the time was somewhat negligible)

But if you have aspirations, or need to progress into a graphics/multimedia API, then go for it, theres no point denying yourself the tools if you need to use them, just make sure you understand what you're doing in terms of programming as a whole, if you say you've been doing C++ for as long as you mentioned, then I'm guessing you're pretty clued up anyway ;)

Re: Looking for advice on programming

Posted: Sun Jul 05, 2009 8:52 am
by zodiac976
I could let you see my source for my ATM simulator but I
still need to add a few more functions, tweak it and it's
done..I had to rewrite the whole thing over again but
it's way better this time around.

Re: Looking for advice on programming

Posted: Sun Jul 05, 2009 9:24 am
by programmerinprogress
You don't need me (or anyone else) to tell you that you're ready to move onto some API programming, the only person that knows that is you, if you want to give it a try, then give it a try, if you feel like you understand the principles of programming and you're solving problems off your own back, then you're probably ready, if on the other hand, you're constantly looking at tutorials and quoting them word-for-word in your code, and you don't understand quite what you are doing yet, then an API might be a bit of a stretch.

Just consider that, and then you'll probably realise whether or not you're ready to use an API ;)

Re: Looking for advice on programming

Posted: Sun Jul 05, 2009 10:09 am
by zodiac976
Well, I don't find myself now constantly looking at a tutorial
on how to solve or do something with exception to operator
overloading, advanced stuff like polymorphism for example
and some STL.

My ATM sim, booklet and text RPG are completely made up
through my mind with exception to a couple win32 API functions
that I got help on but I reuse them a lot and also trying to
understand how they work.

The ATM sim is probably not identical to one in a bank, it is
more like one that operates inside the bank on a computer
instead of one like outside where you insert cards and stuff.

I am finding the text RPG a lot of fun, specially the battles it is
kind of weird how I am doing it cause I have no reference to go
by so I am basically making this on how I have experienced an
RPG through consoles, PC, etc.

Re: Looking for advice on programming

Posted: Sun Jul 05, 2009 12:20 pm
by programmerinprogress
I once read an interesting piece of text in a C++ book that used an ATM as an example, it was regarding pointers and passing by reference, the text mentioned how a cash machine wouldn't copy any details from the card to the machine, but rather it would use references to to the memory on the bank card instead, to determine the amount of money available to the user, and any other details.

It would be interesting to see some sort of a 'plug-in' sequence in an ATM simulator, basically the card would be represented by an object, and the machine would take a pointer to that object, and access all of it's members indirectly, as not to copy any data to the machine itself, That was just a passing thought, but if you're making an ATM simulator, you might want to consider how the card interacts with the ATM

Like I said, just a thought :lol:

Re: Looking for advice on programming

Posted: Sun Jul 05, 2009 12:42 pm
by dandymcgee
programmerinprogress wrote:I once read an interesting piece of text in a C++ book that used an ATM as an example, it was regarding pointers and passing by reference, the text mentioned how a cash machine wouldn't copy any details from the card to the machine, but rather it would use references to to the memory on the bank card instead, to determine the amount of money available to the user, and any other details.

It would be interesting to see some sort of a 'plug-in' sequence in an ATM simulator, basically the card would be represented by an object, and the machine would take a pointer to that object, and access all of it's members indirectly, as not to copy any data to the machine itself, That was just a passing thought, but if you're making an ATM simulator, you might want to consider how the card interacts with the ATM

Like I said, just a thought :lol:
I was thinking of making an ATM simulator that uses floppy disks as cards and turning my PC into a bank. Of course the data on the floppy would have to be encrypted and the actual balance stored in some sort of database on the machine. (Imagine if they stored your account balance only on your debit card haha).

Re: Looking for advice on programming

Posted: Sun Jul 05, 2009 12:47 pm
by programmerinprogress
I like the sound of that idea actually ;)

Although I say this like I know what i'm talkig about, but blatantly don't, you could learn a bit of socket programming, and use another machine as a server, the program would use the second computer as it's central server storing bank details (I imagine that's how these things work), the floppy would have to be encrypted as you said, and then the program acts as a facilitator, checking the card is valid before allowing access, and then changing the details on the main server as options are selected.

An ATM has suddenly become a very interesting conversation piece, I never really thought about it before :lol:

Re: Looking for advice on programming

Posted: Sun Jul 05, 2009 1:01 pm
by dandymcgee

Re: Looking for advice on programming

Posted: Sun Jul 05, 2009 2:26 pm
by zodiac976
I basically have my ATM simulator done it just needs some
finishing touches..but anyways I don't think it is something
like you guys are talking about.

Like I said before I am doing this from memory and didn't
bother looking up the details of a real ATM. To give you an
idea it just prompts for an account and password then you
get access to a menu where you can view your balance, make
withdraws, make deposits, and exit the menu, etc.

I have it to continuously loop so it runs forever unless you enter
the exit account/password ;P and also it keeps track of each
session like remembering the last new balance.

EDIT: I wouldn't have any idea how to make my computer interact
with it like sticking in a floppy disk or flash drive like the card
reader does...:(.

Re: Looking for advice on programming

Posted: Sun Jul 05, 2009 4:49 pm
by dandymcgee
zodiac976 wrote: EDIT: I wouldn't have any idea how to make my computer interact
with it like sticking in a floppy disk or flash drive like the card
reader does...:(.
Yeah, I would definitely need to do some research before I could read from/write to a floppy in C++. But now I'm kinda interested how I'd do it...

You should post your ATM when your done with it. ;)

Re: Looking for advice on programming

Posted: Sun Jul 05, 2009 5:57 pm
by programmerinprogress
well you could just use an fstream to a file on the floppy disk right?

AFAIK streams are pretty indescrimiate of what you're reading from/writing too, just as long as you provide the correct information, but saying that, I've never tried it, so I am somewhat speculating :lol:

And @Zodiac, I kinda guessed you were just making the menu system for the ATM, I just got carried away, I could see much potential for demonstrating pointers and referencing memory, whilst simulating the actions of an ATM and a bank card interacting with eachother, even if the applications are somewhat minimal, it would probably be fun to try!