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.

Work in Progress / Getting the Basics Functioning for the Project K96

Author
Message
Nateholio
18
Years of Service
User Offline
Joined: 30th Dec 2005
Location: I\'ve Been Everywhere
Posted: 30th Dec 2005 14:17
After working with the Torque Game Engine (TGE) for several years and getting nowhere, I have decided to use Dark Basic for my project, which is called K96 (thats just the old designator used for the project back in 1996, a real title will be added later). I'm using Dark Basic becasue I can make better use of my time with it due to my poor C++ skills and great BASIC skills. The end result will be a proof-of-concept game that demonstrates gameplay, mechanics, controls, multiplayer, etc.
I have made quite a bit of progress with a very important part of the project called the resource manager, and also some progress with camera controls that allow the use of multiple cameras based on information contained inside a model's .x file. Using models created for TGE, I have successfully programmed the basic framework for ResourceManager, allowing a user to load, place, and orient an object using a single function called "addworldobject". ResourceManager currently handles all of the object class, name, and type checking, and the cloning and loading of objects from .x datafiles and a project file. It does this through the calling of a function called "createobjectinstance" and its own internal code. Createobjectinstance in turn uses a function called "loadobject" which loads a specified object from a .x file.
The camera control system is up and working beautifully. It allows the use of multiple cameras on an object by just adding camera position and aiming nodes to the model in Milkshape 3D. The user can cycle through available cameras by just pressing a key.
The only problem I have ran into so far is running my program under the registered version of DBP. Everything works flawlessly in the demo version of DBP but is horribly out of whack when used with the registered version. Has anyone else ran into this problem?
Here is a <a href="http://ixeelectronics.com/K96/Screens.html">screenshot</a> of the system.
Anyway thanks for reading and please leave comments if you like.
Big Man
19
Years of Service
User Offline
Joined: 4th Feb 2005
Location: BEHIND YOU!!!! (but I live in England)
Posted: 30th Dec 2005 20:46
Theres a lot going on in the screen shot but it still looks really good. Maybe add some textures.

BM

Our aim is to keep the loo's clean, your aim can help.
zzz
19
Years of Service
User Offline
Joined: 13th Nov 2005
Location: Sweden
Posted: 30th Dec 2005 21:52 Edited at: 30th Dec 2005 21:53
Looks good Nateholio!
I´ve been thinking a while if I should buy TGE or not. Is it good and how much C++ do I have to know before I buy it?

Notice: In this forum ordinary HTML won´t work, use the image commands instead.


Nateholio
18
Years of Service
User Offline
Joined: 30th Dec 2005
Location: I\'ve Been Everywhere
Posted: 30th Dec 2005 22:01
Thanks. TGE uses C++ and a little ASM for all its routines, but you can use a built in C-like scripting language to do most of the light or medium work for a FPS game. The Torque community is GREAT and so is the engine for what you pay. There are LOTS of tutorials and code samples for beginners to learn from. HOWEVER, TGE is also ridicously complex, as I would expect any good engine to be. It also has a VERY good networking layer, which is what made NASA decide to use it for one of their projects dealing with virtual conferences, telemetry sharing, etc.
Nateholio
18
Years of Service
User Offline
Joined: 30th Dec 2005
Location: I\'ve Been Everywhere
Posted: 1st Jan 2006 17:53
While coding my ResourceManager is kicking my butt, I decided I should post a list of tasks and functions I will need to implement:

First -
1. Level of detail(LOD) based on object distance from the viewer, using distance values and LOD meshes derived from a model's .x file
2. Vehicle suspension that reacts to the terrain it is on and objects it rolls over
3. An auto-tracking system available on some vehicles that tracks targets while the vehicle is manuvering
4. Related to the above, an anti-missile system (AMS) that tracks missiles inbound to a target equipped with the AMS, prioritizes them for engagement, and engages them - reprioritizing as each is destroyed and then reengaging
5. Multiplayer control over various parts of vehicles such as tanks, allowing more than one person to occupy a vehicle and control various parts of it such as driving, turrets, secondary weapons, etc

