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: 2nd Sep 2007 19:41
I was just wondering, since DarkGDK is not object orientated, how many of you actually have classes for DarkGDK?
CattleRustler
Retired Moderator
21
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 2nd Sep 2007 20:45
kBessa wrote an OOP kit for DGDK.NET called Light Engine which "classes" the underlying engine components. I dont know if anyone did something similar for the c++ version of the dgdk.

My DBP plugins page is now hosted [href]here[/href]
RPDan
17
Years of Service
User Offline
Joined: 29th Apr 2007
Location:
Posted: 2nd Sep 2007 21:52
I'm doing an OO library for the c++ GDK for personal use. Would anyone be interested if I released this?
Try
20
Years of Service
User Offline
Joined: 16th Aug 2004
Location:
Posted: 3rd Sep 2007 07:48 Edited at: 3rd Sep 2007 07:51
Yes, why not?

Cheers,
-Try
RPDan
17
Years of Service
User Offline
Joined: 29th Apr 2007
Location:
Posted: 4th Sep 2007 00:06
OK. I've done some classes for sounds. All the functions are there (I think), but I haven't implemented a lot of the error messages yet. Please comment on the way the classes are set up.
I haven't had time to do any documentation, so I'll just write some examples here and note large differences.

Create a new project. Add darksound.h, darkStrings.h and include.h to your project. On all your code files include include.h . On the VC++ menu go to Project->Properties->Linker->Input. Add darksound.obj and darkStrings.obj to additional dependencies. Your project should now be setup.

Loading a music file:


This loads mp4.mp3 and then plays it. If mp4.mp3 does not exist, an exception is raised.

Loading from CD:


This loads track 7 from a CD, and loops it. If there are not 7 tracks on the CD, an exception is raised.



This example does the same as the above, but if there are not enough tracks on the CD it says which track was requested and how many are on the disc.

Attachments

Login to view attachments
kBessa
18
Years of Service
User Offline
Joined: 8th Nov 2006
Location: Manaus, Amazonas, Brazil
Posted: 4th Sep 2007 01:01
I really liked that you added exceptions. That's one thing I've been wanting to add to LightEngine but am still waiting before it's fully functional and documented (by now, I mean, after v0.5 is released).

The only thing I disliked is that you've used a lot of classes only for a music, and I think that's a lot of overhead. With LightEngine, things like volume or playing are simply properties (with Get and Set). But that's personal taste.

So far so good, I like to see that someone is doing for DGDK(C++) what I've done on DGDK.NET. I've thought about buying DGDK to make a C++ LightEngine, but that's been a lot of work and I gave up the idea (I would not have the time).

My best wishes to your project. Feel free to contact me for anything (exchange ideas, etc).

Best regards,
Thiago
Niels Henriksen
20
Years of Service
User Offline
Joined: 27th Sep 2004
Location: Behind you breathing heavely
Posted: 4th Sep 2007 11:26
An OO lib for C++ could make me intrested in buying DGDK(C++)

Niels Henriksen
Working on a (MMO)RPG right now in LightEngine
http://noggs.netopcom.dk/forum/default.asp - Forum for the game
Jna99
19
Years of Service
User Offline
Joined: 3rd Nov 2005
Location: Portugal
Posted: 4th Sep 2007 12:48
Yep I've got arround 10 Classes till now, in my DarkGDK game.I believe all the game engine functions are static but nothing stops you of using OO in your own games, actually it make the code more understandeble and cleaner!

unitech
17
Years of Service
User Offline
Joined: 27th Jun 2007
Location:
Posted: 4th Sep 2007 16:13 Edited at: 4th Sep 2007 16:39
my team and I did this, I posted on the board a ways back. Never had any interest so i didn't package it up.. If interested let me know..

sample object h



sample object CPP


the factory


the factory can be used for all classes. Otherwise you can create a new one for each. Basically it creates an ID for each instance of a class construction. So if you use one object factory you get..

bipmap1 ID 1
bitmap2 ID 2
object1 ID 3
object2 ID 4
sprite1 ID 5
sprite2 ID 6

other wise with multiple factories you could get.

bipmap1 ID 1
bitmap2 ID 2
object1 ID 1
object2 ID 2
sprite1 ID 1
sprite2 ID 2

really makes no difference since ID's be come transparent at that point.

There is a getID function to get the ID. Also its not hard to make a find by id function if needed..





we did the following..

Vector class
Terrain class
Sprite class
Object class
Light class
Input class
Image class
D3DText class
Camera class
Bitmap Class

kBessa, like I mentioned before if you wish to package this together with yours let me know. Would be nice to source control it if there is enough interest. So far we just use it in house.
RPDan
17
Years of Service
User Offline
Joined: 29th Apr 2007
Location:
Posted: 4th Sep 2007 17:19
I like the factory idea. I might change some of the code to incorporate something more like that for initializing objects. Thanks for posting this.
unitech
17
Years of Service
User Offline
Joined: 27th Jun 2007
Location:
Posted: 4th Sep 2007 18:31 Edited at: 4th Sep 2007 18:32
Ya my buddy Tim cam up with this. FYI don't use this for camera. The Camera functions are buggy IMO, and t causes major problems. I just set them per construction. Camera( int ID ) as such..
kBessa
18
Years of Service
User Offline
Joined: 8th Nov 2006
Location: Manaus, Amazonas, Brazil
Posted: 4th Sep 2007 18:47
Hi unitech,

Back on the early days of LightEngine (DarkEngine at the time), Damon (former developer) came up with a same idea, that now we call LightIDManager.

It has the same objective of ObjectFactory, but he came up with a great idea of adding a Stack to it, to collect all freed IDs. Then when you create a new object, it first checks if a freed ID is available and reuses it.

I think this is specially great for limited objects (Like max 7 lighs, max 32 bitmaps, etc).

Cheers,
Thiago
unitech
17
Years of Service
User Offline
Joined: 27th Jun 2007
Location:
Posted: 4th Sep 2007 18:59 Edited at: 4th Sep 2007 19:02
This would also be perfect for the vector3 class. Since you commonly delete them.Thx for the tip.
RPDan
17
Years of Service
User Offline
Joined: 29th Apr 2007
Location:
Posted: 4th Sep 2007 19:09
I think that the music classes are just about done at the moment, although I'll add more exceptions in later releases. I've also started on animations, which are almost done except for a few properties and the exceptions.

Here is some example code for the animations at the moment. Both pieces of code do exactly the same thing (move an animation accross the screen), but the first one is only using DarkGDK, and the second also uses DarkObjects (my OO library).





Will have some more updates and a download soon.

Should I post updates on this in the WIP board or create a new topic on this board?
kBessa
18
Years of Service
User Offline
Joined: 8th Nov 2006
Location: Manaus, Amazonas, Brazil
Posted: 4th Sep 2007 19:16
Another thing I just forgot! DGDK includes methods for checking if an ID is already in use (for most of object types: 3d objects, sprites, images, etc.), so before assingning an ID to an object, you should check if it is already in use.

This is important as people might use some kind of plugins that may create objects with randomly IDs that you objectFactory would try to use. Simply keep going to the next ID if it finds one already in use.
RPDan
17
Years of Service
User Offline
Joined: 29th Apr 2007
Location:
Posted: 4th Sep 2007 19:20
I check for the lowest available ID. Here is the initialization for an animation.



In later releases this will throw an exception when it tries to initialize an object with ID > 32.
kBessa
18
Years of Service
User Offline
Joined: 8th Nov 2006
Location: Manaus, Amazonas, Brazil
Posted: 4th Sep 2007 19:41
That's also a simple and nice one, RPDan.

For DGDK.NET I think it's better to use a Stack rather than going from 1 to max. That's because it calls a COM and is really slower than checking a Stack list (for freed IDs) and Incrementing a sequence (for new IDs). Imagine the workload of COM calls if the first 1000 IDs are being used...
jasuk70
21
Years of Service
User Offline
Joined: 3rd Dec 2002
Location: Hemel Hempstead
Posted: 5th Sep 2007 01:07
I've gone for a different approach for ID's just an incremental number. Instead of trying to find an old number that has been freed up, I just increment it so it is guaranteed to be unique and with such a large number available (Long) it's very unlikely to get too big.

I'm doing something similar to kBessa but on a much smaller scale so when an object is created it gets set a the next number, and when it gets disposed, the dgdk object/bitmap etc. gets deleted.

Jas

