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.

DarkBASIC Discussion / Dark Noob Games HQ

Author
Message
M22RDY
13
Years of Service
User Offline
Joined: 8th Oct 2011
Location: SC, UK
Posted: 28th Oct 2012 17:55
Is this team still operational?
LBFN
17
Years of Service
User Offline
Joined: 7th Apr 2007
Location: USA
Posted: 28th Oct 2012 20:57 Edited at: 5th Nov 2012 06:30
IAC update: The waypoints for around the farm have been put in. The system is setup to relatively easily add or remove waypoints as needed. The aliens / monsters move to them correctly. I am starting to work on the logic for moving the aliens between the waypoints.

Latch, please tell me you are still working on this. I'm hearing an echo.

So many games to code.....so little time.
Latch
18
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 6th Nov 2012 04:06
@LBFN:

I am definitely still working on this. I've just been under a bit of pressure with work over the last couple of weeks... it's month end so everyone is going crazy. I should be able to get some tidbits done here and there throughout the week. What I had been working on was the animator but I better get back to the tractor code so you can incorporate it with the rest of the code. It has a series of waypoints for the tracor that can be activated by pressing function keys F1 - F6. It works, but I never put in the tilt, th e motiion for the trailer, or the mounted gun. So, I will at least get the tilt for the tractor and hopefully the movement for the trailer done within the week. I'll pause on the animator for now.

Enjoy your day.
LBFN
17
Years of Service
User Offline
Joined: 7th Apr 2007
Location: USA
Posted: 6th Nov 2012 05:05 Edited at: 7th Nov 2012 18:57
Latch,

I am glad you are still working on this game. Agreed on setting the animator on the shelf for now.

We are going to need some humans to protect. Adbul Ahad made a robot on the 3D Chat forum, but what we really need is humans. I have made three humans in the past; two of which are decent, but they are around 2K polies and will not work for this game. I will see what I can find as realistically, it will take too long to make and texture them. I figure we need at least one human in each building.

EDIT: 7 November update:
I have setup waypoints inside the buildings and the aliens move to them. I have not yet coded it so that once inside a building, they look for a human to attack, but the code is in place to identify that, so it should be fairly easy to write a subroutine / function to handle grabbing a human. I still need to code it so that when it gets to the barn doors or the house door, they open as the alien goes through.

I think I will code it so that aliens look to see if another alien is already in the building and if so, to either idle outside the building or move to another waypoint.

So many games to code.....so little time.
Latch
18
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 8th Nov 2012 04:17
LBFN,

I got a couple of DarkMatter 1 models we could probably adapt for use. That would save some modeling time - but we might need them textured and animated.

For bumping the barn or house door, you could probably set up the collision for the alien(s) similarly to how I set up the goblin collision in the demo.

Enjoy your day.
LBFN
17
Years of Service
User Offline
Joined: 7th Apr 2007
Location: USA
Posted: 8th Nov 2012 16:34
Quote: "I got a couple of DarkMatter 1 models we could probably adapt for use. That would save some modeling time - but we might need them textured and animated."

I had those models years ago, but lost them when my HDD crashed. I do think we can make them work.

Quote: "For bumping the barn or house door, you could probably set up the collision for the alien(s) similarly to how I set up the goblin collision in the demo."

Yes, I tried that and it works. It needs some tweaking, but the aliens do indeed push open the doors.

The fenced in area needs a gate to enter and exit through. Perhaps you could make something that would work similar to the barn / house doors.

If you do another code update, I would like to give you what I have, so that you could alter it, which would save me a ton of time. The current code I have includes your latest load_farm code, the ships descending / ascending, the aliens being placed in the beam, aliens moving to the buildings within the farm. Yellow spheres are placed at every waypoint currently so that I can see where the aliens are supposed to be heading. I plan to revise the ship dropoff points, as the house and barn don't get enough action currently. The code is 1368 lines long.

So many games to code.....so little time.
Fluffy Rabbit
User Banned
Posted: 9th Nov 2012 21:55
Sorry I haven't been actively involved here. I have been quite busy. If it helps, I just released a Dark Survival 2 update which contains code for a complete vertex animation system. There is of course no bone animation, but the functions will interpolate through a set of keyframes.