I think five things is more than enough to list for now, but I have MANY more functions on my plate that will need to be implemented in the coming months.

Thanks for reading!
Nateholio
18
Years of Service
User Offline
Joined: 30th Dec 2005
Location: I\'ve Been Everywhere
Posted: 3rd Jan 2006 20:13
While looking through the command index I stumbled upon the memblock commands. After reading what several of them do I can now resume work on ResourceManager. Before I found the memblock commands, I was stuck trying to figure out how to best manage objects with varying numbers of nodes, even though the objects might be of the same general type. I was unaware of the memblock commands and spent considerable time trying to figure out a efficient way of using arrays to do what I needed, but there was none that satisfied me.
How this will work now with memblocks is that each instance of an object will have a memblock of varying size associated with it that contains all data needed to make the object and its limbs interact with the world. The memblocks do not contain node, mesh, or any similar data. They contain things such as maximum speeds, acceleration values, pointers to sounds associated with an object, etc.
When an object is loaded into memory, this data is extracted from its .x file using special nodes that contain these values in string format. So, for example, the maximum rotation for a tank's turret would appear as "Turret_A_Rot_Max_0_90_0" in the .x file. When this is sent to the object loader the following data is extracted from it:

Turret number: 0
Maximum rotation on X axis: 0
Maximum rotation on Y axis: 90
Maximum rotation on Z axis: 0

When a new instance of an object is created, the memblock associated with the particular object type is cloned along with the object. Don't get creating a new instance of an object confused with loading an object - an object can only be instanced if it has previously been loaded, memblocks created, and its data extracted.

So a typical example of how this works is:

Check to see if an object type is loaded
If object is loaded
Clone it
Copy its memblock
If object isnt loaded
Load object from disk
Make a memblock for data
Extract data and put it in memblock
Clone object
Copy its memblock
Return to caller

Anyway, thats enough for now. I hope to have some code to post in the coming days for people to use in their own programs.
zzz
19
Years of Service
User Offline
Joined: 13th Nov 2005
Location: Sweden
Posted: 6th Jan 2006 00:00 Edited at: 6th Jan 2006 00:01
Maybe I should start saving money so I can buy TGE then...
Do you know any cheap(or free) compiler? I read that Dev-c++ was not supported.

And Nateholio, give us some more screenshots!

Nateholio
18
Years of Service
User Offline
Joined: 30th Dec 2005
Location: I\'ve Been Everywhere
Posted: 8th Jan 2006 00:08
I don't know of any C++ compilers other than VC6 because I dont program in anything other than BASIC and ASM. If you look on the GG forums there should be some links or you can always go into their IRC channel and ask around.
As for screenshots, well I don't have any that are impressive yet. I however do have about 900 lines of code, about 500 of which are ResourceManager. If you take a peek at the first pic on http://ixeelectronics.com/K96/sc.html and look at my to do list, you will notice that I have a lot to do before I'm even going to worry about getting pretty screenshots. Two main reasons - I'm not an artist, I'm a programmer, concept designer, writer, and modeller/rigger/animator, secondly I'm more concerned about getting engine mechanics and my code working than making textures and skins.
The second pic is an unimpressive shot I took to satisfy people who want to see something. But its not anything special, just some flat terrain, a couple storage tanks, a LARGE pyramid, and the corner of a building.
The following http://ixeelectronics.com/Nateholio/clip0002.avi is a short video I took when I had the basics of guided missiles working, before I goofed up and lost almost everything I had programmed up until that point. Again its not anything special. I would upload another video that shows missiles turning towards me as they track but Im using dial-up right now while away from home.
Nateholio
18
Years of Service
User Offline
Joined: 30th Dec 2005
Location: I\'ve Been Everywhere
Posted: 11th Jan 2006 23:52
The meat of ResourceManagerbjectManager has been completed. There are still some bugs, optimizations, and basic features to add/finish, but the most important code for ResourceManagerbjectManager has been finished. This code loads and organizes objects loaded into a game so you don't need to keep track of ID numbers used by DarkBasic to manipulate objects. When you need an object for use in the world, you just invoke the function AddWorldObject with the proper parameters and voila! you have an object set up in the world for your use. You can now reference this object by its unique name (the name you gave it when you invoked AddWorldObject) whenever you need to manipulate it.
In order to manipulate an object you would do something like the following:

position object NamedObjectId("testobject"), 100, 0, 42

Every time you need to use a DarkBasic command that requires one or more object IDs you use the function NamedObjectId to return the specified object's ID number. In the above example the object name is "testobject".



In the above screenshot we see a tank in the middle of a boulder strewn desert plain. There are about 80 boulders total in the scene, all placed and oriented randomly. The code I used to accomplish this is as follows:

for a = 1 to 80
xsgn = rnd(10)
zsgn = rnd(10)
xpos# = rnd(1000)
if xsgn < 5
xpos# = -xpos#
endif
zpos# = rnd(1000)
if zsgn < 5
zpos# = -zpos#
endif
yrot# = rnd(360)
AddWorldObject("Tank", "Buffalo Rock", "Buffalo Rock " + str$(a + 1), xpos#,0,zpos#,0,yrot#,0,0,0)
next a

Note that each boulder has the same name followed by a unique number. Whenever you need to manipulate a boulder, you would use its full name, such as "Buffalo Rock 51". When an object is added to the world ResourceManager checks to see if the object type you are requesting is already loaded into memory. If it isn't it loads it from disk and kept as a seperate "source object". Each time a new object of the same type is added to the world this source object is cloned and placed according to what was specified on invocation of AddWorldObject.

Again, this is just the SKELETON of what I am working on - some of the functions included in the code are not used in the example and/or are still being coded, and don't work properly when invoked. A lot of this code is also poorly organized and commented at the moment. I typed all this in a hurry so I'm sure there are things that are unclear.

I hope this code is useful to someone, and please give me your questions, comments or suggestions. Thanks for reading my spaghetti code!
Nateholio
18
Years of Service
User Offline
Joined: 30th Dec 2005
Location: I\'ve Been Everywhere
Posted: 15th Jan 2006 01:59
So I've been trying to texture things today and make them look like objects rather than gray blobs. Here are some screenshots of my attempts at making things pretty. Theyre not too good at all but its better than gray blobs.<br> Now for a little boring info about what the pics are of:<br> The first screenshot shows a view of The Great Pyramid (no, they have nothing to do with the ones in Egypt) in the distance, which is a 610m (2000ft) tall structure used as the military command center for the Confederated Republics of the Clan Viper Empire Defense Forces. In the foreground are two other pyramids, one for the CVAF (457m / 1500ft tall) and one for the CVA (305m / 1000ft tall). The second shot shows a view from the other end of the complex (which will include MANY more smaller structures as I get them textured and positioned correctly. The layout can be viewed in the last pic, keep in mind that the Great Pyramid measures 870m/2857ft on a side to give you an idea of scale) with the CVN pyramid in view, which is also 305m in height. The third picture shows the Great Pyramid, and the fourth picture shows a dining facility used by officials who don't work in one of the four pyramids (i.e. legislators, judges, and other non-military personnel). The emblems are cheezy I know, but my computer art skills are NOT teh pwn so they will have to do for now. <br> There are 11 instances of objects running, 6 of which are the "working models" that are visible to the user and can be interacted with. The other 5 are "originals" used as a cache of sorts to cut down on model load time from disks. In this scene its not necessary to use the cache, but in scenes with many objects that use the same "original" its a good idea so you dont have to load a model from disk every time something is added to the world. Note that the two pyramids, CVA and CVN, use the same original but are just textured differently. I could have just instanced a single original 4 times and scaled it, but there will be differences in the interiors between each pyramid size when I get around to making interiors and coding for them. Thanks for reading!

Login to post a reply

Server time is: 2024-11-17 03:10:15
Your offset time is: 2024-11-17 03:10:15