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
Fluffy Rabbit
User Banned
Posted: 25th Jan 2013 11:01 Edited at: 25th Jan 2013 11:03
@Latch-

You put far too much faith in DarkBASIC's built-in timer. You've been very helpful and correct about almost everything so far, and very helpful to Brick Break and everybody I know on the forum, but you're wrong about DarkBASIC's frame limiting. There is always an extra delay, especially when you set the framerate a little lower. It depends on the computer, but in general there is a certain percent of time that always gets wasted. Delta time is the only way to keep the game running at a predictable speed. I have a brand spanking new laptop and even a spinning cube will lose 1/5 of its FPS when set to certain framerates.
Latch
17
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 25th Jan 2013 20:15
Quote: " It depends on the computer, but in general there is a certain percent of time that always gets wasted"

The goal is to get a full game running within a tolerence using the built in speed controls (SYNC), then we have a base line from which to make any modifications.

Quote: "I am thinking that we might be able to run as is, but if not, limiting the aliens on-screen at any given time would surely help bring it up. I think we should be real close to 35, at minimum."

Then we go as far as we can until it starts to choke! And post your recent code - no media please (unless there's something new) so I can take a look. Thanks.

Oh, and I discovered something with the setup.ini file. There is a flag for setting a window mode - not the bottom flags, but an editor flag in the first group of settings.

Setting this to 1 has eliminated any flashing before a game runs, and also allows for ANY screen size to be set up to the maximum resolution. You can do weird ones like 200X700 . It gives the appearance of fullscreen mode but centers the screen within a letterbox if the resolution is lower than the desktop.

Enjoy your day.
LBFN
17
Years of Service
User Offline
Joined: 7th Apr 2007
Location: USA
Posted: 26th Jan 2013 22:37
Latch,

Here is teh codez


With the SYNC RATE set at 35 and an .mp3 looping, it runs solid at 35 FPS. Without it, it runs at 33 FPS on my comp. I do have an I7 quad core @3.2 gHz per core.

Code Notes (known issues not yet addressed):
1. Sometimes when the aliens start out from the ship, they are too low, and then 'pop up' on their way.
2. Aliens will go into the stall and shed and race back and forth like they are bonkers.
3. Aliens will go to the (I think SW) corner of the corral and stop - it is planned to code them popping over the fence to get animals inside the corral. Right now they just stop.
4. WASD key control with mouselook.

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

Attachments

Login to view attachments
Latch
17
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 27th Jan 2013 00:15 Edited at: 27th Jan 2013 00:21
Downloading now...

In the setup.ini file, it's windowmode=1 to set a non bordered window with flexible screen resolution and eliminate startup flashing. Leave the windows controls under [STARTUP] at the defaults:

[STARTUP]
window=0
winposx=0
winposy=0
winsizex=640
winsizey=480

I also discovered that the mounted gun causes a huge choke point. In my tests it knockd the FPS from 80+ down to 50+ . Not sure why... there are references in it to a bunch of textures that don't exist. I suppose I could eliminate those references and see if that makes a difference, but when it's hidden, the fps shoots up.

Enjoy your day.
Latch
17
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 10th Feb 2013 20:55
The mounted gun thing doesn't seem to be a game changer depending on the computer so I'm leaving that alone for now. I checked out controlling the speed of the tractor and found I need to adjust the angle change speed for the steering so I've got that in the works. I'm still moving forward even though its at a snail's pace.

Enjoy your day.
Latch
17
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 20th Mar 2013 21:04
I've been working on an animator for DBC so we can modify the animations a little easier than trying to piece them together through multiple modeling packages.

So, working on this is still moving forward.

Enjoy your day.
Libervurto
17
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 20th Mar 2013 22:01
Hey guys, good to see you still going strong on this, I have been silently checking in from time-to-time.

Do you have any little jobs that need doing that would free up some time for other things?


Latch
17
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 3rd May 2013 00:31
Quote: "Do you have any little jobs that need doing that would free up some time for other things?"


Hey, did you ever finish the music you were working on?

@LBFN
Is it possible in Milkshape to save individual "pieces" of an object - say a leg, an arm, etc. and be able to set the pivot point?

The idea is that you would model the individual limbs, or break up a complete model into the movable parts, but set their pivot (joint point) to be at (0,0,0)? If your model was in a standard T pose, you might "chop off" the lower left arm. You would position it so that the contact position where it would meet the upper arm would be at 0,0,0. In this scenario, the arm would be on the ground pointing to the left (-X) and left of (0,0,0).

Enjoy your day.
LBFN
17
Years of Service
User Offline
Joined: 7th Apr 2007
Location: USA
Posted: 3rd May 2013 05:23 Edited at: 30th Jan 2014 16:07
Quote: "Is it possible in Milkshape to save individual "pieces" of an object - say a leg, an arm, etc. and be able to set the pivot point?"

The individual pieces could be saved as separate objects; the entire mesh would have to be loaded in to Milkshape, everything except the piece you want is deleted and then you save it. The pieces could easily be moved to 0,0,0 before saving. I'm not sure it will work like you are describing, but it is worth a try. I assume you could add the objects as limbs and offset them to where they should be.

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

Attachments

Login to view attachments
Latch
17
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 3rd May 2013 18:32
That's what I was thinking. Once the animator is up and running, it would just be a matter of linking limbs (I think). Though the offset could be difficult if the pivot point isn't correct.

Though, even if an object's original pivot wasn't at (0,0,0), I think once an object is moved around in DBC, if you make a memblock out of it, it's origin (pivot) will always be at (0,0,0).

Taking this into consideration, and my vector math isn't the greatest, If we moved a limb where we visually want it to be, how do we translate the pivot we want to (0,0,0)? I think we subtract the desired position/pivot from (0,0,0), position the object there, make a mesh out of it, delete the original limb object, add a limb, and link it to the correct place in the hierarchy. Does this sound right?

Enjoy your day.
Libervurto
17
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 3rd May 2013 18:34
Quote: "Hey, did you ever finish the music you were working on?"

I didn't realise I was working on it.
Sure, I could do some more music. Do you want several tracks? Different styles? I've learned a few more tricks with my keyboard so I could redo the music I posted before.

What is the tone of this game? I'm going with over the top heavy metal crazy shoot first explode everything. Or is it going to be more sinister and scary?

The difficulty in learning is not acquiring new knowledge but relinquishing the old.
LBFN
17
Years of Service
User Offline
Joined: 7th Apr 2007
Location: USA
Posted: 4th May 2013 03:19 Edited at: 28th Jan 2014 03:12
Latch,

Quote: "Taking this into consideration, and my vector math isn't the greatest, If we moved a limb where we visually want it to be, how do we translate the pivot we want to (0,0,0)? I think we subtract the desired position/pivot from (0,0,0), position the object there, make a mesh out of it, delete the original limb object, add a limb, and link it to the correct place in the hierarchy. Does this sound right?
"


That might work, but I'm not 100% sure on it. I'm working on breaking down the farmer boy's mesh into different body parts and then saving the files as separate objects. I then plan to put it together again by adding and offsetting limbs. Then I will be able to tell how the limb rotations will act. I hadn't really thought about memblocks, but maybe that is the way to go.

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

Attachments

Login to view attachments
Latch
17
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 4th May 2013 22:47
Quote: "Quote: "Hey, did you ever finish the music you were working on?"
I didn't realise I was working on it.
"


From Obese Posted: 21st Aug 2012 22:45
Quote: "I've re-done the drums on the music. Thanks for the critiques. It's pretty shabby quality but I'll redo the whole thing when we're polishing up the game...
"


Enjoy your day.
Latch
17
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 8th Jun 2013 18:09
cant let this die...

Enjoy your day.
LBFN
17
Years of Service
User Offline
Joined: 7th Apr 2007
Location: USA
Posted: 8th Jun 2013 18:56
Hey there, Latch. I separated the farm boy's limbs into separate objects and have been working to assemble them via the ADD LIMB and LINK LIMB commands, but the results have not worked well at all. My plan is to revise the individual limb objects to see if I can figure out how to do this in a way that will work with DBC. May need your help at some point.

Also, I have been trying for sometime to even get the code to run, as I have been plagued by the 'cannot load dll' error regarding the dbcwithcoldet dll, but I was able to figure this out this morning. Yes!

So, moving forward, I see the following as a plan of attack:
1. Get the models able to animate via limb movement in realtime.
2. Get the gun working with accurate bullet (raycast) collision with static and moving objects in the game.
3. Get the tractor moving to waypoints.
4. Place people and code the AI for their movement.
5. Add polish.

So many games to code.....so little time.
BN2 Productions
20
Years of Service
User Offline
Joined: 22nd Jan 2004
Location:
Posted: 8th Jun 2013 19:37
Quote: " 2. Get the gun working with accurate bullet (raycast) collision with static and moving objects in the game."


That should all work via the bullet system I worked out a while back. Were you ever able to get it working?

@All
I'm not dead, I've just been super busy with schooling and a few other projects. I'll be available to help out again in a few weeks.

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: 11th Jun 2013 04:49 Edited at: 20th Jun 2013 04:06
Hey BN2,

Quote: "That should all work via the bullet system I worked out a while back. Were you ever able to get it working?"


No, I really haven't and don't expect I will have the time to get it to work.

PS: glad you're not dead.

So many games to code.....so little time.
LBFN
17
Years of Service
User Offline
Joined: 7th Apr 2007
Location: USA
Posted: 22nd Jun 2013 23:27 Edited at: 8th Jul 2013 05:34

Sigh....same song, different day......See ya


So many games to code.....so little time.
Latch
17
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 17th Jul 2013 08:46
Don't give up. Let's see where are we? I have the tractor moving on the waypoints. Press f1 through f6 to choose the path. That was built a while ago. LBFN has the aliens landing and moving. The shooting system hasn't gotten working.

As far as an animator, I don't I have a string of hours to sit and work on it. I can do little pieces but it takes long to do an application. I was so excited even though it took me about a month to finish a list box that could display and select limb names, it's also movable and resizable with both keyboard and mouse controls. It fact I have a whole basic GUI designed - it's 100% DBC drawing commands no outside media - just because.

I can do animations through Blender for DBC, but that cuts out anybody else that wants to do animations as there really isn't a simple, semi-intuitive tool to do hierarchical animations these days.

So, outside of animation, what do we need to get this thing rolling? Being able to shoot an alien?

Enjoy your day.
BN2 Productions
20
Years of Service
User Offline
Joined: 22nd Jan 2004
Location:
Posted: 17th Jul 2013 21:06
Quote: " The shooting system hasn't gotten working."


Can I get some information about WHAT isn't working about it? I was able to implement it, as I recall, without any trouble on my system, but since posting it I have only been told "It's not working", which, as you can imagine, is quite frustrating.

Error messages? Crashes? Anything?

Great Quote:
"Time...LINE??? Time isn't made out of lines...it is made out of circles. That is why clocks are round!" -Caboose
Libervurto
17
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 18th Jul 2013 03:02
Do you guys have a source code repository so others can have a peek and maybe add to it?

I've managed to figure out some of the problems I was having recording audio reliably, so I'm going to start making more music. Any preference on music style? How many pieces are needed?
Latch
17
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 24th Jul 2013 00:29 Edited at: 24th Jul 2013 00:32
@all

I'm taking a bit different of an approach with animating. I'm working out a "skeletal" animation system. Conceptually and with some code I have:

1. Code - The ability to plot the vertices and face centers of an object
2. Code - Use mouse drag to select the faces
3. Concept - the selected faces are assigned to a group
4. Concept - groups can be assigned to bones
5. The animation of the bones (not including the groups) I have done with other code specific to limb animation. Code and concept should be the same or very similar
6. d3drm.dll has all the vector and quaternion rotations needed to create the proper animations in a Direct X file. In fact, some past tests revealed that the way DBC animates (v 1.13 and earlier) ties back exactly to how the animations can be achieved using the quat and matrix functions in d3drm.dll

Now, to help realize some of the concepts, I need help assigning a pivot point, or a joint to a group of faces/vertices.

Lets say we have a lower arm. The joint I want would be the elbow. What I would want is to be able to position the pivot/joint in the correct position relative to the group. When the joint is rotated, I want to make sure the vertices "bend" correctly relative to this position. I'm not even talking weights (influence) yet. Just the proper positioning of the joint when the verts could be anywhere.

Any ideas on how to position this joint? Mathematically and or visually with precision.

Enjoy your day.
Fluffy Rabbit
User Banned
Posted: 25th Jul 2013 21:05
You could have a little ball that you can move around with cartesian arrows. It could partially show through the mesh you're trying to add joints to. At the same time, you could see (and set) the coordinates in some display on the screen.
Latch
17
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 25th Jul 2013 23:04
Quote: "...At the same time, you could see (and set) the coordinates in some display on the screen"

I like that idea - being able to see the axes. So, the placement of the joint would be "eyeballed" with the ability to type in the coordinates for the joint itself? If we had a group of points, how do we find the centrum? Is that just an average of each of the coordinates?

Enjoy your day.
Latch
17
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 26th Jul 2013 07:10
Here's a proof of concept: plotting the vertices. This demo takes the 3d points of an object and converts them to 2d screen coordinates. You will see a single object rotating and all of the coordinates being drawn to the screen. There is no culling, so all of the points - front and back - show.

From this test, I can tell that DBC is a little slow in calculating and plotting the vertices. A complex object with 1000's of verts would take forever so it's likely I'll have to transfer this to a dll.

The next phase will be to use the indexes of the faces to find the points specific to each face. From there a single center coordinate for each face can be calculated.

Enjoy your day.

Attachments

Login to view attachments
Latch
17
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 12th Aug 2013 22:35
update:

I'm re-writing the 3d to 2d conversion routines to a DLL. The DBC code works but it can get pretty slow depending on the number of vertices in a model. The other thing is I want to be able to cull the points that shouldn't be visible and that would just add to slowing down DBC so that code is going into the DLL as well.

I have the drawing written directly to the back buffer which is another speed up (instead of using DBC drawing commands for vertex points etc.).

Once I have the face selection working, I'll post a demo of that.

The goal again is to be able to select faces/vertices and assign them to a limb/bone/group. Then ultimately to rotate that group around a joint thus creating a skeletal animation system. I think the hard part will be selecting faces and assigning groups.

So, if this works out, then the farmer, for example, could be animated without having to have separate meshes for limbs. And this should equally apply to "limbed" objects as the same selection methods would be valid.

Enjoy your day.
Latch
17
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 3rd Sep 2013 23:43
I know, I know, multiple posts in a row... they are spaced fairly far apart and maybe it helps keep the thread alive...

Anyway, for selecting faces I'm trying something like this (psuedo code)



Anyone got any ideas for a more efficient method? The idea here is looping through all of the faces whose centers have been been converted to 2d screen coordinates. If the coordinates fall within a mouse selection box, then the state of those faces is changed to selected.

Enjoy your day.
Libervurto
17
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 11th Sep 2013 01:17
I drew lots of triangles on my whiteboard but it didn't help.
How big is the box you are checking the mouse position against?


Formerly OBese87.
Latch
17
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 12th Sep 2013 03:24
The box would be a drag box created by holding a mouse button. The idea was that if the center of a face was inside this border, it would be added to the selection list. The selection list is chosen by looping through all of the faces and testing if they are inside this drag-box.

I was wondering if there might be a more efficient method of selecting faces.

Actually, you having said something about triangles on a whiteboard made me think of something: A memblock mesh may have individual vertices per face and some vertices may share the same location but not the same index. If I select faces, then I might miss vertices that are at the same location and then during animation, that could cause gaps in the mesh.

Hmmmm. I might have to select vertices instead of faces...

Enjoy your day.
Libervurto
17
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 12th Sep 2013 12:34
Or you could make a tool to combine overlapping vertices?


Formerly OBese87.
Latch
17
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 13th Sep 2013 09:32
Well,

Here's another proof of concept. This shows the selection of vertices. I'm looping through all of the verts and highlighting the ones that are within the drag box.

It doesn't seem too bad in terms of speed. I'm using straight DBC and no DLLS for this example. Use hold the left click and drag the mouse. It will change the yellow vertices to purple if they are selected.

Quote: "Or you could make a tool to combine overlapping vertices?
"


By default, since all of the vertices are looped through, if they occupy the same space, they will be selected.

Enjoy your day.

Attachments

Login to view attachments
Silverman
17
Years of Service
User Offline
Joined: 18th Jan 2007
Location: France
Posted: 13th Sep 2013 12:36 Edited at: 13th Sep 2013 12:39
it is fast. Even when I select all vertices, the fps does not change. Maybe that to further gain speed, you can, do not display the hidden vertices (if it is compatible with your display method vertices),and therefore less vertices to loop.

DirectX 9.0c (February 2010)/ DBClassic v1.20
Latch
17
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 14th Sep 2013 03:59
Quote: "Maybe that to further gain speed, you can, do not display the hidden vertices (if it is compatible with your display method vertices),and therefore less vertices to loop."


What I was originally doing was calulcating the 2d vertices with math and the intention was to use a DLL for speed. The example above, loops through a memblock and positions an object at each vertex then uses the DBC object screen x() object screen y() instead of math.

It seems fast, but I'd have to test it with a high polygon object. If it's fast enough, it would be good to use but might make it more difficult to determine visible versus non-visible vertices.

Enjoy your day.
Ashingda 27
16
Years of Service
User Offline
Joined: 15th Feb 2008
Location:
Posted: 14th Sep 2013 21:38
Hi I would like to join this project, is it not too late? The reason I waited til now is because I had little knowledge with 3D, but now I feel I can contribute.

Latch
17
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 15th Sep 2013 18:33 Edited at: 15th Sep 2013 18:43
Hi Ashingda,

Just a reminder, this is DBC. Also, the latest entries have been more of my own indulgence - meaning not very Dark Noobish, they have been me trying to get a skeletal animation system setup. I want to create a basic editor that will export an animation file of some type that can be run on a DBC mesh. The main reason originally was so that the models LBFN was creating in Milkshape for the actual project could be rigged to animate in DBC.

As I have very little time these days, my progess on the animator has been slow. However, I have all of the concepts and in many cases actual code for various parts of it mapped out in one way or another.

If you go back several posts and probably a few pages, you can see that the original project was a simple shooter - stop the aliens from reaching the buildings - and follow the progress.

My original contribution was to create the main farm, tractor, and a system where the tractor could follow a series of waypoints and move to a new path (1-6) depending on the command issued. This was to just add a layer of interest - a farmer could ride on the flat bed being pulled by the tractor and use a heavier gun to more quickly eradicate the aliens. The challenge was he was subject to the path of the tractor and would have to give commands to the driver of which buildings to circle. This is all done.

Fluffy Rabbit created an example of using Coldet with sliding collision to move the camera/farmer around the farm and have a collision response with the buildings. Fluffy's code was a brute force approach (and brute force works! - but can be expensive) so I modeled a sliding collision routine inside the DLL that gives a nod to and expands on a couple of Fluffy's ideas. The routine is in the DLL for speed.

BN2 created a shooting system with bullets and so forth. The system hasn't been implemented yet.

LBFN's part was to handle the space ship "unloading" aliens and creating waypoints for them to get to the buildings. He was also supplying models of the people and aliens (here's where we ran into trouble with the animation). He was also putting all of the code together from the various contributors. He ran into a little trouble with BN2's shooting code.