http://code.google.com/p/darksurvival2engine/downloads/list
Latch
18
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 10th Nov 2012 22:33 Edited at: 10th Nov 2012 22:36
Quote: " ...which contains code for a complete vertex animation system."

Sounds like you are making some excellent progress with your project.

LBFN
Quote: "The fenced in area needs a gate to enter and exit through. Perhaps you could make something that would work similar to the barn / house doors."

Uhhhh, I don't really want to mess with the fence right now as the sliding collision for it is working well.

Perhaps the aliens could jump over the fence to gain access to that area. Or perhaps they are lowered slowly from the spaceship to grab an animal from above and blasting them would make them drop the animal, or a different smaller spaceship could try and tractor beam an animal up. However, the gate option isn't off of the table, I just don't want to spend the time working on that at the moment.

Quote: "If you do another code update, I would like to give you what I have, so that you could alter it, which would save me a ton of time."

You should post your code because I'm gonna have 500 to 700 more lines with the tractor stuff. Are you using any additional media or directory structure? If not, the code alone should suffice as long as the relative directory references are there.

In regards to combining code, there's still BN2's shooting code. Have you tested it out yet on anything?

Also, if you are using Fluffy's combined code example as a base, there is a function for managing the camera aspect and maximum resolution that I wrote that he had included. We should dump that because the behavior differs between graphics cards as I've recently discovered. Some graphics cards will automatically adjust for aspect ratio and some won't. The ones that do, may create a result where the screen is especially "squished".

In all cases with DBC and graphics cards however, if the width to height ration set using SET DISPLAY MODE isn't 4:3 (.75 aspect ration) there will be a weird smearing of 3D on the edges of the screen. A simple fix is to use:



This assumes using DarkBASIC Classic 1.2x where SET CAMERA ASPECT exists (which I think we all are).

Since we are running in 800,600 base resolution full screen for this game, we should be fine. The problem is on wide screen monitors that whose cards don't automatically adjust for aspect ratio, the view will be stretched. There's no easy remedy without being able to probe the monitor's actual screen size and the capabilities and setting of the graphics card.

Enjoy your day.
Fluffy Rabbit
User Banned
Posted: 11th Nov 2012 21:22 Edited at: 11th Nov 2012 21:26
@Latch-

Quote: "Sounds like you are making some excellent progress with your project."


Thank you. I am hoping my code can be used to animate various objects on the farm. A lot of people (especially Blender users) aren't able to export animations in a DarkBASIC-compatible format. However, one can export keyframes and "lerp" through them.

Quote: "You should post your code because I'm gonna have 500 to 700 more lines with the tractor stuff. Are you using any additional media or directory structure? If not, the code alone should suffice as long as the relative directory references are there."


I don't feel comfortable working with a codebase that references uncertain other files. If the file size isn't too big, I'd recommend uploading a zip archive of the entire project as is. When you add your 500-700 lines, I'd suggest you do the same. Please?

Quote: "Also, if you are using Fluffy's combined code example as a base, there is a function for managing the camera aspect and maximum resolution that I wrote that he had included. We should dump that because the behavior differs between graphics cards as I've recently discovered. Some graphics cards will automatically adjust for aspect ratio and some won't. The ones that do, may create a result where the screen is especially "squished"."


What? Are you talking about your automatic screen resolution function? I have run into problems with that on some computers, resulting in a strange glitch where polygons have cyan borders. However, I am unaware of any aspect ratio problems. If you ask me, that just sounds very unlikely.

Quote: "In all cases with DBC and graphics cards however, if the width to height ration set using SET DISPLAY MODE isn't 4:3 (.75 aspect ration) there will be a weird smearing of 3D on the edges of the screen."


Yes, but that's only if we aren't using a 4:3 aspect ratio, which we should be using at all times with this project.

Quote: "Since we are running in 800,600 base resolution full screen for this game, we should be fine."


Ever since Windows Vista, using DarkBASIC's native fullscreen mode at anything other than its starting resolution (640x480x16) causes a nightmarish flickering of the screen and long startup times. I wish it didn't have to be this way, but it is. In Dark Survival 2, I use the automatic screen resolution function supplied by Latch to adjust to a high-res 4:3 display mode, and provide an optional "safe mode" that forces the program to retain its original 640x480x16. IMO, that would be better than SET DISPLAY MODE 800,600,32
LBFN
17
Years of Service
User Offline
Joined: 7th Apr 2007
Location: USA
Posted: 11th Nov 2012 22:08 Edited at: 11th Nov 2012 22:42
Quote: "In regards to combining code, there's still BN2's shooting code. Have you tested it out yet on anything?"

