3D Rad - Free 3D game maker - Forum

This forum is now archived!

This forum is locked, and is a read-only version. A new community-ran forum can be found at classdev.net

News:

The 3DRad community can be found at classdev.net.

Pages: [1] 2 3

Author Topic: COMPONENTIZED GAME DEVELOPMENT HAS ARRIVED!!  (Read 1923 times)

« on: December 05, 2013, 11:39:58 AM »
ok... imagine a scenario where i as a 3DRAD developer, having no knowledge of programming ...

and, although i understand the basics, i am not proficient enough at using the prebuilt objects to make anything of significance...

but hey... i can make some great looking models...

and i have this dream of making the next great first person shooter... ir maybe a dungeon crawler of sorts... or a real time strategy game...

i just can't wrap my head around what it takes to make this dream a reality...


well, now comes the solution... DA DAAAA!!!!!!!    ;D

Componentized Programming For 3DRAD...


open a new project... add your custom content... link it to a Game Component... and in a few minutes, you've got a game up and running...

NO FOOLING... IT'S AS EASY AS THAT!!! 


of course for something like this to work,  you're going to need some Components to link to... right...
this is where the developers who are proficient in coding come into the picture...

they are the second essential half of the grand vision...

they are the ones who will design Components (using OOP Programming methods) that will enable all sorts of functionality to be readily available to the general community...  snipers... enemy soldiers... people on the street... traffic of all sorts, planes, cars, etc... 

all sorts of Components  should be able to be created and made available... the imagination being the only limitation...

ok... so what is this magic Component all about anyways...

simply put, a Game Component is a special built script designed to represent a CLASS from which one or many linked objects can instantiate am INSTANCE of the CLASS, automatically inheriting all of it's behaviors and built in capabilities...

maybe it's best explained by seeing a Game Component in the flesh... to actually handle one...  to demonstrate the possibility of making a game in minutes... WITH NO CODING WHATSOEVER...

ok... lets do it (see next post)

--Mike
« Last Edit: December 05, 2013, 12:03:23 PM by Mike Hense »
« Reply #1 on: December 05, 2013, 12:03:38 PM »
step 1: download the attached Game Component (ComponentTest.zip)...

all this does is add a random walker to a scene... but, more importantly, it is also the basis (template) for more complex Game Components with more complicated behaviors and functionalities...  more on this later...


step 2: copy the Game Component to your 3drad_res/objects/scripts/settings  folder and change the extension from .zip to .obs (sorry, can only attach certain file types)... it will now be available to your projects...

step 3: open a new project and add a Skybox, a Terrain, a GForce, and a ChaseCam...

step 4: now comes the part where you'd normally add your custom content to the project... since this Game Component provides a walking character to your game, you'll naturally need a simple walking mesh... Andro will do fine...  add a skinmesh and change it to andro... place it above the terrain, about 10 meters should do...

step 5: add a Rigidbody for your mesh... change it to Sphere2m, and place it about 10 meters above the terrain... link it to the Terrain and GForce objects as you normally would... this will enable your Game Component to move around and collide with other objects in your game... uncheck the Display Geometry property box...

step 6: add a script object... don't get scared, nothing for you to code :)  just link your Skinmesh (first) and your Rigidbody (second) objects to the Script IN THAT ORDER (IMPORTANT)... 

step 7: open up the Script object and click load, and load the Game Component... now close the Script object... i told ya there was nothing to be frightend of  :)

step 8:  link your Chase Cam to the skinmesh and position it so you can see the scene...

YOUR GAME IS NOW COMPLETE AND READY TO RUN...

THAT'S ALL THERE IS TO IT!!!

ok... so far this has hardly been anything earth shattering... after all, the only thing it does is walk around a scene, no mean feat...  but maybe the next few things we're going to do will open your eyes to the potential of using 3DRAD Game Components... 

next, lets create a (small) crowd of scene walkers from our single Game Component...

(in the mean time... post any comments, critiques, questions, etc...)


--Mike


« Last Edit: December 05, 2013, 01:05:45 PM by Mike Hense »
« Reply #2 on: December 05, 2013, 12:29:17 PM »
ok... say i want to change  the scene to have a crowd of random walkers instead of just one...

simple...

step 1: delete the script object from the project...  WHATTT!!!! you may ask  :) 

trust me, there is a reason for this...  we are going to add some more content... increase the number of instances (objects) of random walkers... that means we will be adding additional skinmeshes and rigidbodies to the project, and (IMPORTANT) EVERY TIME THE LIST OF OBJECTS THAT'LL BE LINKED TO THE GAME COMPONENT SCRIPT CHANGES, WE MUST DELETE THE EXISTING GAME COMPONENT SCRIPT, ADD THE NEW CONTENT, AND REPLACE IT WITH A NEW GAME COMPONENT SCRIPT, and link each of the new objects (Skinmeshes and Rigidbodies) in sequence...

the Game Component Script expects the associated object to be linked one behind the other in the ObjectHandle window, so any changes to the list of object in the editor will require this...


step 2: select the Skinmesh object and clone insert 5 new meshes so you have a contiguous list of 6 skimeshes... these will represent 6 Game Component Instances... 

step 3: do the same for the Rigidbodies...  make sure each rigidbody is linked to the Gforce and terrain as you would normally do...

step 4: next, add a new Script object and link each of the new Skinmeshes and Rigidbodies starting at the top of the list...

step 5: open the Script Object and click Load, and load TestComponent.obs...

step 6: check to make sure all the new objects show up in the Object Handle window as a continuous list in sequential order of 6 Skinmeshes followed by 6 Rigidbodies...

step 7: edit the script to change the OBJECT_COUNT amount to 6... that's the first line in the script...


CLOSE THE SCRIPT AND RUN...  you should now have a few people walking around...



are ya startin to see the potential in this... especially for non coders... the art centric developer never has to get into the complexities of the logic or code required to implement a certain functionality... al they have to do is to provide the content that the Game Component requires (in this case a simple animated mesh and a rigidbody ), link em in sequential order, edit the number of objects, and they're off and running...


for the Game Component developer, simply design your object as your would expect a single object to behave for each particular interaction and tell the user what content to provide to the Component... this is facilitated through the use of Object Iriented Programming mehtodology, where you define a Class and, at the bare minimum, write a Create and an Update method...

it's like a black box of sort where the user/developer  of a Game Component is never expected to have to be aware of the code logic inside... 

coool, eh  :)

hey... for grins, use the same procedure and see how many you can add before things start to slow down...


--Mike
« Last Edit: December 05, 2013, 01:41:49 PM by Mike Hense »
« Reply #3 on: December 05, 2013, 12:40:34 PM »
ok... a few questions...

1 - what are your first impressions... would this somehow be useful?

2 - if so, what sort of Game Components would you like to see...


oh yeah... the code is free to use in a 3DRAD developed game or as part of any Game Component you create... no credit necessary...


one final thing... BIG THANKS to Sondre for getting me thinking along these lines with his recent AI Traffic Car thread in the forums...  one of the first Game Components i want to make is a version of an AI Traffic Game Component, a car that'll follow streets and respond to red lights and pedestrians that you design...


if there is any interest in this, comments, critiques, questions, suggestions will be welcomed below...

download the Test Game Component attachment in the 2nd post of this thread

--Mike
« Last Edit: December 05, 2013, 02:17:50 PM by Mike Hense »
« Reply #4 on: December 06, 2013, 02:48:24 AM »
Nodt tried it yet, but sounds interesting. Will certainly give this a shot when I finish college today :)
« Reply #5 on: December 07, 2013, 03:19:51 AM »
of course useful, thank you for caring about the beginners =)
I think there are several separate themes:
1 Mechanics of the game is for example the Game Component fire or move bots.
2 the Atmosphere of the game - the change of day and night, rain, snow, Theme, you can add, well and need instructions what content is needed for this or that Game Component.
sorry for bad English
« Reply #6 on: December 07, 2013, 09:33:06 AM »
Quote
of course useful, thank you for caring about the beginners =)

we were all beginners at one time...

also,

there are many people who are not beginner artist and model makers who have no interest in programming or complex logic assemblies... they are also an essential part of any game development community...

i'm not talking about the person who comes to RAD with his/her head in the clouds with fantasies of making the next great Doom killer or GTA replacement a week or two after they download the editor... i'm talking about the non coder who is willing to take the time and expend the effort to at least get familiar with all aspects of development...

hopefully something like this can help get their efforts realized...

ok... moving on... speech mode off  :)

Quote
I think there are several separate themes:
1 Mechanics of the game is for example the Game Component fire or move bots.

Component Game Design is actually what that is all about... the mechanics of any game IS  what the elements of that game do... 

try to think of a component as an independent, self sufficient, instance of the Component CLASS (an  OBJECT), that lives in the game world... once created, you can leave it alone and it will exist in the game world all by itself, without any further intervention... interacting with game world, and with any other instances of not only the Game Componenct it was created from, but with instances of any other Game Components that it was design to be aware of...