So this is where we are - LBFN was trying to incorporate BN2's code into the game but wasn't able to. I'm still plucking away at an animation system.

One way you could help is to follow the past comments/postings in the project, load the code and try to incorporate BN2's code. I haven't looked at the model's for a while so I can't remember the details of the gun on the back of the trailer. I believe it has separate limbs for most moving parts. It can be rotated and pivoted on the stand. It is positioned mathematically as the flat bed moves around - so it is not attached. One would probably have to calculate the barrels muzzle to accurate place the start of a shot.

People have so little time these days... if you don't mind slow progress, then this project might be something of interest to you. There's enough media and code already put into it to complete. But as far as special effects or animation, that may or may not happen any time soon.

But the game could run with static models - I would animate them myself for DBC with limbs and such, but I didn't want to take anything away from other contributors, and b) Making a skeletal based animation system for DBC seemed like an interesting and fun side project - and ultimately useful, and applicable to this project.

Enjoy your day.
Ashingda 27
16
Years of Service
User Offline
Joined: 15th Feb 2008
Location:
Posted: 15th Sep 2013 21:03
Project is a simple shooter, is it 3rd person or 1st person? The project version that I can find here had a monster in 3rd person that we move around on the map, is that the latest version? If not may I get the latest version?

Camera controls are stiff, are we not suppose to be able to look up/down? Movement is currently using Up/Dn/Lf/Rt, I can also add WASD to it. Add spacekey to jump?

