ROM Hack I'd like a crash course in C++...

Rydian

Resident Furvert™
Member
Joined
Feb 4, 2010
Messages
27,880
Trophies
0
Age
36
Location
Cave Entrance, Watching Cyan Write Letters
Website
rydian.net
XP
9,111
Country
United States
Inunah said:
That hour spent on HTML has taught me enough HTML to move along.
tongue.gif
No it didn't, it didn't teach you any actual programming.

Inunah said:
I don't like Javascript.
tongue.gif
It's too complicated for what it's worth.It's an actual programming language, unlike HTML (which is a markup language).

If programming was easy and didn't take time and effort, people wouldn't make a living doing it.
Driving a car is easy.
Building a car is hard.
Using a microwave is easy.
Building a microwave is hard.
Using a fridge is easy.
Building a fridge is hard.

Let's take my signature for example.

It takes a quote and displays it. Simple enough thing, right?

How many lines of code do you think that takes? Tell me.


EDIT: I'm too lazy to wait for you, so I'll just post it here, minus comments.

CODE

And that's just to display my signature. Making something even slightly interactive for the NDS is going to be a lot harder.
 

Tricky Upgrade

Active Member
Newcomer
Joined
Aug 14, 2010
Messages
27
Trophies
0
Age
31
Location
Mozambique
Website
Visit site
XP
170
Country
Mozambique
Inunah said:
Tricky Upgrade said:
Inunah said:
Tricky Upgrade said:
Inunah said:
Well, I can't take any C++ courses since I haven't found a college in the area that has any of that.

I read Chapter 0. I went to Chapter 1. I didn't understand Chapter 1. I went back to Chapter 0. I kept reading it over and over. I never understood.

I can't buy books because I'm so poor I can't afford $1.

I don't understand why there would be 1-10 on each line.

I can't start making a million worthless programs until I figure out how to use C++.

Argh, C looks like the scripting language for RMVX. I tried to learn that once but it was so complicated all I managed was learning what a script looked like and that it required { and }.

Tried looking at howstuffworks.... But I'm stuck. It's too complicated. I don't understand how to use half the shit.

And I don't like PDF files because half the time they refuse to open on my comp.





...Sorry it took me so long to respond. I was trying to system restore a computer that kept restarting endlessly for the rest of the night.

If you find C++ hard to learn, maybe you should give up on it and try learning another language, like C# or JAVA.
Are either of those any easier and could be used to make .nds homebrew?

Well... they are easier to learn, if you dedicate yourself. I thought you could only make nds homebrews with C, isn't it?
Shit, dedication don't do nothin' for me. I almost didn't graduate, even though I was dedicating myself to schoolwork.

I'm afraid you will have to work hard if you want to learn programming, specially C++...
But anyways, here is a book I used when I was learning: Ivor Horton's Beginning Visual C++ 2008. Just google it
 

MusashiExtra

Member
Newcomer
Joined
Aug 14, 2007
Messages
9
Trophies
0
XP
69
Country
Canada
Learning a first language is difficult. Especially if it's something like C++, which, though effective, is not very high level and user friendly. Try learning Python first. It's a lot easier to take in. After you have the basics of object oriented programming down, start going back to C++.

