Submit
2068b9d739ccb5184d90f2ab0d217051
0
jbhargav1992 102 Feb 04, 2014 at 04:57

OK… I think this is the more ideal method as it uses the concept of bounding box and gives the accuracy close to pixel perfect collisions. Thank you for your suggestion. I have one doubt, though… How would I go about creating collision polygons for my sprites? Please clarify this for me.

Thanks.

In response to Call of Duty is dead?
1766067da5ff92962fb82e5b1f63a2a4
0
tyree 102 Feb 03, 2014 at 18:48

the problem is gun games in general. for the most part their mindless, the gun does all the work. makes it too easy to kill. you need a weapon that forces players to kill in some way other than shooting. build a game where you can destroy the opponents gun instead of killing them. forcing them to get another gun by whatever means

Adfa6cf87d3749a0e1acd928285b3f23
0
WDR 106 Feb 03, 2014 at 04:44

Come on, guys! Please help! :-(

D08b0a4acfcc7da7d9dd15715c42445c
2
Dim_Yimma_H 104 Feb 02, 2014 at 18:18

Maybe you would not prefer pixel perfect detection, in the end, there are easier methods. Try the bounding box collision detection first and see if it’s enough.

bool Box::Overlaps(Box another)
{
  if (bottom > another.top && top < another.bottom) //i.e. if the boxes overlap vertically
  {
    if (right > another.left && left < another.right)
      return true;	//and the boxes overlap horizontally too
  }
  return false;
}

If you have near rectangular sprites like humans, cars, tiles, it’s usually easy to specify the box left,top,bottom, right sides so they feel pixel perfect upon overlap detection.

B5262118b588a5a420230bfbef4a2cdf
1
Stainless 151 Feb 01, 2014 at 11:13

Or use polygon collision.

It takes a lot of work to create the collision polygons, you have to write an app to edit your sprite sequences and create a collision polygon for each frame, but you can make it as complex as you want.

I have in the past created collision polygons for individual body parts so I could do location based reactions.

In response to Call of Duty is dead?
B5262118b588a5a420230bfbef4a2cdf
0
Stainless 151 Feb 01, 2014 at 10:02

@Reedbeta Yes, that sounds about right. I have heard of people having their xbox live accounts suspended for three months because of the voice comms. I never hear any of that because I always mute everyone.

@fireside I’ve thought about it a bit more. I would probably have different game modes. At the moment COD has modes like team death match and blitz. I would have modes that allowed the arseholes to run around like ants and modes for people who want a more strategic game.

@TheNut The problem with genetics is evolution. At the moment if you plotted IQ against number of children, you would find a peak around the 75 IQ level. There are whole towns in the UK whose main income comes from the government in the form of child support. Need more money, have another kid.

Luckily I will be dead before it becomes a major problem.

B9c51b24b655b8afcf9f399049e57f52
2
geekymonkey 103 Feb 01, 2014 at 08:14

Pixel perfect is expensive, so limit when you do it. Do bounding box collision detection first. If that passes, then start pixel perfect detection of the 2 sprites.

loop over all the pixels of one sprite. is the texture there not transparent? If so, calculate the screen position (or world position) of the center of that pixel. Taking into account position, rotation, scale. using that screen position, find the corresponding pixel in the 2nd sprite. If its within the bounds of that sprite, then get the texture pixel. If its not transparent, you have a hit!

Do it simply as above. Create a test scene with oddly shaped sprites spinning or that you can move around. Have them change colors when collision is detected.

once you get that working, then think of ways to optimize things. Exit your loops on the first hit found. Limit the math in the loops to simple adding and multplying by precalculating delta vales for the pixel to next pixel location calculation. You want what’s inside the nested loop to be as quick as possible.

In response to Call of Duty is dead?
6837d514b487de395be51432d9cdd078
0
TheNut 179 Feb 01, 2014 at 06:05

If everybody were intelligent, we wouldn’t still be living in a class based society where 1% of the richest people own 65x as much as the poorest half of the world. It’s genetics man. Can’t fight the gene. Just be thankful you have the good traits and it’s not you running out getting shot every time and scratching your head :)

If you ok with MMO games, I’d recommend PlanetSide 2. Find a couple mates, form a platoon, and have a crazy good time. I didn’t think the net code was bad, it seemed pretty fair. Tanks, vtols, infantry, max units, and so many great battles (if you have the right crew of course!). I use to chill with a few mates and we commanded legions. It was really something to organize 30 tanks, a dozen aerial fighters, guarding waypoints, assaulting fortresses. Good times, intelligent people.

In response to Call of Duty is dead?
A638aa42130293f319eda7fa4ba121f4
0
fireside 141 Feb 01, 2014 at 00:53

I would think you would want zones of players that are beginners up to experts so people play others close to their level, but I suppose then friends couldn’t play on each other’s team. Another thing I would do, would be leave bodies for quite a while, so it’s obvious if someone is lurking and shooting people coming out of an exit. I’d also leave alternatives and make it very hard to hide completely without being seen. Myself, I played Doom for a few hours and kind of got tired of it and that was pretty much it for me and shooters.