I can sure add try to add BN2's shooting code.

As for animation would it not be more efficient to do it in blender or so. We can just add the blender save into the source media.

Latch
17
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 16th Sep 2013 15:26
All the movement/camera control is demo. It's to test the collision.

3rd person shooter with changes to first person when needed.

I'd have to go through the posts to see which is the latest version. Version with the tractor, spaceships, and aliens running into buildings I believe is the latest.

As far as animations, in order to allow those to participate that wanted to do animations, we were trying to find a common way where they wouldn't have to give up the tools that they are used to and try and tackle a 3D package as massive as Blender.

At this stage, if you want to create some characters and animate them or break the farmer that LBFN had posted into limbs and animate those, please feel free.

I'm going to continue to work on my animation tool because hopefully, it'll be useful, and it will be a good exercise for my own learning.

So as far as helping on this project, for the game itself, you may be on your own to some degree unless LBFN or BN2 reappear. I'll turn my attention back to the actual game once I have satisfied trying to create an animator - even if I fail.

Enjoy your day.
BN2 Productions
20
Years of Service
User Offline
Joined: 22nd Jan 2004
Location:
Posted: 17th Sep 2013 01:21 Edited at: 17th Sep 2013 01:23
Quote: " So this is where we are - LBFN was trying to incorporate BN2's code into the game but wasn't able to. I'm still plucking away at an animation system."