Anyways, programming is not something like sports, where you can learn the rules in half an hour and start playing right away. Programming is more like learning a language ('cause you are learning a language). If you took Chinese all of a sudden, can you speak it in half an hour? One hour? You can take the whole week and not learn enough to have a conversation. If you work at it for a few months, though, you'll start understanding the basics of the language and be able to manipulate it to get your desired result.

To start, try looking at some simple program. Learn what each line does. Play around with the code.
 

Phoenix Goddess

The Ninja's Protégée
Member
Joined
Apr 25, 2009
Messages
3,799
Trophies
0
Age
110
Location
Away from civilization.
XP
799
Country
United States
Inunah said:
Shit, dedication don't do nothin' for me. I almost didn't graduate, even though I was dedicating myself to schoolwork.

You're trying to sprint before you can even roll over to learn how to crawl.

And without dedication, you won't get absolutely anywhere cause you don't have any dedication to learn.

Patience is a must have when it comes to programming.
 

bugubugu

Member
Newcomer
Joined
Aug 26, 2010
Messages
9
Trophies
0
XP
1
Country
Canada
macgeek417 said:
May I reccomend Teach Yourself C++ in 21 Days? Google it, you'll find like 9001 copies of it =P
from what i've looked at in this book, i don't think it can live up to its namesake. it's a comprehensive tutorial, but it's fairly accelerated, which might not be great for a beginner...
I would strongly recommend starting with C# (since it will work on any windows computer [which is good if you're having computer trouble] and is practically the same as Java, syntax-wise). it's far more intuitive than C++, and you will definitely get a fairly strong gist of object oriented programming.
As for really getting programming into your head, then doing a million programs really is the only way. However, it would probably be better to do things related to math, as programming really is just applied math...
write a program to find prime numbers, calculate factorials, calculate square roots, etc.
with that, you should understand if statements, while loops, for loops, declaring variables and their use and all that. those are the real basics of programming.
once you know those, and once you know what a method is, and once you know what a class is and how to call them, then you're pretty much in a position to learn, emphasis on LEARN, anything about programming. Object-oriented programming at least, but that's mostly all you need to care about.
C++ is C with classes, when you get right down to it, and C is Assembly but prettier looking, and assembly is full of confusing things which force you to count things on your fingers and toes.

you should probably read about a few languages first, take a look at code snippets and pick the one that's easiest to understand for you. just remember that once you understand one language, it should definitely be easy to learn another, so naturally, it's easier to start easy and work your way up. regardless, pick object oriented programming languages, since LISP won't help you at all in making homebrew.
i understand that it's a long and tedious process, but programming is a very useful skill in life, considering how often we use computers, and the ability to write your own programs actually opens hundreds of doors within them, all leading to oodles and oodles of fun. and sleepless nights and dreams of angry compilers.
 

JonthanD

Well-Known Member
Member
Joined
Jul 9, 2010
Messages
279
Trophies
0
Age
50
Location
Sitting
XP
221
Country
United States
Best advice for C++ is to read the entire book with out stopping.... do not worry if it makes no sense just keep reading and making notes in your mind. After you do that find and read source code, lots of source code. Go back to the book read it again.... then back to the source code.... write a hello world ap and some other simple aps.

You can find tons of online things to teach you C++ for free, using GCC or Visual Studio (lite?) anyway thats a good start...

For DS homebrew you could also take a look at this http://devkitpro.org/ a lot of homebrew is written using that. (Including my current favorite DS game.... Powder. So hard but fun)
 

cracker

Nyah!
Member
Joined
Aug 24, 2005
Messages
3,619
Trophies
1
XP
2,213
Country
United States
Inunah said:
Well, I can't take any C++ courses since I haven't found a college in the area that has any of that.

I read Chapter 0. I went to Chapter 1. I didn't understand Chapter 1. I went back to Chapter 0. I kept reading it over and over. I never understood.

I can't buy books because I'm so poor I can't afford $1.

I don't understand why there would be 1-10 on each line.

I can't start making a million worthless programs until I figure out how to use C++.

Argh, C looks like the scripting language for RMVX. I tried to learn that once but it was so complicated all I managed was learning what a script looked like and that it required { and }.

Tried looking at howstuffworks.... But I'm stuck. It's too complicated. I don't understand how to use half the shit.

And I don't like PDF files because half the time they refuse to open on my comp.





...Sorry it took me so long to respond. I was trying to system restore a computer that kept restarting endlessly for the rest of the night.

You should probably start with LUA since you can use it for DS homebrew and it isn't as stress-inducing as c/++ can be. Be forewarned that it is a scripted language which means you won't get anywhere near the abilities of controlling the system manually and it will be much slower as it is interpreted on the fly. Simple Pong, Breakout type games can be made quickly and it might encourage you more to learn c/++ to improve the quality of your game.
 

Inunah

The Female Mistaken for a Male.
OP
Banned
Joined
Sep 14, 2009
Messages
2,678
Trophies
0
Location
USA
Website
inuscreepystuff.blogspot.com
XP
258
Country
United States
cracker said:
You should probably start with LUA since you can use it for DS homebrew and it isn't as stress-inducing as c/++ can be. Be forewarned that it is a scripted language which means you won't get anywhere near the abilities of controlling the system manually and it will be much slower as it is interpreted on the fly. Simple Pong, Breakout type games can be made quickly and it might encourage you more to learn c/++ to improve the quality of your game.


I'll try learning this like I did with C++, but I give no guarantees since I've already given up ever learning a programming language...
 

insanepotato

Well-Known Member
Newcomer
Joined
Aug 1, 2009
Messages
53
Trophies
0
Location
broady
Website
numbat.cs.rmit.edu.au
XP
42
Country
May i ask, which part of chapter 1 did you not understand? perhaps we can clarify it for you.
Sometimes, if you have a good clear foundation, the rest will be cake =]