In response to Call of Duty is dead?
A8433b04cb41dd57113740b779f61acb
2
Reedbeta 167 Jan 31, 2014 at 19:09

It’s gotten pretty bad. I was just talking to my cousin the other day and she was getting sexually harassed by 6 of the 8 players in her DotA match. And just yesterday, a guy at EA who I follow on Twitter almost shut down his account because he was getting a stream of abuse from a bunch of morons who were pissed off about something or other. COD players seem to be the worst of the bunch - there have been multiple stories on the gaming press sites about them going on insane rants or bombarding people with threats and flames because someone said something they didn’t like.

I don’t think games make people go on shooting sprees or anything like that, but I have to think that games like COD, that are basically about shooting people in the head as many times as you can, are going to bring out the worst in certain people. If you have a pre-existing tendency to be an idiot asshole, it will feed that. And there’s usually no consequences for bad behavior.

In response to reply on Delta Time vs. Frame Rate
Adfa6cf87d3749a0e1acd928285b3f23
1
WDR 106 Jan 31, 2014 at 16:22

Thanks a lot, guys! All of you… Thank you very much! I haven’t got a perfect solution and the animation is very crude. I am still trying to figure it out for myself and fine tune it. Nevertheless, I really appreciate all your help and inputs. If I have any further problems, I shall definitely ask. Thank you. :-)

In response to reply on Delta Time vs. Frame Rate
Adfa6cf87d3749a0e1acd928285b3f23
0
WDR 106 Jan 31, 2014 at 16:22

Thanks a lot, guys! All of you… Thank you very much! I haven’t got a perfect solution and the animation is very crude. I am still trying to figure it out for myself and fine tune it. Nevertheless, I really appreciate all your help and inputs. If I have any further problems, I shall definitely ask. Thank you. :-)

194653f6bf54cad70a7cf97e6b7f35a4
0
benrawlesmusic 101 Jan 31, 2014 at 11:45

Working on some music and sound design for two new short films!

In response to Spare time thoughts
B5262118b588a5a420230bfbef4a2cdf
0
Stainless 151 Jan 31, 2014 at 09:46

Getting out of town for a while sounds nice, but it’s not practical. When you go away you spend more, a lot more, and the wife works.

I despise blender, it’s the user interface. I use max when I have to or tools like Anim8or for quick jobs.

Maybe writing a useful tool might be an option. I find texturing a nightmare. Maybe a tool to help with that.

In response to Spare time thoughts
B20d81438814b6ba7da7ff8eb502d039
0
Vilem_Otte 117 Jan 31, 2014 at 00:49

I’m too much into business, I’d grab some contract ;)

In response to Spare time thoughts
A638aa42130293f319eda7fa4ba121f4
0
fireside 141 Jan 30, 2014 at 23:21

I’m always in spare time mode. For one month, that’s a fairly short game for me, I’m slow and don’t like to be pressured. I’d probably just do some experiments or learn a new tool, or learn more of an existing one like Blender.

In response to Spare time thoughts
A8433b04cb41dd57113740b779f61acb
1
Reedbeta 167 Jan 30, 2014 at 21:23

If I had a month off I’d probably get out of town for a few days, maybe go to the coast or to a national park or something, and just decompress for awhile.

Then I’d spend the rest of the time working on hobby projects. Not just coding stuff, but I’d do some writing and play some music too. Maybe even catch up on some games that I’ve bought but not actually played.

For me at least, free time is more valuable than some extra spending money. :)

In response to Skwerm
Fd80f81596aa1cf809ceb1c2077e190b
0
rouncer 104 Jan 30, 2014 at 07:06

games great.

In response to Skwerm
A5d26b45a2a9759f204049b64bfda0ba
0
wakka 104 Jan 30, 2014 at 06:52

I like the idea.

You should increase the difficulty quickly. I played for about 1 minute and difficulty didn’t change. For such a type of game, I think a beginner should be able to play at max 30 seconds until he dies.

Fd80f81596aa1cf809ceb1c2077e190b
0
rouncer 104 Jan 28, 2014 at 17:17

https://www.youtube.com/watch?v=Lmr9xrRPX-Q

Fd80f81596aa1cf809ceb1c2077e190b
0
rouncer 104 Jan 28, 2014 at 16:16

its not that exciting, im just forming pixel coincidences, then spitting them back out, im hoping i get some strange interactive playback, i tell it everything it knows, but what it does with it, could be the funny thing. :)

Fd80f81596aa1cf809ceb1c2077e190b
0
rouncer 104 Jan 28, 2014 at 16:14

(HTM, as a form of spacial compression, and frame search engine)

my reason for developing, is im trying to work out a way of storing a video game in synapse weights.