A while back, I looked into it and seemed to have come up with a solution, though I can't remember any response being given. I was never really given an error to work with though, so there were instances of "It works on my computer but not yours" going on.

I've got a couple days of not much on my plate, I'll look into it. I've been wanting to go back and make a few improvements anyway.

Great Quote:
"Time...LINE??? Time isn't made out of lines...it is made out of circles. That is why clocks are round!" -Caboose
Ashingda 27
16
Years of Service
User Offline
Joined: 15th Feb 2008
Location:
Posted: 17th Sep 2013 01:40
Awesome, I got what I think is the latest project version. Will be looking through and see what can be added in. What do you think of swapping the farmer out for a hot chick farmer instead?

LBFN
17
Years of Service
User Offline
Joined: 7th Apr 2007
Location: USA
Posted: 17th Sep 2013 17:17
Quote: "I was never really given an error to work with though, so there were instances of "It works on my computer but not yours" going on."


It wasn't so much that it erred. It's that (in my view) it is way over complicated, so much so that I had trouble following it. It seems like it is well thought out (I mean, REALLY well thought out) and I simply didn't need all of that to make a gun that shoots and provide raycasting to the target. I didn't want bn2 to be put off because my coding style is different.

I wrote some code to make the DShK rotate flawlessly with the mouse in about 1/10 of the lines. I posted a demo of it, but no one responded.