btw, for me. i learnt to use batch files in a few hours. Then javascript/html in a weekend. Then c++, using Sams Teach Your self C++ in 21 days. I read this book over the course of 8months. after that i read numerous other books on C++. im still learning, but its because i enjoy programming.

If programming isn't something you enjoy doing, it may be harder for you start, since you'll have to froce yourself. Have you tried using DS Game maker?
 

Inunah

The Female Mistaken for a Male.
OP
Banned
Joined
Sep 14, 2009
Messages
2,678
Trophies
0
Location
USA
Website
inuscreepystuff.blogspot.com
XP
258
Country
United States
insanepotato said:
May i ask, which part of chapter 1 did you not understand? perhaps we can clarify it for you.
Sometimes, if you have a good clear foundation, the rest will be cake =]

btw, for me. i learnt to use batch files in a few hours. Then javascript/html in a weekend. Then c++, using Sams Teach Your self C++ in 21 days. I read this book over the course of 8months. after that i read numerous other books on C++. im still learning, but its because i enjoy programming.

If programming isn't something you enjoy doing, it may be harder for you start, since you'll have to froce yourself. Have you tried using DS Game maker?

All of chapter 1. And 0. I understand some of it, but then there's like a 90% misunderstanding.

O.o

I tried using DS Game Maker, but apparently with the free ver you can't use music. Plus, even with the tutorial I couldn't figure out how to make text appear letter by letter quickly.... I didn't like it, since it also added a startup screen that said DS Game maker, which I don't want on my game/app.
 

cracker

Nyah!
Member
Joined
Aug 24, 2005
Messages
3,619
Trophies
1
XP
2,213
Country
United States
First off just let me say that I don't want to sound like an ass here and don't want to dissuade you from programming if you truly do want to learn..

It sounds like you are very easily frustrated and prone to giving up too quickly on programming. Programming requires a lot of patience and tinkering/debugging/etc to figure things out. It also requires at least a basic understanding of math (the complexity depends on what exactly you are going to be making of course).

If you are truly wanting to create homebrew games/apps of your own then you WILL need to suck it up and try to focus on the tutorials, source code, online snippets, etc rather than on your pessimistic view of failing at programming. I totally understand the intimidation that learning c/++ gives a person that is new to programming and will admit I took the easy road with BASIC then-come VB until I sucked it up myself and started programming almost explicitly in c/++.

In short... If you want it bad enough then you will be able to stick with it until you understand it and find the help you need online where need-be.
 

Phoenix Goddess

The Ninja's Protégée
Member
Joined
Apr 25, 2009
Messages
3,799
Trophies
0
Age
110
Location
Away from civilization.
XP
799
Country
United States
cracker said:
First off just let me say that I don't want to sound like an ass here and don't want to dissuade you from programming if you truly do want to learn..

