Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / OOP in Dark GDK

Author
Message
Making a game
16
Years of Service
User Offline
Joined: 9th Jul 2008
Location:
Posted: 18th Aug 2008 18:08
Hi

First and for most thank you to everyone who helps others out, we new people really appreciate it.

I can code in C++ to a good standard, but I have been trying to make an external class in GDK but I cant seem to do it. Can GDK even have eternal classes or does the entire code have to be in one massive class.

If there is no way then I suppose I have to get used to it but if there is can you explain in detail. I understand that perhaps there may be a lot involved so if it would be easier for you can you please direct me to a web site or something specifically for writing classes in GDK.

Thank
Mahoney
16
Years of Service
User Offline
Joined: 14th Apr 2008
Location: The Interwebs
Posted: 18th Aug 2008 19:40
Quote: "I can code in C++ to a good standard, but I have been trying to make an external class in GDK but I cant seem to do it. Can GDK even have eternal classes or does the entire code have to be in one massive class. "


That would be Java or C# that you're talking about. C++ isn't fully Object-Oriented. So, you only make classes if you want to.

Windows Vista Home Premium Intel Pentium Dual-Core 1.6 Ghz 1GB DDR2 RAM GeForce 8600GT Twin Turbo
Lilith
16
Years of Service
User Offline
Joined: 12th Feb 2008
Location: Dallas, TX
Posted: 18th Aug 2008 21:32
I'm not much on 3D stuff but I've created classes for Sprite, Image, Bitmap, Mouse and a couple more things. When I find time I'll work up keyboard and joystick. Essentially you have to encapsulate the GDK functions along with some data pertaining to the sprite/image/bitmap numbers. Some of the functions are a bit interdependent but that's due to the environment they're in.

I could probably zip up the source and make it available along with the caveat that it's not completely tested and I'm having trouble with the animated sprites that I haven't had time to track down.

Lilith, Night Butterfly
I'm not a programmer but I play one in the office
Movian
16
Years of Service
User Offline
Joined: 5th Mar 2008
Location:
Posted: 19th Aug 2008 23:52 Edited at: 19th Aug 2008 23:56
if you want to take the OOP route then i have been trying out Jason P Sage's package

http://code.google.com/p/darkgdkoop/

it really helps with taking the oop aproach. but RE a tutorial on writing classes *googles for a moment*

http://www.cplusplus.com/doc/tutorial/classes.html

there ya go

happy programing

Login to post a reply

Server time is: 2024-09-30 05:23:26
Your offset time is: 2024-09-30 05:23:26