So many games to code.....so little time.
Ashingda 27
16
Years of Service
User Offline
Joined: 15th Feb 2008
Location:
Posted: 17th Sep 2013 21:39 Edited at: 17th Sep 2013 21:43
Who is the current project manager?

I am unable to get the latest version with the aliens running around. Can someone re-post it?

[edit]
Also one thing I found useful was to remark our names with the section of codes that we contributed on. Makes it easier to ask questions later and/or give credit too.

Latch
17
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 24th Sep 2013 19:11
Quote: "Who is the current project manager?"


Not realy sure there is one. LBFN and myself have probably put the most work into it. BN2 started the idea by posting a basic 3rd person shooter on a farm.

Quote: "I am unable to get the latest version with the aliens running around. Can someone re-post it?"


I'll dig around when I get home. There are 2 versions: LBFN has a zip file of the basic game with aliens that are beamed down from a ship and running around. My version is more of the mechanics of collision testing and tractor waypoint moving.

Enjoy your day.
LBFN
17
Years of Service
User Offline
Joined: 7th Apr 2007
Location: USA
Posted: 24th Sep 2013 21:45 Edited at: 29th Sep 2013 03:51
Ashinga 27,

In my view, we have simply worked together on this project and have not named a project manager per se, though Latch has provided leadership since it's inception.

