Post

 Resources 

Console

Home | Profile | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 VBGamer
 VBGamer
 Come ride the Bullet Dodger Hijack Experience
 New Topic  Topic Locked
 Printer Friendly
Previous Page
Author Previous Topic Topic Next Topic
Page: of 5

2dcoder
Knave

83 Posts

Posted - May 05 2005 :  08:23:42 AM  Show Profile
You couldn't let it rest eh? :) LOL.. Again the whole asteroids control issue is moot, don't make me code a full out demo to set the record straight. I really don't want to, but if I have to...

"It could make a big "jump" in movement. If you're doing ray hit collisions, then even the delta has to factored with it else you end up going over a wall, say."

IF your using ray hit collisions, but that is a WHOLE nother tutorial. I could go on and on and list a bunch of "exceptions". But for every point I make you seemed determined to point out a more elaborate situation which would OFCOURSE require other lines of thinking and programming. But it's all doable in a time based situation. Again, I think you're "brick walled" into thinking a certain way, perhaps even making things harder on yourself that it needs to be.

"to factored with it else you end up going over a wall.."

Nope, just cap your delta at a "worse case scenario" level so it never goes past a certain value. What I have done in the past is cap it so the delta never exceeds a value larger than what would occur at 15fps. Then if the computer does slow down past 15fps, EVERYTHING slows down. Cheating? OFCOURSE! But it stops dead in it's tracks, the possiblity of the delta being so big that objects miss their collision checks.

"But it is when you subject your program to stress tests or a slow program."

Ofcourse, anyone coding time based applications better run their apps at 15,20,30,60 etc frame rates to make sure everything is working.

Go to Top of Page

hotrodx
Squire

43 Posts

Posted - May 05 2005 :  10:00:57 AM  Show Profile
"Nope, just cap your delta at a "worse case scenario" level so it never goes past a certain value. What I have done in the past is cap it so the delta never exceeds a value larger than what would occur at 15fps. Then if the computer does slow down past 15fps, EVERYTHING slows down. Cheating? OFCOURSE! But it stops dead in it's tracks, the possiblity of the delta being so big that objects miss their collision checks."

Then it's settled. Your time based computations CANNOT guarantee that an object will reach a particular point in a period of time. ;)
Go to Top of Page

2dcoder
Knave

83 Posts

Posted - May 05 2005 :  5:41:42 PM  Show Profile
"Your time based computations CANNOT guarantee..."

Dude, are we brain surgeons or game programmers? There's an accetable margin of error in our profession, not the latter. ;)
Go to Top of Page

hotrodx
Squire

43 Posts

Posted - May 05 2005 :  5:48:51 PM  Show Profile
But you said:

"No offense, but it doesn't sound like you quite grasp the coding of time based applications. The fact that the delta is "fluctuating" is ofcourse expected, that's why this just represents a "scaled" value in time which you multiply your movement by. In and that respect **how long it takes to get from point a to point b would be the same regardless of the frame rate.**" (emphasis added)
Go to Top of Page

2dcoder
Knave

83 Posts

Posted - May 06 2005 :  08:42:12 AM  Show Profile
!@#$% Are you trying to pick a byte? :) I still stand by the assumption that you're either very green when it comes to time based movement or you're coding some amazing version of Space Harrier 3D that requires precise surgeon like movements based on cycles. Either way, you've managed to turn every thing I've said into a braniac debate where precise perfection is the only alternative. The code I supplied will indeed allow you to launch a missle and it will take almost exactly (sure it might be off by a few ms) the same time to move across the screen regardless of frame rate. If I wanted it to land perfectly on a destination x,y I would just stop moving it and lock it to the x,y destination when it either = or goes past the location. This is free space time based movement. If I wanted more precise movement, to the point of exactness, I would use predefined tables and move through the tables via a counter manipulated by time delta. And that concludes 2DCoder's crash course on Time Based Movement. It only scratches the surface, sure, but it's the basics of coding a time based project. Good luck with your projects.
Go to Top of Page

DeaDb0Lt
Squire

USA
20 Posts