----
"What is this talk of 'release'? Klingons do not'release' software. It escapes leaving a bloody trail of developers and quality assurance people in its wake!"
unitech
17
Years of Service
User Offline
Joined: 27th Jun 2007
Location:
Posted: 5th Sep 2007 14:58 Edited at: 5th Sep 2007 22:44
jasuk70, that is what the factory file does. It was talked about and is what started all this talk about id's. The talk above were improvements on this method you speak of.



anyways.. I say we are all foolish for not working together instead of reinventing the wheel, buts that just my opinion. Ill work on it either way.
RPDan
17
Years of Service
User Offline
Joined: 29th Apr 2007
Location:
Posted: 5th Sep 2007 23:27
I have just added a state manager class. Although not part of DarkGDK, this should make the game loop a lot simpler. If, for example, you want a load game screen to pop up, you simply add a function, add it to the state manager and then process the states.
RPDan
17
Years of Service
User Offline
Joined: 29th Apr 2007
Location:
Posted: 5th Sep 2007 23:38
Also added a process manager class. Same as above but process can only be added.
jasuk70
21
Years of Service
User Offline
Joined: 3rd Dec 2002
Location: Hemel Hempstead
Posted: 6th Sep 2007 00:38
unitech, Ah but doing it yourself is a lot better way of learning than using something someone else has done.

My current project is to get everything created with the toolkit part of my engine, stored as one XML document which can then be used as runtime without all that mucking about with loading individual files or creating your own document parser. I've yet again cut a whole 5% out of my source code due to this.

Jas

----
"What is this talk of 'release'? Klingons do not'release' software. It escapes leaving a bloody trail of developers and quality assurance people in its wake!"
kBessa
18
Years of Service
User Offline
Joined: 8th Nov 2006
Location: Manaus, Amazonas, Brazil
Posted: 6th Sep 2007 07:54
I'd like to quote something from DBPro documentation:

Quote: " Be aware that creating large object numbers reserves a large jump table in memory which may affect overall initialisation speed. Use small object numbers where possible.
"


I think this clears up why I have been worried about freed IDs, the faster the better, right?

Thiago
unitech
17
Years of Service
User Offline
Joined: 27th Jun 2007
Location:
Posted: 6th Sep 2007 15:09 Edited at: 6th Sep 2007 15:10
jasuk70, you have a point but missed a bigger point..

a) Like kBessa mentioned. When doing things as groups you don't have to learn things the hard way. Some one done "learned" if for you.

b) Really now, Casting 1000 lines of functions over to OO design is not learning its typing.. And a lot of it.. If you had not learned how to use a function by now its time to fold your programming ability.

All I'm saying is that making these classes is very repetitive and could be refined if we put ideas together..

kBessa , again with the great info, thx for the tip man, you proly' saved me a head ache down the road..
jasuk70
21
Years of Service
User Offline
Joined: 3rd Dec 2002
Location: Hemel Hempstead
Posted: 6th Sep 2007 17:05
For me, this is not a problem, I'm not trying to OO everything. Just the things I need to use. For example, my model class is:



