The Daily Click ::. Forums ::. Misc Chat ::. Guys i think you should use C++
 

Post Reply  Post Oekaki 
 

Posted By Message

A.C. softwareŠ



Registered
  21/07/2002
Points
  60
12th March, 2004 at 10:31:25 -

haha oooooohhhhhh woops...*DUH*....ok thanks buster

 
help!, i've fallen and i cant ge....hey, nice carpet!

AndyUK

Mascot Maniac

Registered
  01/08/2002
Points
  14448

Game of the Week WinnerSecond GOTW AwardHas Donated, Thank You!VIP Member
12th March, 2004 at 10:53:00 -

I do know 'c++', well 'c' anyway
learnt it a college along with other languages

html
javascript
pascal
forth
assembly
and a little bit of delphi (i think its called that)

and still have all the workbooks and stuff.

yet i choose to use tgf to make games. Its way quicker and easier and less frustrating.
i mean do you want to spend half of your time trying to figure out why the program you've spent an hour on wont even start. and then find out its ONE spelling mistake in 5000 words?

 
.

Kris

Possibly Insane

Registered
  17/05/2002
Points
  2017
12th March, 2004 at 11:45:57 -

"i agree that Cpp is great and all, but i also know how damned hard it can be to get multiple instances of an object"

--------------------
struct object {
int field1, field;
}
object object1;
object object2;
--------------------

there. looks easy to me


Or, if you like,

----------------------
struct object {
int field1,field2;
}
object * obj1 = new object;
object * obj2 = new object;
----------------------

Image Edited by the Author.

 
"Say you're hanging from a huge cliff at the top of mt. everest and a guy comes along and says he'll save you, and proceeds to throw religious pamphlets at you while simultaniously giving a sermon." - Dustin G

Kris

Possibly Insane

Registered
  17/05/2002
Points
  2017
12th March, 2004 at 12:41:08 -

also, dog, i think allegro is faster than SDL (for me anyway. maybe i was doing something wrong, maybe not)

http://www.allegro.cc

 
"Say you're hanging from a huge cliff at the top of mt. everest and a guy comes along and says he'll save you, and proceeds to throw religious pamphlets at you while simultaniously giving a sermon." - Dustin G

Stephen [NeonairGames]

Crazy?

Registered
  24/07/2002
Points
  4521

Game of the Week WinnerVIP Member
12th March, 2004 at 12:51:08 -

Isn't "struct from C?
C++ uses classes.
Here's a theoretical class that can be used for sprites.

Class Sprite
{
public:
Sprite(int startX, int startY, int spritetype)
{
X=startX;
Y=startY;
type=spritetype;
}
~Sprite()
{
}

int X;
int Y;
int valA;
int valB;
int valC;
int valD;
//...all other MMF alterable values....
bool flag1;
bool falg2;
//....more flags.....
int Type;
bool Visible;
// sprite image thing getter here(I don't know how to call images in C++)

void Draw(int hotspotX, int hotspotY)
{
if(Visible)
{
//whatever code is used to render a sprite's image
}
}
//all other properties of a sprite object...
}

I need to find a book that actually tells how to program graphics...

 
http://www.neonairgames.net

Kris

Possibly Insane

Registered
  17/05/2002
Points
  2017
12th March, 2004 at 13:12:33 -

structs and classes are almost identical. the only difference is that members of structs are public by default

If you wanna draw graphics, you need an API. There are two main choices: GDI (slow, but doesn't need a graphics card) or DirectX (for games). SDL and Allegro are both wrappers for DirectX, so you need to get either one of them (Or you could just code in DirectX, but... just don't go there)

Image Edited by the Author.

 
"Say you're hanging from a huge cliff at the top of mt. everest and a guy comes along and says he'll save you, and proceeds to throw religious pamphlets at you while simultaniously giving a sermon." - Dustin G

ChrisB

Crazy?

Registered
  16/08/2002
Points
  5457
12th March, 2004 at 20:17:32 -

<ubergeek>

Kris: Classes give you functions, and you can also use base classes to make different classes with the same function names but work differently. Where do you think C++ got its OOP from?

It's not like iterating through loads of object instances is hard - use a for loop...

I'm coding in DirectX, and I'm also programming ATL. I might just get a gun and shoot various Windows API programmers.

</ubergeek>

 
n/a

Stephen [NeonairGames]

Crazy?

Registered
  24/07/2002
Points
  4521

Game of the Week WinnerVIP Member
12th March, 2004 at 21:12:05 -

I read an entire long chapter dedicated to static member functions, and I was left confused. Now I read the short tutorial on static functions, and now I know exactly what they are. Arg! Why can't the books on C++ get to the point?!

 
http://www.neonairgames.net

Gaspy Conana



Registered
  12/10/2003
Points
  571
12th March, 2004 at 23:33:38 -

HTML isn't a programming language.

 
http://www.digitalwasteland.net

Mr Icekirby



Registered
  18/12/2003
Points
  846
13th March, 2004 at 00:11:40 -

html is an internet explorer complatible browser type recognition code, basicly limited to a web page... now i could learn C++ but i won't being as im terribly lazy... mmf is easy, anyone ever hack mmfusion.exe though? it sounds illegal... you can 'edit' it though on one computer, according to the lisence agreement thingy

 
Mr Icekirby says so!
OBEY ME!

Kris

Possibly Insane

Registered
  17/05/2002
Points
  2017
13th March, 2004 at 08:29:27 -

chris, you can have functions in structs as well. dunno about all that base stuff (I dont bother with it) but i'm sure structs can have them too

 
"Say you're hanging from a huge cliff at the top of mt. everest and a guy comes along and says he'll save you, and proceeds to throw religious pamphlets at you while simultaniously giving a sermon." - Dustin G
   

Post Reply



 



Advertisement

Worth A Click