I tried it, but I could not get it to run. I'm sure there is something I am leaving out; I haven't had the time to go through it to figure out what is wrong.

Quote: "You should post your code because I'm gonna have 500 to 700 more lines with the tractor stuff. Are you using any additional media or directory structure? If not, the code alone should suffice as long as the relative directory references are there."

I plan to post a .rar file soon that has all of the code and media in it. I would suggest that as media / code changes are made going forward, that we update together so there is no confusion.

As to the fence gate, I like the idea of the aliens jumping the fence (which should be do-able). Perhaps the alien could drag a farm animal to a specific spot and then a smaller spacecraft could be made to hover above and the animal is raised up in a tractor beam. If the alien gets shot while leading the animal there, the animal goes free.

EDIT: Current files/media are attached. If you want to see the waypoints, unREM lines 586 to 590.

So many games to code.....so little time.

Attachments

Login to view attachments
BN2 Productions
20
Years of Service
User Offline
Joined: 22nd Jan 2004
Location:
Posted: 11th Nov 2012 23:52
Quote: " I tried it, but I could not get it to run. I'm sure there is something I am leaving out; I haven't had the time to go through it to figure out what is wrong."


I've successfully implemented it into another program with no issues (I say this just to point out that the system works). If you can post your setup code (all of the variable assignments and such) I can look it over and see if you missed something.

Great Quote:
"Time...LINE??? Time isn't made out of lines...it is made out of circles. That is why clocks are round!" -Caboose
Fluffy Rabbit
User Banned
Posted: 12th Nov 2012 03:30
@LBFN-
Very nice work so far.


I fixed the camera and made the flashlight a little more realistic. Attached is the complete project.

Attachments

Login to view attachments
LBFN
17
Years of Service
User Offline
Joined: 7th Apr 2007
Location: USA
Posted: 12th Nov 2012 04:18
Quote: "@LBFN-
Very nice work so far."


Thank you, but I only did some of the work. Latch, you and Obese have contributed to the work also.

Quote: "I fixed the camera and made the flashlight a little more realistic."


It does look more like a flashlight, but it allows for very dark areas sometimes. The light shows up yellow and sometimes is too far away. I do like how it makes the stars look, though. Since we are going to have a tractor and trailer, it seems like the lighted area would need to be bigger.

So many games to code.....so little time.
Fluffy Rabbit
User Banned
Posted: 12th Nov 2012 10:26
@LBFN-

Quote: "It does look more like a flashlight, but it allows for very dark areas sometimes. The light shows up yellow and sometimes is too far away. I do like how it makes the stars look, though. Since we are going to have a tractor and trailer, it seems like the lighted area would need to be bigger."


In that case, I think it would be a good idea to not have a flashlight that you could switch on or off at all. Simply increasing the ambient lighting a little and ditching the mobile lights would solve the problem. DarkBASIC can't handle texture projection (yet), so flashlight effects are really hard to do. If it doesn't look like a flashlight, I wouldn't recommend treating it as such.
LBFN
17
Years of Service
User Offline
Joined: 7th Apr 2007
Location: USA
Posted: 13th Nov 2012 01:18 Edited at: 13th Nov 2012 01:36
BN2 Productions:
Quote: "I've successfully implemented it into another program with no issues (I say this just to point out that the system works). If you can post your setup code (all of the variable assignments and such) I can look it over and see if you missed something."


I really just put the two snippets you had together and saved the .dba file with the bin, include_files, and media folders as they should be. The cylinder, plane and sphere objects it tried to load caused an error, as they were not there, so I simply created them in code just to get it to run. It now errors saying that object #s have to be between 1 and 65535, but the error line it gives is not correct.

I really don't have time to work with it, sorry. Could you perhaps take the code that I posted, implement it and re-post the code itself, along with any necessary media? It would be greatly appreciated. Bear in mind, that Latch has produced an updated version of the dbcwithcoldet.dll (1.05), which is used currently.

Thanks,

LB

EDIT: Latch, is there going to be a character that is firing the gun?