And its all handled in the way I need it. (I'm also doing my best the make it all thread safe at the same time). When I need more functionality I'll add a method then. Doing all this has taught me loads.

KBessa,
Agghh resorting to read the manual . Cheers for the advice I'll implement some kind of free queue system when I finish the re-structuring. I use one function to allocate the ID's so it should hopefully be quite easy.

Jas

----
"What is this talk of 'release'? Klingons do not'release' software. It escapes leaving a bloody trail of developers and quality assurance people in its wake!"
RPDan
17
Years of Service
User Offline
Joined: 29th Apr 2007
Location:
Posted: 6th Sep 2007 20:00
Just finished an early linked list class. At the moment the items are added backwards though. Will change that later tonight.

Almost ready to post a WIP, and because this is quite different from 'Dark'Software, I am thinking about posting some tutorials to help make an RPG with it.
unitech
17
Years of Service
User Offline
Joined: 27th Jun 2007
Location:
Posted: 6th Sep 2007 20:03 Edited at: 6th Sep 2007 20:06
Ahh run what is that? Is it Pascal, Fortran, .. no its its. BASIC!!! How can you code with out ";" its blasphemy.

Na, I'm just messing to each there own.. ahh there is that beer icon.. I guess I'm just one of those do it or not at all. I don't half it, i like to finish it.


RPDan, can't wait to see it. Links lists and points make for happy code..
RPDan
17
Years of Service
User Offline
Joined: 29th Apr 2007
Location:
Posted: 6th Sep 2007 22:38
I have just completely written the linked list class (now objects are put inserted front to front), which makes me able to add in my new screen class. This is very different to the way the screen output would be programmed in DarkBasic, but I believe it will make menu screens at least a lot simpler. Haven't implemented it completely yet, but am hoping to include this in the next release. Can't tell you how it works 'til then.
unitech
17
Years of Service
User Offline
Joined: 27th Jun 2007
Location:
Posted: 7th Sep 2007 18:02 Edited at: 7th Sep 2007 18:04
RPDan isn't the vector class for that??

#include <vector>
using namespace std;

?, is that not a link list class?

there is also a STL linked list class you could use i believe. But either was nice job
RPDan
17
Years of Service
User Offline
Joined: 29th Apr 2007
Location:
Posted: 7th Sep 2007 19:47
I believe that the vector class is a linked list, but I get loads of errors whilst trying to include it (and I prefer to use classes I've written for most things).
unitech
17
Years of Service
User Offline
Joined: 27th Jun 2007
Location:
Posted: 7th Sep 2007 20:07 Edited at: 7th Sep 2007 20:33
Your telling me? It's STD hell,,, oh that sounded bad...


Will you share the link list class? Looks like I wont be able to get past the error LNK2005 errors no matter what I try.
RPDan
17
Years of Service
User Offline
Joined: 29th Apr 2007
Location:
Posted: 7th Sep 2007 20:56
If I manage to make it a lot better it will be released, otherwise I'll have another go at the vector class.
RPDan
17
Years of Service
User Offline
Joined: 29th Apr 2007
Location:
Posted: 7th Sep 2007 21:23
I'm gonna make an RPG with this. I would be interested in making a tutorial on creating on RPG with DarkGPI (Dark Game Programming Interface) also. Would anybody be interested if I did create this tutorial? It would include how to use DarkGPI in general dollowed by more specific information on creating an RPG with it.
Niels Henriksen
20
Years of Service
User Offline
Joined: 27th Sep 2004
Location: Behind you breathing heavely
Posted: 8th Sep 2007 01:26
I will be interested in a tutorial... maybe I can get some ideas

Niels Henriksen
Working on a (MMO)RPG right now in LightEngine
http://noggs.netopcom.dk/forum/default.asp - Forum for the game
Try
20
Years of Service
User Offline
Joined: 16th Aug 2004
Location:
Posted: 8th Sep 2007 10:46
Yeah, me too. I'll be able to do some researches then

Cheers,
-Try
RPDan
17
Years of Service
User Offline
Joined: 29th Apr 2007
Location:
Posted: 10th Sep 2007 09:22
I've started on an animated object class now, and am thinking of ideas for a tutorial. I'm hoping I should have a first release ready before christmas.
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 11th Sep 2007 01:47
Quote: "jasuk70 said - "unitech, Ah but doing it yourself is a lot better way of learning than using something someone else has done.""


I'm with you on this for many reasons.

Quote: "unitech said - "jasuk70, you have a point but missed a bigger point..

a) Like kBessa mentioned. When doing things as groups you don't have to learn things the hard way. Some one done "learned" if for you.

b) Really now, Casting 1000 lines of functions over to OO design is not learning its typing.. And a lot of it.. If you had not learned how to use a function by now its time to fold your programming ability.

All I'm saying is that making these classes is very repetitive and could be refined if we put ideas together..""


I your points are valid as well unitech!

for the record I am doing the same thing in C++ also - a "Helper" class(s) for GDK. But first - a "C++ Helper" class in general that can/will be built as the real base and usuable for things outside GDK realm. Example: STD Lib double linked lists - more overhead and complexity than I need and I NEED blazing fast - so I wrote my own dynamic "array"'ish double linked list class(s). They are designed for multi-dimension should you wish to go there.


First off - I think its personal taste - which actual "code base" you build on (if any). My personal taste is usually to make things myself - not everything - but most things I'll need all the time. Why? By writing the code myself - I know EVERY DETAIL about it and it helps me figure out problems and it allows me to go through this mental exercise of having to think about the best possible way to write it I know how considering what I plan to use it for.

