Advertisement

Hi, i'm new, and i'm learning DirectX

Started by November 22, 2002 09:45 PM
4 comments, last by Drakex 21 years, 11 months ago
hi since i have a 56k connection i can''t download the DirectX SDK on my own really, unless i put it on overnight, which i don''t really trust to stay on all night with my crappy connection :D so i''m having my dad download it at work where he had a T1 line and a CD burner.. anyway i kind of know C++, not bad for someone who''s only read 1 old book on C++ programming (i mean it was written so long ago it talks about computers having 1MB of ram lol) and only MSDN, which is by no means a beginner''s reference manual! well i''ve been looking at some of the tutorials on the beginners section of this site and it doesn''t look TOO bad. so once i get the SDK (probably monday) i''ll start using some of it and i''ll see if i can figure this stuff out. i have no problems with most of the basic concepts in C++ like pointers, classes, polymorphism etc. i just need to figure out how to apply them all to games, which i kind of already have (in my head anyway). well here''s a little about myself: i''m not exactly new to programming or computers, i''ve been using computers my whole life and i know a lot about how they work and whatnot. i''m a hardcore nerd, you might say anyway i''ve programmed mostly in some QB and VB, i tend to like basic syntax a bit more than C syntax but C is OK i guess. i''ve tried to teach myself C for a while now, probably a year or 2, off and on (more off than on, haha). i just figured out how to do file access today and wrote a few functions to simplify the process, including one which writes/reads classes (of which i''m particularly proud :D ). but i just have one question to ask about C++: why are C++ programmers lazy when it comes to typing things out? i mean really, CLK_TCK? would it kill you to write out CLOCK_TICK? :D thought of the day.
_______________________________________________________________________Hoo-rah.
Well, when you''re writing a few hundred lines of code, CLOCK_TICK is ok, but when you''re writing thousands of lines the few keystokes you save by writing CLK_TCK helps alot............or you could be like me and are just lazy in general.

It is coming...8 years in the making and It is finally coming...

-Beavt8r
It is coming...10 years in the making and It is finally coming-Beavt8r...
Advertisement
quote:
It is coming...8 years in the making and It is finally coming...

what? Star wars Galaxies?

sorry, i couldn''t resist.

i have no problems with most of the basic concepts in C++ like pointers, classes, polymorphism etc


These are BASIC concepts???

Great, if you understand things that well, you''ll have no problem writing games. In fact, could you explain to me about how to use a function pointer to access members of classes?

Thanks!

RM.

------------------------------------------------------------
Yes. it''''s true, I DO wield the ugly stick. And I see I have beaten you with it before!
------------------------------------------------------------Yes. it''s true, I DO wield the ugly stick. And I see I have beaten you with it before!
well yeah they're basic haha i'm a nerd

well i finally get the SDK today, yaay :D

anyway here's function pointer stuff.

(i think this is what you mean, hehe)

well just include iostream.h and conio.h for this example. and use a console application.

first you have a class with some functions like this (these are just dummy functions):

class Person{public:   Person() : NumFuncs(2) {};   ~Person();   void Func1() { cout << "Function 1" << endl; };   void Func2() { cout << "Function 2" << endl; };   static int NumFuncs; // this is kind of a workaround you'll see later...};   


i'm too lazy to type more now, in main, you do this:

void main(){   Person Bob;   // this is an array of pointers to Person functions   //notice we're using the "Bob.NumFuncs" as a workaround   void (Person::*PersonFunctions) () [Bob.NumFuncs]= { Person::Func1, Person::Func2};   for(int i=0; i;   while(!kbhit());}   


kind of a bad example and you wouldn't code it like this in real life, but you get the idea.

i hope this is what you meant, hehe.

(and i also hope that i'm remembering this stuff correctly lol)

[edited by - Drakex on November 25, 2002 5:18:47 PM]
_______________________________________________________________________Hoo-rah.
quote: Original post by Ritual Magic

i have no problems with most of the basic concepts in C++ like pointers, classes, polymorphism etc


These are BASIC concepts???

Great, if you understand things that well, you''ll have no problem writing games. In fact, could you explain to me about how to use a function pointer to access members of classes?

Thanks!

RM.

------------------------------------------------------------
Yes. it''s true, I DO wield the ugly stick. And I see I have beaten you with it before!



Would you consider someone a c++ programmer without knowing those things? I wouldn''t. I would call someone who doesn''t know them a beginner, or a student.

I think it is the things beyond that which make a person an advanced programmer.
[Piebert Entertainment] [Ask The All-Knowing Oracle A Question]------------------------------------------------------------GDSFUBY GameDev Society For UnBanning YodaTheCodaIf you want to see yoda unbanned then put this in your sig ------------------------------------------------------------DAIAGA Dave Astle is a God Association. To join, put this in your sig!Founder and High Priest of DAIAGA[edited by - YodaTheCoda on December 10, 2003 1:57:54 PM]

This topic is closed to new replies.

Advertisement