So many games to code.....so little time.
Fluffy Rabbit
User Banned
Posted: 13th Nov 2012 02:00
Quote: "Latch, is there going to be a character that is firing the gun?"


I thought it was the goblin.
Latch
18
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 13th Nov 2012 04:47
Quote: "Latch, is there going to be a character that is firing the gun?"

There will be a character. I never heard back on the consensus of whether we would use the goblin as the farm residents (in various sizes and colors).

I'm gonna go through the code LBFN posted. I'll probably change some of the media locations by separating out the alien stuff (creatures and ship(s)) into their own directory. I'll add in the tractor code. I'd also like to keep the aliens from bunching up. Also I'm curious why their movement is in 'ticks' and not smooth. Is that intentional?

Enjoy your day.
LBFN
17
Years of Service
User Offline
Joined: 7th Apr 2007
Location: USA
Posted: 13th Nov 2012 05:40
Quote: "I never heard back on the consensus of whether we would use the goblin as the farm residents (in various sizes and colors)."


Guess I missed that one. I thought we were looking for humans (isn't that what you asked Abdul Ahad to make?). A goblin just doesn't seem to fit to me. For the character, would it be appropriate to have a military guy? There is a SWAT guy available, in which the texture could be modified to look like an army guy.

Psionic made a zombie that I think I could take and modify to look like a farmer.

Quote: " I'd also like to keep the aliens from bunching up."

We could have the ships drop off fewer aliens at a time and shorten the delay in-between the ships coming. Also, the spacing of the aliens could be adjusted when they are placed - I haven't messed with it, but it could be easily revised.

Quote: "Also I'm curious why their movement is in 'ticks' and not smooth. Is that intentional?"

Currently, 10 aliens are moved with each iteration of the game loop. If you have 50 aliens, each will be moved every 5th loop. This was done to reduce processing time and allow for more aliens to be present on-screen. This was installed back when I originally was running at 60 FPS. Since we are running at 35 FPS, we might be able to move them every loop. I tried this and they ran smooth (and really fast), but coldet is not being used for collision with them yet. I am concerned that we will have so much going on that the game will bog down significantly. If game speed is an issue, we could reduce the amount of aliens in the game at one time, but it seems like it would take away from the game.

Quote: "I'm gonna go through the code LBFN posted."

Good, I will not work on any code until you post the revised version.

I plan to work on modeling characters. I need to hear from you whether you would like to go with goblins or humans.

So many games to code.....so little time.
Fluffy Rabbit
User Banned
Posted: 13th Nov 2012 06:07
@Latch-

Quote: "I never heard back on the consensus of whether we would use the goblin as the farm residents (in various sizes and colors)."


My vote is for humans. Aliens invading a goblin-run farm sounds too much like a fantasy kitchen sink. Besides, one would need to make new animations and everything anyways, so I don't see why a new shape for the protagonists couldn't be made as well.

@LBFN-

To be perfectly honest, I hate how you have the timing sorted out with the game as it currently stands. Modern PC games utilize a feature called delta time, which is basically just an algorithm to adjust the speed at which things move so as to keep the game going at an even speed. Doing things like skipping frames for the sake of reducing lag is really counter-productive in my opinion. If need be, I would support the prospect of reducing the number of enemies. That's one of the ways I keep the framerate up in Dark Survival 2. The great thing about this farm game is that more aliens can keep coming from the UFOs.
LBFN
17
Years of Service
User Offline
Joined: 7th Apr 2007
Location: USA
Posted: 13th Nov 2012 18:26
Quote: "To be perfectly honest, I hate how you have the timing sorted out with the game as it currently stands. Modern PC games utilize a feature called delta time, which is basically just an algorithm to adjust the speed at which things move so as to keep the game going at an even speed. Doing things like skipping frames for the sake of reducing lag is really counter-productive in my opinion."


Hate is such a strong word. Delta time is not new and you are not informing me of anything. When the time is right (no pun intended), I'm sure we can control the pace of the game better. I am not interested in pursuing that right now. There are many other things that are needful before we get to that.

So many games to code.....so little time.
Fluffy Rabbit
User Banned
Posted: 13th Nov 2012 23:04
Quote: "There are many other things that are needful before we get to that."


Such as?
BN2 Productions
20
Years of Service
User Offline
Joined: 22nd Jan 2004
Location:
Posted: 14th Nov 2012 00:25
Quote: " Such as? "


For one, it was mentioned above that collision detection for the alien movment still has to be added. This could potentially add a lot of computing overhead and require a complicated system to move them all seamlessly. If, on the other hand, it is implemented and it doesn't impact things significantly, we could be able to run without any real controls (perhaps a maximum number of aliens alive at any point).

Great Quote:
"Time...LINE??? Time isn't made out of lines...it is made out of circles. That is why clocks are round!" -Caboose
LBFN
17
Years of Service
User Offline
Joined: 7th Apr 2007
Location: USA
Posted: 14th Nov 2012 02:45
Yes, BN2 hit the nail on the head. To me, it doesn't make sense to be concerned with the game speed at this point, as there is much to be added first. The game is running at an acceptable rate for now and creating characters to be used in the game is of a higher priority.

So many games to code.....so little time.
Latch
18
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 14th Nov 2012 03:17
Quote: "I need to hear from you whether you would like to go with goblins or humans."

Humans are fine. The goblin idea was just because we don't have to be bound by conventions or some sense of reality and can make the game anything - I'll qualify that by saying as long as it is done well.

The built in sync rate is actually an excellent timing mechanism, just to say.

Enjoy your day.
Fluffy Rabbit
User Banned
Posted: 14th Nov 2012 19:39 Edited at: 14th Nov 2012 19:40
Quote: "The built in sync rate is actually an excellent timing mechanism, just to say."


Compared to other implementations of the same idea, I would agree. However, when I ran the game, my computer often dipped down to 25 FPS.
LBFN
17
Years of Service
User Offline
Joined: 7th Apr 2007
Location: USA
Posted: 14th Nov 2012 22:55
Quote: "Humans are fine. The goblin idea was just because we don't have to be bound by conventions or some sense of reality and can make the game anything - I'll qualify that by saying as long as it is done well"


I am presently working on the modeling / texturing the farmer. I hope to complete it this week sometime and will post some pics when I get further along.

Since we have not heard from AdbulAhad, I assume he has given up on this project.

So many games to code.....so little time.
Fluffy Rabbit
User Banned
Posted: 15th Nov 2012 02:51
@LBFN-

Way to go, then. I happen to be working on my own humanoid model at the moment to replace the DarkMatter figure I'm using in Dark Suvival 2. I'm sure yours will look better in the end, but how are you planning on animating it? I'm going to use vertex animation for my own.
LBFN
17
Years of Service
User Offline
Joined: 7th Apr 2007
Location: USA
Posted: 15th Nov 2012 03:34
Quote: "I happen to be working on my own humanoid model at the moment to replace the DarkMatter figure I'm using in Dark Suvival 2. I'm sure yours will look better in the end, but how are you planning on animating it? I'm going to use vertex animation for my own. "


Latch began work on a DBC animating tool, but set it aside as there was too much to do before we get to the point of actually needing animated models. I was content to just wait until he had time to work on it. I did download DarkSurvival2, but did not see a vertex animator, as I thought to try it to see how it worked.

So many games to code.....so little time.
Latch
18
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 15th Nov 2012 04:42
My new job is quite demanding, however I'm still committed to this. I'm just going to be a little bit slow as I am exhausted most evenings when returning home. I think what we have is interesting and fun.

Enjoy your day.
Fluffy Rabbit
User Banned
Posted: 15th Nov 2012 05:24
@LBFN-

Sorry about the undocumented DS2 code. I've attached a demo where I've isolated the vertex animation code. This should be a lot easier to work with.

@Latch-

We are as excited about your contributions to this project as you are about the project itself. You have contributed so much to this community that you have earned the right to take breaks.

Attachments

Login to view attachments
LBFN
17
Years of Service
User Offline
Joined: 7th Apr 2007
Location: USA
Posted: 15th Nov 2012 16:41
Fluffy,

Thanks for that. I loaded in the alien move, idle and impact objects and converted them to meshes, but it errors at line 195, saying the mesh ( #1) does not exist, yet I verified it exists right after it is converted.

So many games to code.....so little time.
Fluffy Rabbit
User Banned
Posted: 15th Nov 2012 18:24 Edited at: 15th Nov 2012 18:26
@LBFN-

Are you sure you're using the code correctly? If the example works without problems for the pizza, it should work without problems for your meshes.

The animation syntax is quite simple.



The above is the animation string included with what I uploaded. p1 indicates the first mesh, p2 the second, and p3 the third. "P" stands for pizza. These identifiers are defined earlier in the code.

The underscores are sep. characters dividing the IDs from the time intervals. The semicolons divide the ID/time interval pairs.

Also, all meshes in an animation string must have the exact same vertex count. Also, if DarkBASIC says a mesh does not exist, it sometimes means it was unable to load a file. Additionally, I hard-coded a maximum mesh ID number of 255 or so and a maximum object number of 300, but these can be changed.

Hope this helps.

EDIT: I'm using DBC 1.2 (1.14), so I'm not sure if this works correctly in 1.13.
LBFN
17
Years of Service
User Offline
Joined: 7th Apr 2007
Location: USA
Posted: 15th Nov 2012 18:53
Quote: "Are you sure you're using the code correctly? If the example works without problems for the pizza, it should work without problems for your meshes."

I copied the alien files (they were renamed, obviously) to the folder with this. I edited in this code right after the 'sync rate 0" command:



The rest of the code is the same. I don't know why it would recognize that mesh 1 exists right after the above code and then it does not exist later on in the program. Have you tried your code with other meshes? Maybe you can figure out how to make the alien objects work. They were posted in this thread a while back.

So many games to code.....so little time.
Fluffy Rabbit
User Banned
Posted: 15th Nov 2012 21:16
@LBFN-

To be honest, I'm having some problems myself right now with the Dark Survival 2 engine code relating to the animation system. It seems to work just fine with maybe one or two objects at a time (depending on the meshes). Actually, I have no idea what I'm doing. The only problem I could see with your thingy is that the meshes don't exactly line up because they were exported differently. If you were to take a mesh and then export modified versions of it, it should work. If it doesn't, then I have no idea.

Perhaps it might have something to do with multiple object limbs? Who knows?
LBFN
17
Years of Service
User Offline
Joined: 7th Apr 2007
Location: USA
Posted: 16th Nov 2012 16:49
Fluffy,

I have some ideas about animating in DBC, but there are other things I plan to work on before I give it a go. I am working on modeling / texturing the farmer, and plan to make an entire family, if the farmer model quality is acceptable.

Could you take the code I posted, apply coldet collision to the aliens and then post the code? It would help me out if you could.

So many games to code.....so little time.
Fluffy Rabbit
User Banned
Posted: 16th Nov 2012 18:09
@LBFN-

I don't know. First of all, I have no idea how the aliens even move. Secondly, to make it worthwhile I'd have to figure out a way to make them collide against each other, which I'm not sure how to do.
LBFN
17
Years of Service
User Offline
Joined: 7th Apr 2007
Location: USA
Posted: 16th Nov 2012 18:47
Okay Fluffy, nevermind.

So many games to code.....so little time.
Fluffy Rabbit
User Banned
Posted: 16th Nov 2012 20:31
@LBFN-

Hey, if you can just do it yourself, then do it. No need to ask me. I've already staked my claim in this project, so I don't need to spend hours implementing this. It's unreasonable to expect someone relatively unfamiliar with the code to both make the aliens slide against solid objects correctly and do likewise against each other. There are too many polygons for that, so then one would need to figure out a way for each alien to have a collision box, which Latch didn't exactly make easy to implement. I suppose that a box object could be created to the specified dimensions and its mesh could be gotten for use in ColDet, but then how would one handle the offset to line the box up? I think that's a job for Latch.
LBFN
17
Years of Service
User Offline
Joined: 7th Apr 2007
Location: USA
Posted: 17th Nov 2012 15:05
@ Latch,

I have thought about animating in DBC and wanted to see what you thought. I believe it can be done by writing a program in DBC which allows a model to be loaded and posed. Once the user poses the model and sets a keyframe, all of the limb positions are manually saved to an array as well as the limb angles (the positions would be relative to the root limb's positions).

Upon loading the model into a game, the array for the limb positions and angles is dimensioned and loaded in, as well as the object itself. All of the keyframe data is gone through and the limbs are placed and angled correctly and the keyframes are set. Then you use set the object frames as needed and use interpolation for a smooth transition.

Once a decent program is written that has a relatively good user interface for posing the model, we should be good to go.
What do you think?

So many games to code.....so little time.
Fluffy Rabbit
User Banned
Posted: 17th Nov 2012 19:01
@LBFN-

At this point, that sounds better than my vertex animation system, but wasn't Latch already working on a project like that? I thought he had already made some kind of animator.

Also, what about Lightning Limbs? How is Latch's program going to be different? Is there something I'm missing here?
Latch
18
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 17th Nov 2012 19:16 Edited at: 17th Nov 2012 19:26
@LBFN
If you are talking about articulated limbs - the DBC standard hierarchical animation, then the approach using posing is good - it's what has to be done - but the animation has to be converted to directx key frame animation and appended to the model's direct x file or a direct x version of the model has to be created with the animation.

The reason is because the positioning and rotation of limbs using ROTATE LIMB etc. for playback, are too processor heavy and are only useful for adjustments, or extremely short movements. Your suggested solution to this is:

Quote: "Then you use set the object frames as needed and use interpolation for a smooth transition."

This was an approach I tried a while ago and it is possible. However, the drawbacks are:

1. There is a limited number of keyframes you can set
2. With DBC 1.2x, there is a bug in the animation processing when setting keyframes. If the angle is above 119 degrees, it rotates in the opposite direction.

This is when we first started talking about the problem:
DBC animation bug

Roberts fix - though I can't remember testing it
Robert the Robots fix

Now the other problem with DBC, is that the limb Z angle or relative Z angle cannot be returned. It's broken. So if you wanted to pose a limb and return the angles for storage in an array, you wouldn't be able to get the Z angle. You'd have to keep track of the limb rotations yourself - which isn't a big deal, but just be aware.

When writing the direct x key frames, you have to convert your limb rotations to quaternions and store those.

So overall your idea is good, there are just a few snags to be aware of.

@Fluffy
Lightning Limbs wasn't completely finished and the user interface is a bit hard to grasp. It was released as open source a while ago, but no-one really worked on it. I find it difficult to modify an entire application as opposed to writing a new one, so that's one reason I never tried to work on Lightning Limbs.

My plan was to do a basic animator that met the needs of this game that works along the same lines that LBFN just mentioned. Time has been the factor and I thought my time would better be spent on the game first before taking away any more time on the animator. The method of creating the animator isn't the problem, it's just putting in the time to do it and the game and life!

Enjoy your day.
Fluffy Rabbit
User Banned
Posted: 17th Nov 2012 19:22
I still have no idea why a whole new animation program has to be made.
Latch
18
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 17th Nov 2012 19:33
Because there are no standard solutions. I've created my own solutions in Blender, and the only other one I'm aware of is OLD 3D studio animation from the late 90s or early 2000. Thats's what dark matter models are animated with then converted to X. All other direct x animators that I've seen are inconsistent. There's always some small bug, some application specific thing, or some other weird something that makes them work here or fail there. I obviously haven't seen them all, but the direct x file format is so flexible, that it's hard to write a one program does all interface. So an animator specifically for DBC is actually needed in general - if anyone still wants to use DBC and animation.

Enjoy your day.
LBFN
17
Years of Service
User Offline
Joined: 7th Apr 2007
Location: USA
Posted: 17th Nov 2012 19:47 Edited at: 19th Nov 2012 23:05
Quote: "If you are talking about articulated limbs - the DBC standard hierarchical animation, then the approach using posing is good - it's what has to be done - but the animation has to be converted to directx key frame animation and appended to the model's direct x file or a direct x version of the model has to be created with the animation."


I didn't want to mess with appending the animations to the .x file. I wanted to save the position and angle data manually by storing an array with the info in it. You then load in the object and arrays, set the object to the saved positions / angles and save all of the keyframes. You then set the frame you want based on the animation you need.

Quote: "

1. There is a limited number of keyframes you can set
2. With DBC 1.2x, there is a bug in the animation processing when setting keyframes. If the angle is above 119 degrees, it rotates in the opposite direction."


Uggh....noticed #2 in the program I was working on.


Quote: "Now the other problem with DBC, is that the limb Z angle or relative Z angle cannot be returned. It's broken. So if you wanted to pose a limb and return the angles for storage in an array, you wouldn't be able to get the Z angle. You'd have to keep track of the limb rotations yourself - which isn't a big deal, but just be aware."


In the program I have written, it does return the limb's z angle value, but does not return it's z position. Double uggh It seems everytime I try to get something working with this, I get smacked in the face with issues.

Quote: "I still have no idea why a whole new animation program has to be made. "


Lightning Limbs had an interface that Robert the Robot was familiar with and could work with. I found it clumsy and awkward; not that it was bad, just different. I couldn't get it to work for me, and like Latch, I would rather write something that I can understand and work with that produces the results I am expecting.


EDIT: I am finishing up on the farmer. Here is a pic of what it looks like:



883 polies

So many games to code.....so little time.

Attachments

Login to view attachments
Fluffy Rabbit
User Banned
Posted: 21st Nov 2012 06:00
@LBFN-

That's not a bad farmer. In fact, he is immediately recognizable as a farmer and the job looks professional.

A few suggestions:

- Add more detail to the hair
- Shorten the upper legs and lower torso a little bit
- Do something about the seam between the legs and the torso
- Enlarge the head a little bit
- Texture the boots

Overall, it's pretty good.
Latch
18
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 22nd Nov 2012 22:20 Edited at: 22nd Nov 2012 22:32
@lbfn
Pretty good. Only 883 polys? That's a good human for working under such constraints. Can you divide the limbs up?

Enjoy your day.
LBFN
17
Years of Service
User Offline
Joined: 7th Apr 2007
Location: USA
Posted: 23rd Nov 2012 07:11
Thanks for the comments guys.

It is indeed 883 polies and I can probably shave off a few more, as there are some under his hat that I can eliminate.

It was made using a single UV map, so the limbs can be assigned as you want. I currently have it setup similar to the robot I made.

Hope everyone had a great Thanksgiving.

So many games to code.....so little time.
Latch
18
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 25th Nov 2012 05:59
LBFN,

I've been revisiting the animator and I may be in error on saying there is a limit on the number of keyframes that can be setup using DBC SET OBJECT KEYFRAME. I'm sure there is a limit but the limit I was reporting was based on old code I had written that converted a BVH file to DBC using rotate limb and set object keyframe code so that a function or procedure could be created to run the animation of an object using the BVH animation data.

There were about 1500 keyframes for 20 limbs and at about keyframe 78, I was getting the error:

'Too many immediate real values at line 307.'

I originally took that to be an error with the number of keyframes but on further inspection, it seems to be an error with the number of literal floats that are inside the source code. Where the error occurs, there are 4598 literal float values in the code up to that point. If I reduce the number of floats by 1 and only compile the code up to that point, the code will compile.

If the values were stored in arrays or in variables, the error might not occur. That suggests that there is a finite number of values in the form 1234.4567 that can be in the source code. I did a quick loop to test creating 10000 keyframes for an object with a single limb and it worked.

To me, that's good news. It means fairly long animations could probably be created using internal commands.

Enjoy your day.
LBFN
17
Years of Service
User Offline
Joined: 7th Apr 2007
Location: USA
Posted: 26th Nov 2012 02:23 Edited at: 27th Nov 2012 01:45
1500 keyframes? Wow, that seems like a ton and a 1/2. What I did was posed the model at where the animation would start and finish and let the interpolation do the work. No way would I expect to use that many keyframes. I would be surprised if I used 30 keyframes. I really didn't want to append the data to the .x model, but that may be what has to be done in order to get this to work.

I loaded the model into DBPro to try and determine the limb positions but the structure of the file is different, so it won't work. DBPro does return the limb positions and angles.

I am working on modeling a boy.

EDIT: I have been working to get the aliens to collide with the farm collision object, but it is not working very well. I have tried about every collision method available and it is not colliding as it should. Really, we should be able to just use sphere collision with an object to make it work.

So many games to code.....so little time.
Darkhog
11
Years of Service
User Offline
Joined: 25th Nov 2012
Location: Mushroom Kingdom
Posted: 26th Nov 2012 10:52
I'd like to join team and have suggestion for a project: BrickPong. Basically it is Pong and breakout merged together. Points are either scored by destroying bricks (depends on brick type) or by making oponnent not hit ball (1 point). Winner is the person who have most score when all bricks get destroyed.

Login to post a reply

Server time is: 2024-11-24 13:11:41
Your offset time is: 2024-11-24 13:11:41