Like for me - the issue where "going from Windowed Mode to Full Screen deletes all your video memory" is a problem that can not be left as is. How do I fix? I need to have a class library that at any moment can totally unload ALL resources, and then recall them (including setting up sparky's afresh) etc. This is no simple task - and unless the class is written from the ground up to be able to do this - (Also beneficial if making a "level editor" by the way) - I should do it myself because OTHERS might not think this is necessary... because it isn't ... I want it though - hence personal decision.

I do think however that these forums are indespensible and code snippets and the like are wonderful. SO many times I have snagged code from people - just to study it - and then write my own yet again - thankful for what I learned in their code!

Well - sorry to babble - I enjoy this hooby to much and I am just starting to REALLY enjoy DarkGDK C++ edition. I think the effort is going to pay off (rewriting Iron Infantry in DarkGDK that is not to mention future projects.)

RPDan
17
Years of Service
User Offline
Joined: 29th Apr 2007
Location:
Posted: 11th Sep 2007 20:12
If I do get a tutorial done for an RPG in DarkGDK, I may release one for an MMORPG. Not sur though, as that would be a lot more work. For a start, I would have to use DirectPlay directly, because using the DarkGDK multiplayer features is quite inefficient. It would be an awful long time before it would be ready, but would anyone be interested? I would only do it if many people were interested. Large chance it won't happen anyway, though, but just in case.
RPDan
17
Years of Service
User Offline
Joined: 29th Apr 2007
Location:
Posted: 11th Sep 2007 22:56
The Animated Object class is going well. I think a christmas release date is quite feasible, but there is still a lot of work to be done. Animations can be added to objects very easily. All you have to do is specify an object file which will have its animation appended to the object, and a name which will be used to call the animation.

character.AddAnimation("walk","character_walk.x");
character.AddAnimation("run","character_run.x");
dbSyncOn();
while(LoopGDK())
{
if(dbReturnKey())
character.Loop("run");
if(dbSpaceKey())
character.Play("walk");
dbSync();
}
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 12th Sep 2007 01:41
@RPDan - Interesting Animation/OOP approach RPDan!

Hoo Rah (Tone of that old u.s. marines guy on TV)

Is the animation thing timer based? Also, I recently learned that frames do not need to be 1,2,3,4... You can use a float And do things like 1.01, or 2.89 as example frame "positions". Makes for smooth stuff when timer based (and not timer based of course) in case you weren't aware.

---DarkGDK Multiplayer topic switch

Does it blow chunks that badly? Hmm... I don't know anything about direct play but does that make it harder or easier to get the lan working (speed aside)? I suspect its harder.

I have a FreePascal lib for using both an "os independant" approach to internet communication as well as a winsock one. FreePascal syntax is not to hard to convert to c++ - I wonder if that would help - or just using winsock raw would be better?

With regards to GatorHex's research in the DBPRO forum for multi-player and cheaters - I wonder if making your own is maybe a good thing - allowing a smart combo of udp and perhaps tcp and a "smart" server to tell the likely hood of internet cheaters! Direct Play I doubt handles this - but I'm no expert.

unitech
17
Years of Service
User Offline
Joined: 27th Jun 2007
Location:
Posted: 12th Sep 2007 21:47 Edited at: 12th Sep 2007 21:50
dup post...
unitech
17
Years of Service
User Offline
Joined: 27th Jun 2007
Location:
Posted: 12th Sep 2007 21:49 Edited at: 13th Sep 2007 15:51
Hey RPDan, your animation class is similar to mine.. Only I used an enum.

Object[1].setPlay( RUN, 11, 40);

Object[1].play( RUN );


class code.
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 13th Sep 2007 02:12
Both of you guys have good stuff there. Have you tried adding timer code to that? It's pretty neat. You should try it! It allows you to control how fast or slow the animation will "play" by doing it manually versus having PlayObject. this way when a lame PC plays the game and a fast one do - it will play the animation the same way... not make the animation run double speed on a fast pc. If you like I can give you some DBPro code that does it so you can work it in.

unitech
17
Years of Service
User Offline
Joined: 27th Jun 2007
Location:
Posted: 13th Sep 2007 15:11 Edited at: 13th Sep 2007 15:36
I used a frame rate value for this. It matches the cycles of code with the animation speed. Kinda nifty..

object.setRate(30);
Red Ocktober
20
Years of Service
User Offline
Joined: 6th Dec 2003
Location:
Posted: 13th Sep 2007 18:59
i've also been following this thread for a while with great interest...

i am a big devotee of object oriented programming methods, and am currently working on an OO framework for the DBPro GDK and 3Impact engine, simultaneously... and while i'm using a different approach than the linked list method, i think that overall, your method might be the best of the two...

my OO framework (engine) is basicly a simple, lightweight core engine that implements core functionality (an event mechanism and generic methods and properties) that allows object derived from custom classes to be included, and reference the framework in order to extend the engines core functionality in whatever direction the game or project requires...

while there are no linked lists in my implementation, all new classes derive from a generic GameObject class, which is a virtual abstract class, and allows all new objects to be flexible enough to interact with several engine methods as well as each other...

each new class is required to implement a hook to the engine raised update event, for automatic self updating during each iteration of the mainloop...

for simplicity i've broken a few rules of OOP, and the declation and implementation of my classes are in a single header file... but it works... and it provides me with an OO methodolgy that the BASIC nature of DBPro's native language doesn't afford...

--Mike
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 13th Sep 2007 20:09 Edited at: 13th Sep 2007 20:18
Sounds cool. I like the trickle down update approach each loop - raised events I mean.


Whose/Which linked lists are you referring to in this thread Red Oktober?

[edit]Ah never mind I see. Unitech's. I agree with him too - pointers and linked lists are cool - its funny how something "more complicated" actually boils down to some very lean code when compiled. Especially when you write your own linked list manager - way light and mean - that's what I'm doing and I THINK Unitech is doing also....

...because I saw something he wrote about it adding at the end only and he was going to fix that - I know exactly how the insert is harder than the Append - that's what I do first also. Insert is a bit trickier. Its simple in thoery - only two swaps of numbers but its like ITEM->NExt->Prev = ITEM->Prev->Next All (usually) Type casted void pointers.

Blows up a lot during development - but when its correct - IT FLIES

unitech
17
Years of Service
User Offline
Joined: 27th Jun 2007
Location:
Posted: 13th Sep 2007 20:49 Edited at: 13th Sep 2007 21:00
Ya A buddy of mine gave me a neat trick.. But I cant get the STD:: working with GDK, seems I always get linker errors so I used another method that so far I'm ok with.


Here is what we came up with never never would compile.


h file

jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 13th Sep 2007 22:00
Almost! Wouldn't compile - bummer. You have all the pieces.

Camera, Light, Object, Bitmap, Image, sprite, d3d <--what is that?? Direct 3d somehow?, Vector, Num_Types I dont get that one either... But I think you are missing MATRIX and MEMBLOCK.

with my linked list - as it stands now I should be able to do what I think you're going after. The ability to save your own list of in use "IDs" so you don't need to double check with EXIST commands?

I do something different in DBPro - its not perfect BUT is very fast usually.

Basically for all the types you have above I set a counter. Each Time I look for an ID - I Add one to the counter - and see if that new ID exists via dbExists. If it does - I increment it again and check etc. The benefit of this is that when I'm loading a bunch in a row - say 1000 objects (unlikely but) it doesn't start the loop at the beginning, it looks where it left off plus one (which is usually empty).

I do dthis for all the "id's" but I'm thinkning your way of keeping them in a list is probably the way to handle Vectors seeing how Vectors do not have an EXIST command.

Fun IS!

jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 13th Sep 2007 22:04
@Unitech -
Quote: "I used a frame rate value for this. It matches the cycles of code with the animation speed. Kinda nifty..

object.setRate(30);
"


(Sorry for double post)

That sounds cool - but I read somewhere that timer based is the way to go because basing it on frame rates is unreliable or something. You ever hear that? If not - than I could rip TONS of timer stuff out of my programs and just fix my frame rate!?!?!?

Should I? Should I not? Now I need to know. I have a lot vested in how the machines work (Tank Tread is PERFECT how it moves where its touching the terrain..doesn't appear to move at ALL! (Like it should) I'd redo that though to get rid of a bunch of timer math etc. if I thought Setting sync rate was enough!

unitech
17
Years of Service
User Offline
Joined: 27th Jun 2007
Location:
Posted: 14th Sep 2007 05:49 Edited at: 14th Sep 2007 14:34
All I can say about frame rate is DB's frame rate is bugged.. I had great luck with my own.

D3D is a plugin class I made off of the guy (i forget who) that made one on here.

As to your method its exactly what I did after my above code would not compile..

cpp


h

Login to post a reply

Server time is: 2024-11-16 20:13:26
Your offset time is: 2024-11-16 20:13:26