If you look at my post on 26th Jan 2013, it has a stable version of the code from my end, which should have the aliens moving around pretty nicely and you can move about with the WASD keys with mouselook. The shortcomings of the code are noted in the post. I have updated the code so that you can shoot the DShk gun using the mouse, but bullet collision / raycasting has not been implemented yet. I hoped to get this completed before it is posted and I have not been working on it much, as I got a little frustrated at the lack of response / slow development. I plan to pick it back up soon.

LB

Edit:
I have created a temporary graphic to serve as a menu for now. It will redirect you so you can:
(1) simply walk around the farm while the aliens land and move through it
(2) change your input settings : I like WASD with the mouse but maybe you want to use a joystick or the arrow keys instead
(3) fire the DShK gun : I hope to get the raycasting done this week so you can blast a few aliens out of existence. The tractor/trailer do not currently move yet.
(4) quit : I expect to trap the ESC key to where it will bring up this menu instead of quitting directly.

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

Attachments

Login to view attachments
Silverman
17
Years of Service
User Offline
Joined: 18th Jan 2007
Location: France
Posted: 27th Sep 2013 18:27 Edited at: 27th Sep 2013 18:59
Latch,

Quote: "it would be good to use but might make it more difficult to determine visible versus non-visible vertices"


I know a way to determine this, maybe it will be useful:



DirectX 9.0c (February 2010)/ DBClassic v1.20
LBFN
17
Years of Service
User Offline
Joined: 7th Apr 2007
Location: USA
Posted: 30th Sep 2013 05:29
Status update:

I have worked on all four of the items listed in my previous post - most everything is working and the menus are interactive. I have the raycasting working with coldet and it does indeed register hits on the aliens.

I have been concerned all along about gamespeed and I am still. I am getting 23-25 fps in the game on my well-equipped computer. I do not have the farmer standing there firing the DShK, the gun moves alone without anyone pulling the trigger. The aliens are not animated, which will take processor time also.

If anyone is interested, I can probably finish up on this tomorrow and am willing to put it in a .rar file or provide a link to a download so you can try it out and see what you think.

So many games to code.....so little time.
Latch
17
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 30th Sep 2013 10:23
@LBFN
I'd be very interested to see what you've got.

As far as the speed. Have you tried locating the bottle neck by turning off different things?

@Silverman
Thank you. I was doing something similar. I was debating between using the 'nullobject' to find the 2d coordinates, or calculating them all with code. My original intention was to put everything in a DLL and do all of the calculations there - including the drawing of the 2d points to the backbuffer. Then I tried the null object thing and it didn't seem too bad speed wise. If I were to go as far as calculating the cross product and dot product to cull the non visible points, then I should probably just do it all in DLL.

Enjoy your day.
LBFN
17
Years of Service
User Offline
Joined: 7th Apr 2007
Location: USA
Posted: 30th Sep 2013 17:33 Edited at: 30th Sep 2013 18:55
Latch,

I hope to have it ready later on today; I am currently trying to finish it up. Right now, I am just deleting the aliens when you shoot them and then it lets you know you got one via a text message.

I did not find a way in Coldet to simply turn off the collision object for the aliens once they are shot. I really don't want to delete the collision object, as they are re-used. As an alternative, I figured to move them far away, so collision will never take place. If you have any ideas they would be welcome.

As far as speed goes, I tried using a total of 40 aliens instead of 50 and it ran 5-8 FPS faster. I'm thinking we could even lower it further than that and still have a decent pace. I plan to check the time on each routine and see if there is anything that is a bottleneck.

EDIT:
I turned global collision off and am getting 30-33 FPS. Framerate is set at 35, so I guess we can revisit this when we start moving the tractor.

Does anyone know what the frim# and the gettime() function are about? I don't see where they are actually used.


So many games to code.....so little time.
Latch
17
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 1st Oct 2013 02:04 Edited at: 1st Oct 2013 02:08
@LBFN,