It sounds like you are very easily frustrated and prone to giving up too quickly on programming. Programming requires a lot of patience and tinkering/debugging/etc to figure things out. It also requires at least a basic understanding of math (the complexity depends on what exactly you are going to be making of course).

If you are truly wanting to create homebrew games/apps of your own then you WILL need to suck it up and try to focus on the tutorials, source code, online snippets, etc rather than on your pessimistic view of failing at programming. I totally understand the intimidation that learning c/++ gives a person that is new to programming and will admit I took the easy road with BASIC then-come VB until I sucked it up myself and started programming almost explicitly in c/++.

In short... If you want it bad enough then you will be able to stick with it until you understand it and find the help you need online where need-be.

This is the best advice given to anyone who wants to learn programming, took the words right from me.
 

Overlord Nadrian

Banned!
Banned
Joined
Jul 28, 2008
Messages
6,647
Trophies
0
Age
30
Location
Riviera
XP
158
Country
Belgium
Yeah, pretty much what cracker said. You won't ever be able to create something nice if you can't cope with making many mistakes (in the beginning, but even if you've already got the skills you're still prone to make a mistake or two). Start off with creating something very basic [eg a Pong clone, after that perhaps something like Tetris (which looks simple but is harder than you'd think)], after you've done that, always take your skills a bit further by experimenting with what you can and can't do, and eventually, you'll be able to create that homebrew app/game you wanted.

It's all about trial and error.
 

cracker

Nyah!
Member
Joined
Aug 24, 2005
Messages
3,619
Trophies
1
XP
2,213
Country
United States
I forgot to add (Overloard Nadrian reminded me) that for me the best approach was to getting someone's source code for a complete project and editing minor parts of it to see how it affected it. This lets you learn at the same time as you feel you are accomplishing something to give you a boost to continue on your quest...
 

Phoenix Goddess

The Ninja's Protégée
Member
Joined
Apr 25, 2009
Messages
3,799
Trophies
0
Age
110
Location
Away from civilization.
XP
799
Country
United States
cracker said:
I forgot to add (Overloard Nadrian reminded me) that for me the best approach was to getting someone's source code for a complete project and editing minor parts of it to see how it affected it. This lets you learn at the same time as you feel you are accomplishing something to give you a boost to continue on your quest...

That's definitely what helped me learn C#.
 

mrfatso

That guy!!
Member
Joined
Apr 17, 2008
Messages
4,932
Trophies
0
Age
33
Location
@Your Home,behind the sofa
Website
Visit site
XP
251
Country
Senegal
Overlord Nadrian said:
Yeah, pretty much what cracker said. You won't ever be able to create something nice if you can't cope with making many mistakes (in the beginning, but even if you've already got the skills you're still prone to make a mistake or two). Start off with creating something very basic [eg a Pong clone, after that perhaps something like Tetris (which looks simple but is harder than you'd think)], after you've done that, always take your skills a bit further by experimenting with what you can and can't do, and eventually, you'll be able to create that homebrew app/game you wanted.

It's all about trial and error.

for me, i took it one step below, and just play around with coding a calculator and some simple programs and when i am done, i will do my best to crash my program, it was how i learn of those little mistakes that we, programmers often make.

Just like in the case of a calculator, i forgotten to include cases if the user were to divide by zero haha.

Anyway, like they say, there isnt really a crash course in c++, u will have to take your time and learn it the long way, play around with source codes.
Just take your time and look at each line and figure out what does this line do(this was what i did, and i try changing the values to figure out what might happened).

If you are one of those just keep up too easily, find something to keep you motivated, use a timetable, maybe plan

today, i will have a main function, tomorrow i will have my user input and output, tomorrow after tomorrow, i will have addition as a function.

Break your task down and it will be easier
smile.gif


Also, constantly practice, if not, look at me, 2 months of not praticisng c++ and i think i forgotten 40-60% of them
frown.gif
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    Sonic Angel Knight @ Sonic Angel Knight: :ninja: