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 / Do you use object orientation?

Author
Message
RPDan
17
Years of Service
User Offline
Joined: 29th Apr 2007
Location:
Posted: 14th Sep 2007 23:33
I have decided to add some file types, such as .db3d, which can be loaded to create, for eaxample, a fully initialized 3d object with one command. .db3d stands for DarkBasic 3d. It contains an object, animations to append to the object, effects etc.
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 14th Sep 2007 23:53
RPDan
17
Years of Service
User Offline
Joined: 29th Apr 2007
Location:
Posted: 15th Sep 2007 00:00
It is better than hardcoding, and it should make it easier than loading data from files yourself. Also, it doesn't make use of the dbFile commands - it uses fscanf etc. Here is an example file.

jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 15th Sep 2007 01:18
Good idea - using fscanf.

I wrote a pretty fast block read algorythm - even a Random access one - doesn't get faster than that - I WISH I could port to C++ ...I guess I could but I'd rather get on to some game stuff sooner than later - but you know how that goes... can't start a GREAT GAME built on junk. I really think I'll have to do at least some FILE/IO with tokenizing and stuff - I have T.Ed (Terrain generator/editor) for example and that has a text file format not totally unlike what you just posted about. It's pretty involved but accounts for the camera ranger, the scale, the sky box, 3d objects, 3d sprites, plains, instances versus regular models etc... even allows simple animations like for making swaying trees and brush... pretty neat - but I need to make sure I have a "engine" or "system" to be able to "WYSIWYG" levels in the editor and then be able to load them in the game and have them look the same. I have a demo that does it but the frame rates suck (Is DBPro) but it's pretty high poly - and I need more things - so I still have a quandry in front of me.

jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 15th Sep 2007 23:55
Ok - I've read some seriously different opinions on C++, Standard Library, Best Practices in my travels now. BTW - I'm for using the Standard Library but choose not to for learning reasons (Want to try hand at fairly raw pure C++ for awhile. Can always migrate if my class blow chunks later. I really like the idea of the Standard Libraries "Concept" paradigm.

This is PRO Standard Library and is a good read aimed at us - almost specifically http://www.gamedev.net/reference/programming/features/modcpp/

The other link I was reading I can't find now - (Sorry) but it talked about how operator overloading redefines the core functionality and is frowned upon in some circles because a programmer can not just read a line of code and be certain what is going on without searching out the source code for operator overloading.

This has some merit - but could just be whining. Regardless - FOR now - my first stab at this - I've chosen to go without "operator overloading" except where it may already be implemented in a library I use and there isn't a choice in the matter.

I also (As much as I like em) am not messing with properties either because in C++ they are kinda bloated (and full of operator overloading) regardless if you use the various "Templates" or the code based version of it. Even if it compiles to tight code - the set up is kind of labor intensive if you write straight C++, and if you use a "template" you really don't know what's going on unless you dig deep. That is MUCH more work then I'm personally willing to do. As it is I've switched to DarkGDK about 2 or 3 weeks ago (like jumped into C++ and DarkGdk whole heartedly) and I'm still not really into the "Game" yet (Iron Infantry) I'm getting there - but...

I AM learning alot regardless. If it wasn't for IanM I would know what I do know about std::string, vector, list, queue and other things. I would have found them eventually - but its nice when someone here knows the landscape and can get you steered to the right things quickly.

RPDan
17
Years of Service
User Offline
Joined: 29th Apr 2007
Location:
Posted: 22nd Sep 2007 23:16
For me, the dbSaveBitmap command doesn't work. Does it work for anyone here? It isn't in the documentation.
Dark Lord
19
Years of Service
User Offline
Joined: 19th Aug 2005
Location: Australia
Posted: 30th Sep 2007 05:28
I'm not really proficient enough to program ID generators but I like to use some simple classes.

I've got a really simple position struct that i use in most projects which i prefer over defining separate x, y, z variables for objects
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 30th Sep 2007 17:57
@Dark Lord - Any reason you're using doubles? In DarkGDK C++ - I've noticed mostly floats and integers. Do you get a benefit using the doubles?

Login to post a reply

Server time is: 2024-11-19 16:35:18
Your offset time is: 2024-11-19 16:35:18