take the eye, and form coincident pixel groups. sometimes your not gonna get more than 2, because theres just no reoccurance, but limiting it to max 2 is wrong also, because later groups can only use the groups youve made here, and if there was a 3 coincidence and you didnt get it, the only way you could approximate it is by collecting the groups of 2 which included it, so theres an extra pixel taken in for the group, and its not exclusive, what i call it at the moment. for groups of 2 is ((eyexeyey)(eyexeyey))/2-(eyexeyey), (make it a cube if you want groups of 3, insane isnt it) so i dont think wed be collapsing in any hurry, in fact only by losing virtually all of the whole, could you record any of it… especially since it would expand the same way each time.

Hawkins may be right, when he shows you the piramid scheme, because for it, the later levels are all sparsely activated, and are all on or off, nothing inbetween, and hes implementing temporal compression (pooling) and if it had all those things, then maybe it could reduce, but against, is the fact that however many cells in the final region is basicly how many wholes you have in a purely spacial system with no stochastic nature (mag-tech)

sometimes you wont get a group, but its still important to at least grab the one, every cell needed to get the reconstruction working, even if its just one. (but hopefully this doesnt come up that much, because a 1 group, isnt a group, its just a pass up.)

its insane trying to do it, its really hard, trying to use a threshold activation to do it, is kinda hard, all ive got now is the motion coming back with lots of false positives, and im not sure whats causing it. but the frames are storing separately, and are all retrievable, in the mag-tech network.

i imagine once i get it working, (dynamic alotting of synapse connections is MANDATORY for a realtime system, being on gpu is no exception) youd be able to have the eye one side, and motor and functional detections other side, then it forms coincidences of them, and this i guess will give you the novel playback of the internals.

if it doesnt do anything interesting, well, you could try adding stochastism (which is the same as kinda greyscale all the way up, checking frequencies of fires) and then im stuck, but i cant even get 1 hidden layer working yet, and you wouldnt want to even attempt another level when there is noise in it, because it would totally destroy it coming back out if it was enough collections.

so, as i see it, you either probablisticly compress time (hinton) or you record sequence (hawkins) and whats better???? hmm yeh.

In response to reply on Delta Time vs. Frame Rate
A638aa42130293f319eda7fa4ba121f4
1
fireside 141 Jan 27, 2014 at 17:21

Yes, like Stainless says, you only want to test it once or so, because if you are using text every iteration, that would slow your game way down. It would be better to keep the times in an array and print them out after so long or something. Or even better, just keep a running average of the frame time and print it out when it closes.

In response to A voxel renderer
40fd50c8665e5b5f4233e4c0587a9d47
0
17_Gen_r 105 Jan 27, 2014 at 12:18

One is, of a certainty, astonished at the apparent disinterest of the Internet in trying to understand how that which said Internet so much criticizes does work. Except for Russians, nobody seems to pursue the reverse engineering of UD. This is made all the more uncanny by there being a soon to be published patent: is there some evil design, forcing the mass of mediocre programmers/Carmack worshipers to go the parallel octree raycasting route, impractical except on GPUs? UD is a /, * & float-free serial (non-parallel) volume renderer. Such features should be compelling to reasonable men in view of the fact that one can no longer do inelegant programming on pollutant GPUs in impunity.

A novel volume renderer: Take a pyramid P (quadtree) & a cube C (octree), the latter can be not included in the former. Octasect C, building a front-to-back list of cubes while rejecting those cubes that are disjoint from P, until a subcube C’ is included in P. Descend the quadtree pyramid P until pyramid is black, a leaf or C’ is included in no pyramid quadrant (i.e., C’ spans subpyramids), call the reached pyramid P’. If P’ is not black then if P’ is a leaf, paint the corresponding viewport rectangle with the color of C’ & update the pyramid quadtree to reflect the blackening of P’. Otherwise, for each quadrant P’i of P, if P’i is not black then apply this whole procedure to P’i & C’.

Should be implemented shortly.

In response to reply on Delta Time vs. Frame Rate
B5262118b588a5a420230bfbef4a2cdf
1
Stainless 151 Jan 27, 2014 at 09:27

Be aware that text output can be incredibly slow.

Using printf for example in visual studio can take up to 120 mS. This seems to be something to do with windows display update code, I’ve never really tried to track it down, but that’s my gut feeling.

One trick you could try is using a floating accumulator. This is very simple and stops frame skip by varying the time each frame is displayed.

sprite.time += time_delta;
if (sprite.time>sprite.rate)
{
      sprite.time-=sprite.rate;
      sprite.frame++;
      if (sprite.frame>sprite.frames)
         sprite.frame=0;
}

Using this system you will never skip frames, but the amount of time any frame of animation is displayed for can vary.

Welcome to DevMaster, a community-driven game development website of posts and resources!

Recent Tags

indie × 5
game-development × 5
ios × 3
android × 3
algorithm × 1
effects × 1
physics × 1
iphone × 1
c# × 1
mobile × 1
physics-engines × 1
native × 1
macos × 1
sound × 1
music × 1
networking × 1
testing × 1
multiplayer × 1
design-patterns × 1
game-programming × 1
3d-engine × 1
shaders × 1
cross-platform × 1
gaming × 1
game-industry × 1