Collision should be per object. It shouldn't be global - I'm also not sure what those functions are (frim# and gettime()) without seeing the code. Are you using the collision methods I set up in the goblin example running around on the farm? The ones from Fluffy Rabitts call a lot of collision checks.

Also, get rid of the sky dome. Last I remember it was a very bad graphic and it will eat tons of FPS.

There are rotation checks that calculate the the distance one revolution of a tractor wheel would take and then a calculation to figure out movement distance per iteration - but I'd again have to look at the code.

I remember a slow down when facing towards the house at certain angles. I'm guessing it has something to do with the multilayered tectureing and light mapping. The rendering may be slow there for DBC. There are several objects overlayed with the house - in fact in the entire farm scene - but if I recall, the house has the most. That's why collision has to be very specific and select. We only need collision set forthose objects that will be collided with, not the objects used for shadowing or detail.

It could be a huge rewrite, but we don't need to use Coldet. We could use sparky's. Actually, we could use DBC's static collision which is very fast because it only uses non-rotating boxes. I actually have an editor designed to add static collision boxes to a scene. It's not the easiest thing on earth to use, but it gets the job done.

Enjoy your day.
LBFN
17
Years of Service
User Offline
Joined: 7th Apr 2007
Location: USA
Posted: 1st Oct 2013 02:34
Quote: "Collision should be per object. It shouldn't be global"

I know, that's why I turned it off. Even though we are not using DBC's collision commands, I thought somehow it might make a difference if I turned it off - don't ask me why, but it definitely does make a difference. With it enabled, the DShK routine ran at 23-29 FPS, with it disabled, it runs at 30-33.

Quote: " I'm also not sure what those functions are (frim# and gettime())
"


They appeared at some point in the code. I assume the intent was to maintain a constant framerate. frim# is a variable that only appears in the main repeat/until loop and in the gettime() function. I plan to delete them. I believe you stated at one point that DBC's sync rate does a decent job in and of itself, plus we are purposely running at a lower framerate to make sure it runs on most computers.

Quote: "Are you using the collision methods I set up in the goblin example running around on the farm? The ones from Fluffy Rabitts call a lot of collision checks."


Not sure which ones are Fluffy's. For the 'walkthrough' part of the code where the goblin moves around the farm, it uses coldetSlidingCollision2 and subsequently the sliding x/y/z collision checks to get the placement values.

For the aliens, I use coldetSphereObjectCollision combined with coldetSlidingCollision2. I remember that it was necessary to use both, but I don't remember all of the details.

Quote: "We only need collision set for those objects that will be collided with, not the objects used for shadowing or detail."


Yep, agreed. I believe your code to setup the farm object's collision is intact. I have added more objects to it, but have not altered it.

Quote: "
It could be a huge rewrite, but we don't need to use Coldet. "


A little surprised to hear that. I like Coldet, actually. How do we know it would be worth it to switch? We could go through all of the effort just to find that Coldet is just as fast.

My thought is to get the tractor moving and let's see what the framerate does.

I have installed the code to use a joystick to control the DShK, but it stinks in comparison to using the mouse. I am just about ready to post it up.

So many games to code.....so little time.
Latch
17
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 1st Oct 2013 03:33 Edited at: 1st Oct 2013 03:34
Quote: "A little surprised to hear that. I like Coldet, actually. How do we know it would be worth it to switch? We could go through all of the effort just to find that Coldet is just as fast"

I thought you meant coldet global collision not DBC global collision for the bottleneck. I remember running into a similar problem where I didn't have any collision at all and somehow the frame rates were being devoured. It was the same thing - I had to trun off the DBC collision.

Quote: "For the aliens, I use coldetSphereObjectCollision combined with coldetSlidingCollision2. I remember that it was necessary to use both, but I don't remember all of the details."


That sounds right.

Quote: " ...assume the intent was to maintain a constant framerate. frim# is a variable that only appears in the main repeat/until loop and in the gettime() function."

I'm not all knowledgable but because we can't control the framerate of the DBC engine itself, the only reliable way is with sync in my opinion. The sync actually controls the number of iterations per second in which a syns is called. If you have a sync within a Do Loop, it'll run at N sync times per second. The actual redraw is always based on the graphics adapter speed that's why you don't see tearing in DBC even at 900 fps. Unfortunately with Windows systems above windows 98, the sync seems to be tied to a "lowest common denominator" LCD refresh rate. It'll usually fall around 25, 50, 60, and 100 unless windows media is played. Somehow that frees the sync from the monitor back to the iterations. So if we load and loop an mp3 file or a midi file as MUSIC (not sound), the frame rate lock is broken.

When we try to control the frame rate by increasing the distance moved or the angle rotated by an object per iteration if the frame rate falls below a certain level, the results are poor when that level is not met. I'm still waiting to see a good example where this actually works well. It may be ok if it fills in on an occasional frame drop, but if your game looks good and is designed for 40 FPS, it will not run well if the computer can only maintain 25 fps. There I go, off on a rant...

Enjoy your day.

Login to post a reply

Server time is: 2024-04-24 21:33:43
Your offset time is: 2024-04-24 21:33:43