for example... take our Test Component... it doesn't really do much right now when you put one or a group of em into a scene... but lets say that you need a population of walkers to move around a city scene...   this is where the concept of Game Components starts to become apparent...


first - the artist/modeler developer makes the request as a set of specifications....

next - the programmer/component designer developer proposes a solution in response to the request...

third - the component is written, usually based upon an existing CLASS, but with added METHODS that extend the components functionality... so eventually you can wind up with what on the surface appears to be a complex object, but what is really a series of SIMPLE, well thought out  behaviors...

this is how GAME COMPONENT Development works... like a contractor and a customer in the real world, all the customer has to know is what he/she wants, and send up the request... then the contractor gets back to em with a proposal... if the customer agrees, then the component is built...

 
Quote
the Atmosphere of the game - the change of day and night, rain, snow, Theme,
in the surface these things seem pretty straight forward and simple, but upon further thought you'll see that these type of components will affect almost any element of the game... as well as any Game Components...  best to give these careful consideration before creating these type of components..


Quote
well and need instructions what content is needed for this or that Game Component
definitely... that will be included in the top part of the Script as comment...


now lets see the process in action...

as the customer... the artist/modeller/developer... i need to populate my city scene with people who walk around the city...  i make a request...

as the programmer/component designer... i propose a simple solution based upon the existing test component  that allows the walker to move about the scene, moving toward a series of waypoint which the  customer will be able to place about his/her scene...

lets see if this works...



--Mike



« Last Edit: December 07, 2013, 11:19:48 AM by Mike Hense »
« Reply #7 on: December 07, 2013, 12:27:24 PM »
Sounds interesting. I'm thinking about components like in google sketchup :D
But I'm sure they use components in video game development.

What about like a racetrack maker like the one 3drad gives only better..
Just an idea
« Reply #8 on: December 07, 2013, 12:59:24 PM »
Quote
Sounds interesting. I'm thinking about components like in google sketchup
think OBJECTS... take two aspirin... and you'll be alright...

Quote
What about like a racetrack maker like the one 3drad gives only better..
a race track or race car, maybe... but definitely not a racetrack maker...
that's not what this is all about...

besides... why recreate the wheel... one of the thing 3DRAD does well is race track thingees...

hang tight... i'm whipping up the first real game component example... one that can actually be used in a game...

--Mike

« Reply #9 on: December 07, 2013, 01:58:01 PM »
Quote
Sounds interesting. I'm thinking about components like in google sketchup
think OBJECTS... take two aspirin... and you'll be alright...

Quote
What about like a racetrack maker like the one 3drad gives only better..
a race track or race car, maybe... but definitely not a racetrack maker...
that's not what this is all about...

besides... why recreate the wheel... one of the thing 3DRAD does well is race track thingees...

hang tight... i'm whipping up the first real game component example... one that can actually be used in a game...

--Mike
Can't wait. My friend wants to learn how to use 3DRAD so COMPONENTIZED  GAME would be great.
New 3DFoundry:3DFoundry.tk
« Reply #10 on: December 08, 2013, 04:34:22 AM »
I don't know how the others managed to open your zip, but I certainly cannot (using both WinZip and WinRar)  ???
AKA: The 3D Raddict http://www.3draddict.com/
« Reply #11 on: December 08, 2013, 04:56:34 AM »
I don't know how the others managed to open your zip, but I certainly cannot (using both WinZip and WinRar)  ???
step 2: copy the Game Component to your 3drad_res/objects/scripts/settings  folder and change the extension from .zip to .obs (sorry, can only attach certain file types)... it will now be available to your projects...

Rename from ZIP to OBS.
New 3DFoundry:3DFoundry.tk
« Reply #12 on: December 08, 2013, 01:38:12 PM »
OOPs!  ;D

AKA: The 3D Raddict http://www.3draddict.com/
« Reply #13 on: December 09, 2013, 06:04:22 AM »
Folks new to 3DRad might be wondering why Andro is rolling around the terrain, rather than walking upright. Mike, you neglected to add a Character object to straighten Andro up. :D
AKA: The 3D Raddict http://www.3draddict.com/
« Reply #14 on: December 09, 2013, 08:19:45 AM »
rolling around!!??  ;D  ;D

Allan, are you sure you followed the instuctions above... 
sounds like you may have linked the  skinmeshes to the rigidbodies...

--Mike
Pages: [1] 2 3