Posted - May 06 2005 :  10:14:10 AM  Show Profile  Visit DeaDb0Lt's Homepage  Send DeaDb0Lt an AOL message
hotrodx:
If only there was really that much feedback in this thread on the supposed "topic".

If this were GTA, the cops would be chasing all your asses... :)

Nothing to see here folks! Lets move along....

Go to Top of Page

hotrodx
Squire

43 Posts

Posted - May 06 2005 :  10:34:16 AM  Show Profile
DeaDbOLt,

And have you heard about that problem about time-based ...

Oops. Just kidding! I kinda like to get as many wanted stars in GTA, then get the friggin' tank code to blast all dem cops to bits.

With regards to your game, how about changing the sprite into Neo, then agent's appear out of nowhere the fire hail of bullets at you. If Neo's cornered, he can do the Matrix Move (you know, the one where he bends back and does a backstroke). But he can only do that 3 times, although there'd be bonus evasion moves every now and then.
Go to Top of Page

2dcoder
Knave

83 Posts

Posted - May 06 2005 :  4:47:12 PM  Show Profile
Getting back on topic. :) I see you've posted this project on just about every known forum on the internet. I think it's time to "finish this and move on". You've taken this simple excersize in programming to it's EXTREME. What's next, net play? :)

Your skills are at a point where you should code, space invaders, pacman, tetris, etc. I disagree with others who suggest DirectX. I think you should stick to using BitBlt and code some other projects so you can learn more about collision detection, object moving, tile maps, etc. You're well on your way to becoming a decent coder, but if you don't "get out while you can" from this dodge the sprite project, you'll be stuck at this junction for quite some time. Good luck!
Go to Top of Page

DeaDb0Lt
Squire

USA
20 Posts

Posted - May 07 2005 :  11:13:56 AM  Show Profile  Visit DeaDb0Lt's Homepage  Send DeaDb0Lt an AOL message
I havent taken it to the EXTREME... :P

When I work on something, I like to be satisfied with the end result. And if I can get others satisfied somehow, then I like to at least try. I think that game is (IMHO) more fun to play than Solitaire when boredom strikes. Its not anything spectacular, but even the simplest of games need some kind of replay value to them, and if not polished, then replay wont exist. So here I am, asking a VB oriented audience if my game is worthy of being played, and if they think it even has any replay value.

This project started out of boredom during a COBOL class. (yuck) I decided to turn it into something just for fun and for learning sake. I took VB in highschool, and here I am....8 years later being forced to take it again for my major in college. It gets pretty boring in class when all the material is old news. So, here I am creating new news for myself. I'm sure sometime in the future I'll be back here with some other little game I made out of boredom, asking for feedback. :)

PS: Only posted on 3 sites, and wouldnt have done so here if someone didnt suggest I do so. I'm not THAT desperate. :P
Go to Top of Page

2dcoder
Knave

83 Posts

Posted - May 07 2005 :  6:40:40 PM  Show Profile
Wait a sec, my post made it seem like I was dogging you. Quite the opposite, I think you have skills in the forming stage. But ALOT of coders new to game coding (that's you) will drain resources and work on the same thing for quite some time. You have done this. I've seen your game in several forms, you've read the comments, you know it's a cute, fun little project. But be DONE with it and move on to the next. Let it go. Sure you can make better graphics (and you did!) , but this project would be just as fun with x's and o's. So I say it's time to challenge your brain again, taking the new things you've learned from this project and creating something else. BUT and this IS very important, the reason I can tell you have skills is because you actually FINISHED the project. So many young (new) coders will start a project and NEVER finish it. Learning how to finish a project, regardless how bad or good the project is, is HUGELY important as other programmers here will tell you. So congrats on a project well done, file it away in the "finished" folder and move on to something else. And please don't let it be "Bullet Dodger 2" ;) .
Go to Top of Page
Page: of 5 Previous Topic Topic Next Topic  
Previous Page
 New Topic  Topic Locked
 Printer Friendly
Jump To:
VBGamer © Go To Top Of Page
This page was generated in 0.12 seconds. Snitz Forums 2000

Copyright © 2002 - 2004 Eric Coleman, Peter Kuchnio , et. al.