Jump to content
  • Advertisement

MirekCz

Member
  • Content Count

    252
  • Joined

  • Last visited

Community Reputation

132 Neutral

About MirekCz

  • Rank
    Member
  1. MirekCz

    image recognition in cell phones

    check newlc.com ->forums ->graphics.. topic discussed there recently. You can get raw data for every created/loaded bitmap and manipulate it like will in C++/ASM just like on desktop computers (I'm talking about symbian based cellphones)
  2. or stick with C++ and be surprised how much you can do with it. check out www.idreams.pl and their skyforce game.. lovely graphics with dozens and dozens of alpha-blended objects on screen. There are also 3d games etc. Great possibilities. Only 3d hardware acceleration is missing
  3. Sending every frame is a waste (and it won't work well anyway as you need to work usually with ping around 100ms mark) There's an old paper on gamasutra regarding "while internet sucks" and describing how they did network play in the "x vs tie fighters" game (or what's the name) You need to take into considerations few facts: 1.Lags (usually between 50 and 150ms, sometimes getting up to as much as 300ms, anything more is hardly playable in action games) 2.Packets lost (some UDP packets may simple never arrive - and yes, you have to use UDP packets as TCP packets might take minutes to arrive. One other thing to keep in mind is that UDP packets might arrive out of order. So packet 10 might come earlier then packet 9) The best way for you I think would be to write a system which would "guess" future player movements. In short if you get information that player 1 moved left from position x at time y you assume he goes left as long as you don't get new info. Eventually once you get info that says something different (at pos x2, time y2, player went up) you modify player's position to pos x2 + the movement up he already made (in currenttime-y2 time) Many games use this (or similar) system - Quake for example. (that's why with high lags you see ppl dissapear and show up somewhere else) A good idea (taken from the gamasutra paper) is to send the old packet with the new packet. This way if one packet gets lost (which could contain action info regarding placing bomb) you still get all data across. It doesn't work anymore when you lose few packets (one after another). At this time you have to check packet numer and compare it with the last packet that arrived (so if current packet nr is 500 and last packet was 495 you obviously missed some info and need to resend it). Because bomberman is a small game and operates on small map you might get away with simply sending ALL information across in each packet. If you can pack it into small data chunk (like 50 bytes) you will be fine and you won't need to resend missed data. In such a packet you should put: 1.info about all bombs on map (and their placement time - so you know when they go BUMMmm) 2.Info about players position and their movement direction (so you can "predict" their position well for a short time) Only problem here might appear when player gets "disconnected" from game for a longer time then it takes a bomb to explode (as he would never learn about it and program wouldn't update game map with missing walls etc). You could simple make a rule that if someone is disconnected from game for more then 1sec he dies - not very elegant solution thru :) About update, you should update: 1.As soon as player changes movement direction or places a bomb (so enemies learn as fast as possible about it) 2.From time to time (like 100ms, so you know that the other player is still connected). If you send an "immediate" packet (point 1) simple reset the timer to count 100ms again. If your packets are small (around 50bytes) you will be able to send many of them each second even on a 33.6modem. Bandwitch shouldn't be your problem. (unless you plan to make a bomberman game for more then few players, in such a case it's more difficult and you need to think about a server/client implementation)
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!