Thursday, May 31, 2012

Massive Battlefield 3 update goes live June 4-5

We are very happy to present the contents of our next Battlefield 3 game update! This is a big one, rolling out June 4-5. Read on for the full details, including a solution to the M26 dart issue, reduced suppression, and the introduction of colorblind support on console.

The next Battlefield 3 update goes live June 4-5 on all formats. As usual, the period between the last update and this upcoming one has been spent listening to our community, tweaking parameters, balancing performance, and eliminating issues that we have found with your help. In short, the June update will make sure Battlefield 3 plays even better.

The full June update change list is featured below. Changes are valid across all platforms (PC, PlayStation3, and Xbox 360) unless stated otherwise. The schedule for this update is:
PC and Xbox 360 worldwide: June 4th
PlayStation 3 in Japan/Asia: June 5th
PlayStation 3 in all other regions: June 4th

How to download the June update on your platform
PC: As soon as you start your Origin client, the latest game update will automatically start downloading (unless you’ve disabled the option “Automatically keep my games up to date”, in which case it will start downloading when you try to run the game). In Battlelog, you will be notified from the Game Manager. Once you acknowledge the update, it will start downloading within the Origin client.

PlayStation 3: When you start the game, you will be prompted that there is an update available. To continue, you must accept the update, which will install automatically.

Xbox 360: You will be prompted there is an update available. If you accept it, it will download. If you do not accept it at this time, you can find it manually in the in-game store or on Xbox Live Marketplace, named Multiplayer Update 3. If you do not locate it manually this way, you will be prompted again the next time you start the game.

Before we dive into the full change list, we would like to focus on a few of the biggest additions in this update. Let us know what you think in the comments section below.

M26 dart situation resolved
Some of you have noticed lately how a certain loadout has been overpowered. When the M26 Lightweight Shotgun System was mounted under an assault rifle with a heavy barrel, the M26 would accidentally fire assault rifle bullets instead of shotgun pellets. This is fixed in the June update.

Somewhat reduced suppression effect
Since the last update, there has been an interesting debate on the increased suppression effect we introduced. While a lot of players like the increased effect and the possibilities it introduced, some players felt suppression was becoming too powerful. Now, we are dialing the suppression effect back a notch. It will still be higher than it was prior to any of our patches. Let us know what you think of this tweak.

Adding symbol for custom server rules (console)

The "§" makes it easier to spot servers running custom rules.

We know a lot of you want to know whether a server you're about to join is running extreme custom rules (such as setting the ticket count to max, leading to marathon games). By adding a "§" symbol in the console server browser, we make it quicker and easier for you to make an informed decision on where to join and where not to.

The "§" (see image above) signifies a server running custom rules. Note that this can still be either a Ranked or Unranked server, as some rule changes will turn a server Unranked, while some (such as ticket counts) do not affect the server's Ranked status.

We are not enforcing this symbol. Instead, the "§" is a manual optional flag you can set if you are a server admin and want players to know you are running custom rules. We hope this will make it easier for server admins to get the right players flocking to their servers, while players will more easily find the type of gaming experience they prefer. Let us know what you think.

Colorblind support (console)

No more accidental team kills! Click for full size.

Earlier, we introduced colorblind support for PC players. We are now very happy to extend this to console players as well. After installing the June update, you will find an option to turn colorblind support on in the options menu. This will affect the colors of HUD symbols to more clearly differentiate teams. You can see above what this will look like.

Improved VTOL fighter jet (F35) performance
Based on community feedback, we have improved the performance of the F35 in Back to Karkand to better match that of the SU35, particularly when it comes to turning speed.

FULL JUNE (“MULTIPLAYER UPDATE 3″) CHANGE LIST BELOW
Vehicle related changes

> Tweaked the F35 handling to more closely resemble that of the SU35 (see above).
> Jet & helicopter ECM Jammer should now deflect missiles more reliably when it is active.
> Fixed an issue where vehicles wouldn't spawn if their intended space was occupied by a deployable gadget. The vehicle will now spawn as intended and the gadget will be destroyed in the process.
> Fixed AA missiles not doing damage to vehicles moving at very high speeds.
> Reduced the direct damage from unguided Javelins to require better side hits for a 1 hit disable. This was previously too forgiving and easy to accomplish.
> Removed the direct damage from aircraft launched guided missiles. Players will need to have laser designated targets for full effectiveness.
> Adjusted the helicopter rockets to their original prepatch damage value against armored vehicles. This is a reduction; a revert of a knock on effect that was introduced accidentally.
> Fixed the US Tank Guided Shell doing the reverse damage values when guided and unguided.
> Adjusted the M224 mortar damage against vehicles. Some tweaks and adjustments in a previous update accidentally increased its effectiveness greater than intended.
> Increased the range on the AA guns so they can reach vehicles hovering at the maximum height in select maps.
> Replaced the VDV buggy on Gulf of Oman (Back to Karkand) with the DPV buggy for both teams at the City flag.
> Fixed a bug where some vehicle unlocks were still enabled after the player left the vehicle.

Soldier and gadget related changes
> Reduced the inaccuracy added when in suppression. There is still an enhanced suppression compared to the initial state in the game, but the effect is now less than it was in the last patch (see above).
> Reduced input lag for gamepads/joysticks on all platforms. Aiming as a soldier when using a gamepad or joystick should now be more responsive.
> Tweaked the deploy times on gadgets to be faster to deploy in high stress combat situations.
> Greatly improved the responsiveness when deploying a bipod when going prone and shortly after moving.  The bipod deploy should no longer abort if the player deploys the bipod immediately after stopping.
> Fixed bug where you couldn't deploy the mortar anywhere on Grand Bazaar.
> When changing the accessories of a weapon in the Customize screen, the weapon previously selected in the Deploy screen will now automatically be selected when entering the Accessories screen.
> Increased the effectiveness of the Aim Assist at close range. Testing in Close Quarters proved our current assist to be inadequate in tight quarters. This is a global change, and will improve the effectiveness of Aim Assist for all modes and maps. Aim Assist over distance is still significantly less effective. This is console only, as Aim Assist is not present on PC. If you prefer, you can also turn it off on console.
> Players will now spawn on the Radio Beacon looking in the same direction the Beacon is facing. The Beacon always faces in the direction the player is facing when it is planted. Previously the Beacon's direction had no impact on the player's spawn direction.
> The Spawn Preview camera on the Spawn Beacon has been updated to better reflect the direction the player will be looking when he spawns.
> 40mm smoke now stays longer again.
> Tweaked some tracers on sniper rounds to have better visibility at range (the tracers are smaller).
> Tweaked the flashlight so it is less blinding at the edge of the screen.
> Fixed bug where you couldn't pick up your deployed gadgets after being revived.

Weapons related changes
> Fixed a bug where Heavy Barrels and Underslung Shotguns could be over powered. (This is the so called M26 dart issue, see above)
> All semi-automatic sniper rifles now properly have shorter range when using a suppressor.
> The L96 now properly shoots where the iron sights are aimed. The position was previously offset.
> The SKS now has the proper damage values when using a suppressor. The damage was previously too low at close range.
> Slightly reduced the suppression effect of SKS rounds.
> Decreased the long range damage of the SKS to highlight its close to medium range role.
> Slightly decreased the foregrip aimed accuracy penalty on the M4A1 to bring it in line with other guns.
> Slightly increased the foregrip aimed accuracy penalty on the SCAR-H to bring it in line with other guns.
> Reduced some of the vertical recoil and zoomed accuracy penalties added to the FAMAS in the previous update.
> F2000 foregrip accuracy penalty reduced and recoil reduction bonus increased.
> AEK971 foregrip recoil reduction bonus increased.
> SG553 foregrip recoil reduction bonus increased.
> FAMAS foregrip recoil reduction bonus increased.
> Fixed the M416's M26 with Flechettes not having a name in the kill log.
> Fixed so all clip based LMGs have Extended Mags as an available unlock.
> All semi-automatic shotguns now fire at 220rpm. There was previously simply a small difference between them, whereas now they have different pellet counts instead of rates of fire.
> Improved the recoil and accuracy of the M26 to match the 870.
> Reduced the impact suppression has on shotguns. Shotguns are still affected by Suppression but it should no longer significantly impact their accuracy from the hip as it previously did.
> The 870's pump speed has been increased slightly from 0.55 seconds to 0.48 seconds. The empty reload time for the 870 has also been reduced slightly.
> Improved the accuracy of aimed shotguns when on the move.
> The Saiga's recoil has been reduced.
> The M1014 now fires 10 projectiles. The other semi auto shotguns have 9 pellets, and since the M1014 has a lower mag size and a slower reload it now fires 10 pellets to give it some edge.
> The USAS-12 now fires 7 projectiles.
> The MK3A1 now fires 8 projectiles.
> Fixed so the weapon's fire mode is saved between spawns.

Miscellaneous changes
> Added colorblind option for consoles (see above).
> Added colorblind icon for squad leader (all formats).
> Added the option for console server admins to show a symbol in the server browser signifying custom rules are in effect (see above).
> Fixed an issue where footsteps couldn't be heard behind you.
> Fixed so that the arming of an M-COM station will not be cancelled if you look at a dropped weapon.
> Fixed exploit where you could teleport to the AA gun on carriers by firing an EOD bot at its door.
> Fixed co-op ammo HUD not showing on first enter.
> Fixed so you get prompted if you really want to switch team when pressing the Switch team button.
> Fixed so that Assignments are being correctly sorted on the My Soldier\Assignments screen.
> Fixed issue with commorose not working on soldiers in vehicles (PC).
> Added blinking capture point icons in the 3D HUD, and added blinking neutral icons in objectives bar.
> Composed a more informative error message for when a console player attempts to rent a server in a location where there are currently no servers available.
> Fix for dog tag icons in the My Soldier/Assignments screen appearing slightly stretched.
> Fixed some tracers appearing behind the soldier or vehicle that fired them.
> Potential random audio crash fix.

[DICE] H Brun 31 May, 2012


-
Source: http://blogs.battlefield.com/2012/05/bf3-june-update-announce/
--
Manage subscription | Powered by rssforward.com

Monday, May 28, 2012

5/29 The Beat - An Electronic Arts Blog - EA

     
    The Beat - An Electronic Arts Blog - EA    
   
Get 50% Off All Long Weekend Long
May 25, 2012 at 6:00 AM
 

Cook hot dogs outdoors … or roast Geth indoors? With half off hit games like Mass Effect 3, there are more ways than ever to enjoy your extended weekend. 

   
     
 
This email was sent to game@tlogoadi.com.
Delivered by Feed My Inbox
PO Box 682532 Franklin, TN 37068
Create Account
Unsubscribe Here Feed My Inbox
 
     

5/28 UGO.com - Latest Stories

     
    UGO.com - Latest Stories    
   
Transformers: The Ride 3D Video Gallery
May 25, 2012 at 11:03 PM
 
TF the ride

The Transformers movies are cinematic thrill-rides that only the combined might of Michael Bay and Steven Spielberg could gift the world. Universal Studios Hollywood has captured some of that spectacle and unleashed Transformers: The Ride 3D!

   
     
 
This email was sent to game@tlogoadi.com.
Delivered by Feed My Inbox
PO Box 682532 Franklin, TN 37068
Create Account
Unsubscribe Here Feed My Inbox
 
     

5/28 Recent Questions - Game Development - Stack Exchange

     
    Recent Questions - Game Development - Stack Exchange    
   
Can't run Nvidia PracticalPSM sample in debug mode
May 28, 2012 at 1:47 PM
 

I want to add PSM (Prespective shadow map) to my engine but I have problems with that. I think the problem is somewhere in my math code so I want debug Nvidia PracticalPSM sample and compare the math result in the sample and in my engine so maybe I could find the bug

When I want to compile the sample with VS2005 I get some linker error with DXUT functions maybe it is due to that the static lib DXUT.lib that included is compiled with VS2003 and dose not work probably with VS2005 then I added DXUT source codes from SDK 9.5 to the solution and the sample compiles this time.

When I hit F5 to run the sample it complains about nv_nvb.dll but only release version of nv_nvb.dll is included in the sample and I copied that to debug folder when the program starts it crashes in NVBscene9.cpp line 283.

I don't know why it crashes here.

you can download the sample code from here

   
   
Is there a way to convert a Maya 2013 project down to 2012?
May 28, 2012 at 12:35 PM
 

I stupidly opened one of my maya 2012 projects in 2013 (I installed the trial a while ago. usually i'll open up maya 2012 and open the file from there, but today I double clicked the .mb). Is there a way to convert the 2013 file down to 2012 or have I lost a few hours work?

I tried manually changing the version number with a hex editor but there's definately inconsistencies between versions as half my stuff doesn't show up.

Thanks

   
   
Multiplayer Game Data Serialization Problems
May 28, 2012 at 12:23 PM
 

I want to create a simple game that can be played with one to two player. I plan on using TCP sockets, Farseer Physics, XNA, a BinaryFormater and a Memorystream.

as far as i know i can't do the physics on both clients, or you'll end up with everything out of sync. So my Idea was to do the physics on the host side then send the Farseer World data to the other client, however it is un-serializable and I also realized this was a lot of data to send every tick.

I could just send the players movements back to the server and send a Texture2D to the client to be drawn, however a Texture2D is un-serializable as well. it has dawned on me i must be doing this completely wrong.

But this is how i am attempting to send the data:

[Serializable()] class ServerData {     public Texture2D Test;      public Vector2 Test2; }      static void SendData()     {         byte[] DataBuffer = null;          MemoryStream stream = new MemoryStream();         BinaryFormatter formatter = new BinaryFormatter();         NetworkStream netStream = PlayerOneSocket.GetStream();          ServerData ServerDataToSend = new ServerData();          formatter.Serialize(stream, ServerDataToSend);         DataBuffer = stream.ToArray();         netStream.Write(DataBuffer, 0, DataBuffer.Length);         netStream.Flush();     } 

what am i doing wrong or how do i do it right.

I've done basic server stuff before with custom classes and serialization, I'm just at a loss on how to make a multiplayer game.

Thanks for the help

   
   
One-way platforms in UDK
May 28, 2012 at 11:14 AM
 

I'm looking to make a multi-player platforming game using UDK. I'm currently doing feasibility research, to make sure I will reasonably be able to do all of the technical things I want to do. The first major hurdle I've come across without being able to find as answer, are one-way platforms.

That is to say, platforms through which a player can jump up, but not fall through (unless they choose to). These are commonly seen in games like Mario, Kirby and Smash Bros.

Does anyone know how such a system would work within UDK? I can think of solutions that might work for single-player, but not multi.

   
   
Best way to calculate unit deaths in browser game combat?
May 28, 2012 at 9:36 AM
 

My browser game's combat system is written and functioning well. It's written in PHP and uses a SQL database. I am, however, a little worried about how I'm calculating unit deaths when one player attacks another.

Right now I simply calculate

(Attack Power * Quantity of Attackers) / Defending Unit HP = Deaths 

So, for example if I have: 500 attackers with 50 AP vs 1000 defenders with 100 HP = 250 deaths

I wonder if this isn't too simple of a calculation and my unit deaths seem a little too high. Before I go trying to re-balance by adding more HP to units, I wonder if I need to change this formula. Possibly consider unit quantities more to spread the damage around? I.e. it takes 2 hits to kill a defender there, so some of them are dead and some of them are 50% damaged?

How would I accomplish that w/o tracking every individual unit's stats OR is there a better way?

   
   
Linear movement over a Bézier curve
May 28, 2012 at 7:22 AM
 

Is it possible to get a constant speed movement over a Bézier curve when its points are not kept symmetrical ?

Here white square (almost) moves at constant speed. (red and green squares are control points) enter image description here

Here travel time is much longer in the green part than in the red part. (control points moved) enter image description here

Curve generation and white square movement is defined as follows :

    public void Update(...)     {         // White square movement                 _timeline += 0.01f;         if (_timeline >= 1.0f)         {             _timeline = 0.01f;         }         _timelineVector2 = GetBezierPoint(_timeline, _p0, _p1, _p2, _p3);     }      // Also used for generating curve     public static Vector2 GetBezierPoint(float t, Vector2 p0, Vector2 p1, Vector2 p2, Vector2 p3)     {         float cx = 3 * (p1.X - p0.X);         float cy = 3 * (p1.Y - p0.Y);          float bx = 3 * (p2.X - p1.X) - cx;         float by = 3 * (p2.Y - p1.Y) - cy;          float ax = p3.X - p0.X - cx - bx;         float ay = p3.Y - p0.Y - cy - @by;          float Cube = t * t * t;         float Square = t * t;          float resX = (ax * Cube) + (bx * Square) + (cx * t) + p0.X;         float resY = (ay * Cube) + (@by * Square) + (cy * t) + p0.Y;          return new Vector2(resX, resY);     } 
   
   
Score vs. Kills in a casual game
May 28, 2012 at 7:08 AM
 

I am making a simple phone game and having a conceptual argument with my partner. The argument might end up being inconsequential, but I would like to hear some opinions from actual devs who are making games.

This will be a pretty standard beat-em-up style game where you beat up lots of easy enemies and build up a huge kill count. There will be many different types of enemies. The question emerged when we had to put up some display on the UI.

Should the kill count be represented as a 1:1 number? For example, on your HUD, it will constantly show:

Kills: 15

--or--

Defeated: 31

Or, should it be represented by a score? For example: 1 enemy = 100 points and it will display something like this:

Score: 1200

This may be a matter of taste in the end. But, for the casual games market, what do you think a mainstream audience will enjoy more? I think people love big numbers, in general, what do you guys think?

   
   
Converting designs from photoshop/flash/after effects into code
May 28, 2012 at 6:28 AM
 

I work as part of a two person team, I am the developer and my partner is the designer. We are currently having great difficulty working out the best way to convert his work into the actual app. We prototype all our animation in either Flash or After Effects and then I implement it into the actual application.

The implementation is not a problem, but converting the information is what we are struggling to do efficiently. We have tried making large story boards that show the change in position/scale/rotation and the time for each of these tweens but they are time consuming to make. Currently I am running an After Effects trial and just dissecting the info straight from his design but my trial will run out soon.

Just wondering if anyone can shed some light on how they do it or what is the standard practice in the industry?

Thanks

   
   
Tool for editing sprites contour pixel alpha value
May 28, 2012 at 5:54 AM
 

I have seen that most games uses sprites that have a transparent contour, that is, the pixels that belongs to the contour of the object in the WxW sprite image is below 255. It is not perfectly opaque, so that when you render it on screen, you avoid aliasing effects.

Is there a tool that automatically loads N .png sprites and process them in order to make their contours semi-transparent?

   
   
Drawing a String in XNA looks ugly when the text is moving
May 28, 2012 at 4:45 AM
 

I'm drawing a name above the player's head in a 2D top down view game. The code to draw the string looks like this:

Vector2 textPos = new Vector2((positionX * 2 * world.Map.TileWidth + (16 - (world.ScreenManager.SmallFont.MeasureString(mName).X / 2))), (positionY * 2 * world.Map.TileWidth - 32));  spriteBatch.DrawString(world.ScreenManager.SmallFont, mName, textPos, Color.White, 0, Vector2.Zero, 1, SpriteEffects.None, 1); 

The text is drawn to the position right above the player's head just fine, and it follows the player as he moves just fine as well. But the problem is that when the player moves, the text kind of gets thicker and ugly. I tried screen capping it but the screenshot doesn't capture the problem (because it's just taking a single frame, I presume).

Anyways, does anyone have an idea of what I could do to fix this? Thanks.

   
   
Cannot figure how to plan a Matryoshka themed game
May 28, 2012 at 4:19 AM
 

Me and my partner are planning to write a Matryoshka themed game (http://en.wikipedia.org/wiki/Matryoshka_doll).

It will be a side-scroller/platformer and the main idea is that the character will be able to change her size (with at least 4 or 5 sizes) to fit into small areas.

Until now I made a few side scrollers using the tile technique, using a matrix of Tile objects. But since the new game need to be able to block the passage of the character in cretin situations, what approach should I take?

I had a few ideas in mind, like making the the smallest possible doll the size of a single tile, but I'm afraid that it will limit the size of the sprites.

What would you do?

   
   
Server Client position information exchanging
May 28, 2012 at 2:08 AM
 

I am doing small game in xna client/server, there can be 50f per seconds, but i don't belive that each client has to sent 50 mesagges about only their position, and then get back from server, regular ping is 50ms so even if 20 messages per second then success, so how it is made that everyone see immediately that someone else changed its position?

   
   
Sorting objects before rendering
May 28, 2012 at 1:35 AM
 

I'm trying to implement a scene graph and in all the articles i've come across there is talk about object sorting. So you'd sort your objects by "material" for example. Now untill i sat down and started implementing it, i kind of took this for granted, because it made sense. But now i'm wondering what does sorting actually change?

In my engine, i have a manager for UBOs, i use those to store data that'll be shared between programs, at the moment that only involves time, camera and projection matrices and lights (i'm not worrying about managing which lights affect which objects ATM).

Now for each model i have to change the model to world matrix uniform, no sorting is going to change that. So is the jump from changing this matrix to also setting a material for each object that bad?

I vaguely remember reading somewhere that each time you change something in the pipeline, it has to get flushed and that can cause performance issues. But for each drawing call i'm setting up a model to world matrix anyway, so what sense does it make to ever be concerned about this?

BTW is there any information about whether changing a uniform and calling glBufferSubData is more (or less) expensive.

   
   
as3 flash game: How to stop gotoAndPlay('label') from looping?
May 27, 2012 at 11:36 PM
 

I'm working on a flash game with a main character who helps people around town. It's moveable with the arrow keys because of a function called keyPressed();

When the main character hitTests with a person and you press spacebar the person should gotoAndPlay a label within itself. This works great, but because I've put these if statements in the keyPressed function, everytime the main character moves (keyPressed) the label plays from the beginning. I understand why this is happening but my question to you is:

It went great so far but now I realize I have a lot of if statements and they all are in the keyPressed function. This causes my problem (the looping of the gotoAndPlay) and I'm pretty sure this will cause more trouble in the future. I should use more functions, but where and when do I use these to accomplish my goal?

More info: I'm coding on the timeline (F9), maincharacter = char, client = the person wich label should go to 'leaving'

var clients:int = 0; var orders:int = 0;  var delivery:int = 0; var hodling:int = 0;    var isRight:Boolean=false; var isLeft:Boolean=false; var isUp:Boolean=false; var isSpace:Boolean=false; var isDown:Boolean=false; var speed:Number = 3;  var mazeRect:Rectangle = bounds.getBounds(this); var charRect:Rectangle = char.getBounds(this); var boundsBmpData = new BitmapData(mazeRect.width, mazeRect.height, true, 0); var charBmpData = new BitmapData(charRect.width, charRect.height, true, 0);  boundsBmpData.draw(bounds); charBmpData.draw(char);   stage.addEventListener(KeyboardEvent.KEY_DOWN, keyPressed); stage.addEventListener(KeyboardEvent.KEY_UP, keyReleased); stage.addEventListener(Event.ENTER_FRAME, moving);        function keyPressed(event:KeyboardEvent):void          {              if(event.keyCode==39){              isRight=true              char.gotoAndStop('right')}              if(event.keyCode==37){              isLeft=true              char.gotoAndStop('left')}              if(event.keyCode==38){              isUp=true              char.gotoAndStop('up')}              if(event.keyCode==40){              isDown=true              char.gotoAndStop('down')}              if(event.keyCode==32){              isSpace=true              }             if(char.hitTestObject(order) && isSpace == true && orders <3)      {      orders++ ;      }      if(char.hitTestObject(orderz) && isSpace == true && orders > 0 && holding <3 )             { orders--;             holding++;}             if(char.hitTestObject(order2) && isSpace == true && orders > 0)             { orders--;             holding++;}             if(char.hitTestObject(order3) && isSpace == true && orders > 0)             { orders--;             holding++;}              if (char.hitTestObject(client) && client.currentLabel == 'seated' && isSpace == true && holding>0){     delivery++;   }               if( char.hitTestObject(order) && isSpace == true && orders == 1){                 orderz.gotoAndPlay('one')             }             if( char.hitTestObject(order) && isSpace == true && orders == 2){                 order2.gotoAndPlay('two')             }             if( char.hitTestObject(order) && isSpace == true && orders == 3){                 order3.gotoAndPlay('three')              }             if( char.hitTestObject(orderz) && isSpace == true){                 orderz.gotoAndPlay('zero')             }             if( char.hitTestObject(order2) && isSpace == true ){                 order2.gotoAndPlay('zero')              }             if( char.hitTestObject(order3) && isSpace == true ){                 order3.gotoAndPlay('zero')             }             if (counterDisplay.text == ('3') && delivery == 3)         {         served ++;         //trace("ready");         client.gotoAndPlay('leaving');         }         if (counterDisplay.text == ('2') && delivery == 2 )         {         served ++;         //trace("ready");         client.gotoAndPlay('leaving');         }          if (counterDisplay.text == ('1') && delivery == 1 )         {         served ++;         client.gotoAndPlay('leaving');         }          if ( served == 1)         {         trace("ready");         }           }       function keyReleased(event:KeyboardEvent)         {              if(event.keyCode==39){              isRight=false}              if(event.keyCode==37){              isLeft=false}              if(event.keyCode==38){              isUp=false}              if(event.keyCode==40){              isDown=false}               if(event.keyCode==32){              isSpace=false}         }       function moving(e: Event): void         {               var newx: Number = char.x - (isLeft ? speed : 0) + (isRight ? speed : 0);               var newy: Number = char.y - (isUp ? speed : 0) + (isDown ? speed : 0);               if(!boundsBmpData.hitTest(new Point(bounds.x, bounds.y),                                         255,                                         charBmpData,                                         new Point(newx, newy),                                         255))               {                  char.x = newx;                  char.y = newy;               }           } 
   
   
Randomly generated track
May 27, 2012 at 7:47 PM
 

I would like to create randomly generated track from one point to another with specified length of that track (it can be 2 more or less as a result of that function) in matrix. I have function called buildRoad(x,y,length) where x is width of my matrix and y is the height.

I separately generate start and end point.

I have to do it as a stack by use of Vector class, so every point is connected to each other horizontally or vertically (e.g. (0,1)->(0,2)->(1,2)).

And here is the point that I really don't know how to do: I don't know how to connect start and end with such a track. Track cannot cross. It would be easy, but it needs to be random. I've already made easiest and shortest route to the end and I tried to implement some kind of probability of choosing (randomly) direction where track will go on next step.

But when track turn into corner (because it can) it's dead end and I should try to build track again.. And it can fail again and again.

If someone could help me, it would be great. I just need an idea how to solve it.

   
   
Selling Android apps from Latvia? or should I just put banners?
May 27, 2012 at 5:17 PM
 

I am in Latvia ( which is not supported to sell apps at android market ), so I am thinking about the best way of monetizing my app. So far I've come up with such options:

  1. somehow imitate that I am from a supported country, get a bank account there, etc.

  2. use PayPal for in-app purchases. The player get, say, first 10 levels for free, but then is asked to pay 0.99$ for the rest of the game.

    downsides: player might not feel comfortable entering his paypal details into an app. also android market might not really like that.

  3. making the app free and get money from advertising... let's do some calculation here, say, I get 1m free downloads, each user during his playtime would see 10 banners, therefor 10m / 1000 * 0.3 = gives roughly 33k$ ( if we use adMob with their 0.3$ per 1000 impressions ). On the other hand, if we use paypal in app purchase, we need a 3% or more conversion rate to beat this... hmm...

What do you think about all this?

Thanks!

edit: from what I just read all over the net, it looks like advertisers will change their eCPM price a lot without you understanding why... while using in-app paypal purchase you can at least somehow monitor the cashflow.

   
   
Where to start if I want to be a game (AI & 3D) programmer? [closed]
May 27, 2012 at 5:04 PM
 

This question might have been asked a lot of times earlier too, but after an intensive Google search I landed in a no-man's-land. So I am here to ask this.

I have a great interest in programming with C++ and I have even made a lot of university projects in C++. But now I want to start as an indie game developer but I don't know where to start. A lot of questions are arising in my mind and few of which are - Should I learn graphics API's first like OpenGL or Direct3D or should I start with some game programming book which covers both? Or rather I should start with a Game Engine like unity? (I don't want to be a game designer though)

Please provide me your suggestions or links to guides, tuts or whatever reference is available in this regard. My main target is to create games for PC's.

   
   
Where to start if I want to be a game (AI & 3D) programmer?
May 27, 2012 at 5:04 PM
 

This question might have been asked a lot of times earlier too, but after an intensive Google search I landed in a no-man's-land. So I am here to ask this.

I have a great interest in programming with C++ and I have even made a lot of university projects in C++. But now I want to start as an indie game developer but I don't know where to start. A lot of questions are arising in my mind and few of which are - Should I learn graphics API's first like OpenGL or Direct3D or should I start with some game programming book which covers both? Or rather I should start with a Game Engine like unity? (I don't want to be a game designer though)

Please provide me your suggestions or links to guides, tuts or whatever reference is available in this regard. My main target is to create games for PC's.

   
   
SDL for 3D game programming?
May 27, 2012 at 4:39 PM
 

I have been studying SDL for a few weeks and I have succeeded in making a 2D Ping-Pong game, but I want to get started in 3D development, and I'd like to know if SDL is capable (and suitable) for 3D game development, or I must use OpenGL(And where can I find some good tutorials for it)?

   
   
2D Tile-based Collision Detection
May 27, 2012 at 4:06 PM
 

I've been planning an indie game project for a while now. I'll summarise it for you so I can get right to the question.

It's done entirely using the latest version of XNA through Visual Studio. Hoping to put it on 360 and PC, but am only really looking for a PC-oriented solution at this stage.

It's a 2D side-scrolling shooter (think Metroidvania-style, or even Terraria). It will eventually include an in-game map editor with maps being tile-based (16x16). There will be upwards and downwards scrolling. I'm hoping to implement tile layers in the dev map editor (reason for a dev map editor is it's going to be heavily leaning towards a content-focus, so there will be a lot of maps).

Physical tiles will be very simple with only two major types. Block tiles, which are just a solid tile, and angled tiles, which are tiles with an incline that characters can walk on. I'm strongly considering abandoning angled tiles entirely, but not sure yet.

The character/NPC movement will be simple. Moving side-to-side, jumping, falling, flying (with appropriate items/situations), teleporting. All very static, no dynamic physics necessary. Only basic gravity. When a character steps off the edge of a tile, it falls. When it jumps and a tile is above it, it stops short and falls back down. When it reaches a protruding tile/wall, it can't move further unless it jumps over or flies. All the basic stuff.

Projectiles can be affected by gravity as well, and some situations may arise where a projectile may be manipulated mid-flight, but nothing requiring heavy physics. Some projectiles will move characters as well (think a simple "pushing" mechanic).

So here's the question: I'm at the stage where I'm starting to work on movement and collision-detection but I just can't set myself on a way to go about them. I need ways to determine when character, tiles, and projectiles collide. Given what I've said about the style I'm going for and the tile-based system I'm using, can I get some recommendations+links to some tried and true collision detection methods others have used in similar situations, and maybe an example of a game using a similar approach? What I need more than anything else is inspiration.

And just a quick note, I have several years of experience as a programmer, so I'm not a total newbie :)

   
   
How does having the Debugger change the game execution on an XBOX 360?
May 27, 2012 at 2:38 PM
 

So I thought my issue was relating to the difference between a Debug and a Release build as per this question: What's the difference between a "Release" Xbox 360 build and a "Debug" one? but I've since found that if I go ahead and build a Creators Club version of the game using a Debug build and deploy to the XBOX, I get the same experience I had with the Release version of my game.

However if I run the game from Visual Studio using F5 and having set the XBOX as the default platform, then the game runs as expected. If I change from Debug to Release and run with CTRL+F5 then the game also works as expected.

How would running the game with the debugger attached change the results I am getting in game? Is there any way that I can use the same approach or change the default compilation of the game so that I can use this approach to release my game?

   
   
Orthographic Camera Zooming
May 27, 2012 at 11:28 AM
 

In XNA I am using a spritebatch to render a board. I have created a camera class which can provide me a view and projection matrix. Currently I am supplying the view matrix to my sprite batch when I call begin.

I can get the view matrix to correctly move everything around and do some zooming in and out. My problem is that I want to zoom in on a specific point (for now the center of the screen) but currently zooming just zooms in on the coordinate 0,0.

Here is how I am constructing the view matrix;

        _ViewMatrix =             Matrix.CreateTranslation(                 new Vector3(                     (-_Position.X + _Width * _Zoom / 2),                     (-_Position.Y + _Height * _Zoom / 2),                     0) ) *             Matrix.CreateScale(new Vector3(_Zoom, _Zoom, 1)); 

How could this be altered to make it scale correctly relative to the given point. Later I will probably want to zoom to the mouse position, but if someone has a simple example I'm sure I can work out how to adapt it.

   
   
Map a fbx model between 2 VertexPositionColor Positions
May 27, 2012 at 11:19 AM
 

I have created a VertexPositionColor position and drew it in the XNA like this

VertexPositionColor[] backbone; backbone = new VertexPositionColor[2];  backbone[0].Position = new Vector3(0, 22, 0); backbone[0].Color = Color.Black; backbone[1].Position = new Vector3(0, 10, 0); backbone[1].Color = Color.Black; 

In the draw method

graphics.GraphicsDevice.DrawUserPrimitives<VertexPositionColor>(PrimitiveType.LineList, backbone, 0, 1); 

My question is, is it possible to map a 3d bone (Model exported as fbx) to these coordinates. or is there a much easier way to achieve this.

enter image description here

   
   
How to iterate through a list of enemies and display results?
May 27, 2012 at 9:30 AM
 

I'm making an turnbased RPG and I wanted to add a traditional multiple enemy system where a user could attack different enemies when it's there turn. I started by making a list of everybody who is going to attack and having that as the turn order. My question is how do I go through that list, and for every enemy that attacks display the damage they did and wait for the user input to continue to the next enemy.

Getting it to process all the attacks is easy, but a computer will do it in milliseconds and I need it to wait for the user input to continue.

I have started the following code:

for (int i = 0; i < turnOrder.Count; i++) {      if (turnOrder[i].isMonster)      {           ProcessEnemyChoice(enemyToAttack);      }      else if (turnOrder[i].isMonster == false)      {           ProcessUserChoice(enemyToAttack);      }      //enemyToAttack is assigned as a the enemy the user selected } 

I tried a do-while loop but that stopped my program from doing any updating, which makes sense. I'm at a loss here and any input from the geniuses here would be much appreciated.

   
   
XNA: Rotating Bones
May 27, 2012 at 7:50 AM
 

XNA 4.0

I am trying to learn how to rotate bones on a very simple tank model I made in Cinema 4D.

It is rigged by 3 bones, Root -> Main -> Turret -> Barrel

I have binded all of the objects to the bones so that all translations/rotations work as planned in C4D. I exported it as .fbx

I based my test project after: http://create.msdn.com/en-US/education/catalog/sample/simple_animation

I can build successfully with no errors but all the rotations I try to do to my bones have no effect. I can transform my Root successfully using below but the bone transforms have no effect:

myModel.Root.Transform = world;  Matrix turretRotation = Matrix.CreateRotationY(MathHelper.ToRadians(37)); Matrix barrelRotation = Matrix.CreateRotationX(barrelRotationValue);  MainBone.Transform = MainTransform; TurretBone.Transform = turretRotation * TurretTransform; BarrelBone.Transform = barrelRotation * BarrelTransform; 

I am wondering if my model is just not right or something important I am missing in the code.

Here is my Game1.cs

using System; using System.Collections.Generic; using System.Linq; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Audio; using Microsoft.Xna.Framework.Content; using Microsoft.Xna.Framework.GamerServices; using Microsoft.Xna.Framework.Graphics; using Microsoft.Xna.Framework.Input; using Microsoft.Xna.Framework.Media;  namespace ModelTesting {     /// <summary>     /// This is the main type for your game     /// </summary>     public class Game1 : Microsoft.Xna.Framework.Game     {         GraphicsDeviceManager graphics;         SpriteBatch spriteBatch;          float aspectRatio;          Tank myModel;          public Game1()         {             graphics = new GraphicsDeviceManager(this);             Content.RootDirectory = "Content";         }          /// <summary>         /// Allows the game to perform any initialization it needs to before starting to run.         /// This is where it can query for any required services and load any non-graphic         /// related content.  Calling base.Initialize will enumerate through any components         /// and initialize them as well.         /// </summary>         protected override void Initialize()         {             // TODO: Add your initialization logic here             myModel = new Tank();              base.Initialize();         }          /// <summary>         /// LoadContent will be called once per game and is the place to load         /// all of your content.         /// </summary>         protected override void LoadContent()         {             // Create a new SpriteBatch, which can be used to draw textures.             spriteBatch = new SpriteBatch(GraphicsDevice);              // TODO: use this.Content to load your game content here             myModel.Load(Content);             aspectRatio = graphics.GraphicsDevice.Viewport.AspectRatio;         }          /// <summary>         /// UnloadContent will be called once per game and is the place to unload         /// all content.         /// </summary>         protected override void UnloadContent()         {             // TODO: Unload any non ContentManager content here         }          /// <summary>         /// Allows the game to run logic such as updating the world,         /// checking for collisions, gathering input, and playing audio.         /// </summary>         /// <param name="gameTime">Provides a snapshot of timing values.</param>         protected override void Update(GameTime gameTime)         {             // Allows the game to exit             if (GamePad.GetState(PlayerIndex.One).Buttons.Back == ButtonState.Pressed)                 this.Exit();              // TODO: Add your update logic here             float time = (float)gameTime.TotalGameTime.TotalSeconds;              // Move the pieces             /*             myModel.TurretRotation = (float)Math.Sin(time * 0.333f) * 1.25f;             myModel.BarrelRotation = (float)Math.Sin(time * 0.25f) * 0.333f - 0.333f;             */              base.Update(gameTime);         }            /// <summary>         /// This is called when the game should draw itself.         /// </summary>         /// <param name="gameTime">Provides a snapshot of timing values.</param>         protected override void Draw(GameTime gameTime)         {             GraphicsDevice.Clear(Color.CornflowerBlue);              // Calculate the camera matrices.             float time = (float)gameTime.TotalGameTime.TotalSeconds;              Matrix rotation = Matrix.CreateRotationY(MathHelper.ToRadians(45));              Matrix view = Matrix.CreateLookAt(new Vector3(2000, 500, 0),                                               new Vector3(0, 150, 0),                                               Vector3.Up);              Matrix projection = Matrix.CreatePerspectiveFieldOfView(MathHelper.PiOver4,                                                                     graphics.GraphicsDevice.Viewport.AspectRatio,                                                                     10,                                                                     10000);              // TODO: Add your drawing code here             myModel.Draw(rotation, view, projection);              base.Draw(gameTime);         }         } } 

And here is my tank class:

using System; using System.Collections.Generic; using System.Linq; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Audio; using Microsoft.Xna.Framework.Content; using Microsoft.Xna.Framework.GamerServices; using Microsoft.Xna.Framework.Graphics; using Microsoft.Xna.Framework.Input; using Microsoft.Xna.Framework.Media;  namespace ModelTesting {      public class Tank     {         Model myModel;          // Array holding all the bone transform matrices for the entire model.         // We could just allocate this locally inside the Draw method, but it         // is more efficient to reuse a single array, as this avoids creating         // unnecessary garbage.         public Matrix[] boneTransforms;          // Shortcut references to the bones that we are going to animate.         // We could just look these up inside the Draw method, but it is more         // efficient to do the lookups while loading and cache the results.         ModelBone MainBone;         ModelBone TurretBone;         ModelBone BarrelBone;          // Store the original transform matrix for each animating bone.         Matrix MainTransform;         Matrix TurretTransform;         Matrix BarrelTransform;          // current animation positions         float turretRotationValue;         float barrelRotationValue;          /// <summary>         /// Gets or sets the turret rotation amount.         /// </summary>         public float TurretRotation         {             get { return turretRotationValue; }             set { turretRotationValue = value; }         }          /// <summary>         /// Gets or sets the barrel rotation amount.         /// </summary>         public float BarrelRotation         {             get { return barrelRotationValue; }             set { barrelRotationValue = value; }         }           /// <summary>         /// Load the model         /// </summary>         public void Load(ContentManager Content)         {             // TODO: use this.Content to load your game content here             myModel = Content.Load<Model>("Models\\simple_tank02");              MainBone = myModel.Bones["Main"];             TurretBone = myModel.Bones["Turret"];             BarrelBone = myModel.Bones["Barrel"];              MainTransform = MainBone.Transform;             TurretTransform = TurretBone.Transform;             BarrelTransform = BarrelBone.Transform;              // Allocate the transform matrix array.             boneTransforms = new Matrix[myModel.Bones.Count];         }           public void Draw(Matrix world, Matrix view, Matrix projection)         {             myModel.Root.Transform = world;              Matrix turretRotation = Matrix.CreateRotationY(MathHelper.ToRadians(37));             Matrix barrelRotation = Matrix.CreateRotationX(barrelRotationValue);              MainBone.Transform = MainTransform;             TurretBone.Transform = turretRotation * TurretTransform;             BarrelBone.Transform = barrelRotation * BarrelTransform;              myModel.CopyAbsoluteBoneTransformsTo(boneTransforms);              // Draw the model, a model can have multiple meshes, so loop             foreach (ModelMesh mesh in myModel.Meshes)             {                 // This is where the mesh orientation is set                 foreach (BasicEffect effect in mesh.Effects)                 {                     effect.World = boneTransforms[mesh.ParentBone.Index];                     effect.View = view;                     effect.Projection = projection;                      effect.EnableDefaultLighting();                 }                  // Draw the mesh, will use the effects set above                 mesh.Draw();             }         }       } } 
   
   
What's the difference between a "Release" Xbox 360 build and a "Debug" one?
May 27, 2012 at 5:51 AM
 

I've got a build of my game that works on Windows under a release and debug build as expected. When I deploy the debug version of the game to the Xbox, it works as expected and runs the same as on Windows - however when I deploy the release version to the XBOX I get different behaviour within the game.

I'm using a 3rd party library for the collisions (which is where I am seeing differences between the release and debug versions of my game); so I can't see what's actually different but I suspect they have some compiler directive for Debug on the Xbox to the Release version on the Xbox.

As such, I'm thinking that I may need to release my game with the Debug build instead of the Release build but I want to know what issues I can expect by doing so? Are there any significant performance issues between the two build profiles?

   
   
in/out keywords in GLSL
May 27, 2012 at 4:55 AM
 

I don't really understand how to use the in / out keywords in GLSL, and google is being uncharacteristically unhelpful.

What exactly do they do? How would I use them if, for example, I want to pass a varying variable set per vertex to the fragment shader?

Literally every tutorial I find uses the varying / attribute keywords and that's not helpful.

   
   
Are bounding volumes created by artists?
May 27, 2012 at 4:19 AM
 

I'm interested in where in the tool chain bounding boxes are created. Are they made by the artists? In the modeling tool? How are they exported? Can Maya/3DS Max/Blender/... mark geometry as bounding box? How does that work in Collada/FBX?)

Or is there a tool which calculates them? Are they calculated at run time?

I basically know how bounding volumes work, but I'm a little bit confused on where to get them from.

   
   
glScalef - game math issue
May 27, 2012 at 3:04 AM
 

I can't get my head wrapped around this issue. The issue is my latest code is making the camera zoom in and out really quickly.

My approach is built on -

http://www.zdnet.com/blog/burnette/how-to-use-multi-touch-in-android-2-part-6-implementing-the-pinch-zoom-gesture/1847?tag=content;siu-container

The opengl scale will be getting the variable - scale.

gl.glScalef(scale, scale, 1); 

the distance is obtained by between two fingers, old distance (initial touch points), and new distance (dragging touch points). The zooming in and out works well. However, it would reset glScalef each time the user start using pinch zoom.

scale = newDistance / oldDistance; 

I tried calculating by additive ratio. The oldtscale handles the previous distance, if it is same, then it doesn't need to add up anything to scale. The zooming is really quick, I moved the fingers closer by mere 1 cm to 5 cm, zoom goes down or up fast. I think additive ratio is a bad solution. I think it might be incomplete solution. I'm trying to figure out what's wrong with it.

//additive ratio tscale = (newDistance / oldDistance) - 1;                     if(oldtscale == tscale) {                         oldtscale = tscale;                         tscale = 0;                     }                     else {                         oldtscale = tscale;                     }                             //adding up the additive ratio and scale                     tscale = scale + tscale; //checking tscale for limiting the maximum/minimum scale                         if(tscale >= 2) {                         tscale = 2;                     }                     else if(tscale <= 1) {                         tscale = 1;                     }                     //supply scale                     scale = tscale; 
   
   
CocosDenshion for iPhone - Couple questions
May 27, 2012 at 2:31 AM
 

I want to use CDAudioManager and CDSoundEngine (the hard way, yeah!). Have a couple of questions.

1.My game has a few scenes, each scene I have to preload sounds (sync or async, right now I don't know how am I going to do it). I have a GameManager (singleton), do I have to initialize the audio system once in the game manager?

2.I've also seen in the cocosDenshion samples, the drum pad demo exactly, and does this.

NSArray *defs = [NSArray arrayWithObjects: [NSNumber numberWithInt:1], [NSNumber numberWithInt:1],  [NSNumber numberWithInt:8], [NSNumber numberWithInt:16], [NSNumber numberWithInt:2],nil];         CDSoundEngine *sse = [CDAudioManager sharedManager].soundEngine [sse defineSourceGroups:defs]; 

What are these sourcegroups for?

3.And las thing I've been wondering, is it OK if I preload the sounds sync? I mean, I have a loading screen already set up in every scene and preload sync would just be putting the lines of code of preloading audio while everything initialize and that's it. Why is the common way to preload the audio async? What if I want to play a sound because there has been an explosion already and the sound isn't preloaded yet?

Hope someone answers me ;)

   
   
Adding a short delay between bullets
May 27, 2012 at 2:02 AM
 

I'm having some trouble simulating bullets in my 2D shooter. I want similar mechanics to Megaman, where the user can hold down the shoot button and a continues stream of bullets are fired but with a slight delay. Currently, when the user fires a bullet in my game a get an almost laser like effect. Below is a screen shot of some bullets being fired while running and jumping.

Bullets being fired

In my update method I have the following:

if(gc.getInput().isKeyDown(Input.KEY_SPACE) ){     bullets.add(new Bullet(player.getPos().getX() + 30,player.getPos().getY() +  17));   } 

Then I simply iterate through the array list increasing its x value on each update.

Moreover, pressing the shoot button (Space bar) creates multiple bullets instead of just creating one even though I am adding only one new bullet to my array list. What would be the best way to solve this problem?

   
   
How to rotate an object so it stands correctly (back always facing the camera)
May 27, 2012 at 1:33 AM
 

I have the following scene:

enter image description here

And I have two 3D vectors, the camera position, and the focus position. The focus vector is always behind the monster. I know how to rotate the camera around the focus with the help of my mouse, but the monster is always facing the same direction, and I'd like to change that!

I'd like it to work almost as in World of Warcraft; while I'm standing still I can move the camera around freely, but as soon as I move, the monster should change the direction according to the camera.position >>> focus vector. Also, I need to make it move in that direction, I guess I could have a 2D vector called speed, which I should change accordingly (it would look like a rotating radius of a circle I guess).

How do I do this?

For reference, I'm working in Three.js, and this is the code with which I rotate the camera:

onDocumentMouseDown = function(event)  {     event.preventDefault();      game.isMouseDown = true;      game.onMouseDownTheta = game.theta;     game.onMouseDownPhi = game.phi;     game.onMouseDownPosition.x = event.clientX;     game.onMouseDownPosition.y = event.clientY; }  onDocumentMouseMove = function(event)  {     event.preventDefault();      if (game.isMouseDown)     {         game.theta = -((event.clientX - game.onMouseDownPosition.x) * 0.5) + game.onMouseDownTheta;         game.phi = ((event.clientY - game.onMouseDownPosition.y) * 0.5) + game.onMouseDownPhi;         game.phi = Math.min(160, Math.max(20, game.phi));          game.cameraBuff.x = game.radious * Math.sin(game.theta * Math.PI / 360 ) * Math.cos( game.phi * Math.PI / 360 );         game.cameraBuff.y = game.radious * Math.sin(game.phi * Math.PI / 360 );         game.cameraBuff.z = game.radious * Math.cos(game.theta * Math.PI / 360 ) * Math.cos( game.phi * Math.PI / 360 );     } } 

And at render time I do this:

self.camera.position.x += self.cameraBuff.x; self.camera.position.y += self.cameraBuff.y; self.camera.position.z += self.cameraBuff.z;  self.camera.lookAt(self.focus); self.renderer.render(self.scene, self.camera);  self.camera.position.x -= self.cameraBuff.x; self.camera.position.y -= self.cameraBuff.y; self.camera.position.z -= self.cameraBuff.z; 
   
   
How to randomly create stars in the background?
May 27, 2012 at 1:19 AM
 

My player flies around the screen in any direction he wants, and the camera follows him. There are stars in the background. I can't figure out how to randomly generate the stars. I made a star class. There are a few different types of stars, and some have different depths than others, hence they move slower as the player moves around. I can create a stars around the player when the game starts, and when they get 100 pixels off the screen they are destroyed, but I can't figure out a good way to create new stars.

Here is my code: Star Class:

#pragma once  struct Star { int xposition, yposition; int type; int velocity;  bool alive;  Star() {     xposition = yposition = 0;     type = 0;     velocity = 0;     alive = false; }  void create( int p_xposition, int p_yposition, int p_velocity, int p_type ) {     xposition = p_xposition;     yposition = p_yposition;     velocity = p_velocity;     type = p_type;      alive = true; }  void destroy() {     alive = false; } }; 

Background Class:

#include "background.h"  void Background::init( Engine* p_engine, SDL_Rect* p_camera ) { engine = p_engine; camera = p_camera;  delta_time = SDL_GetTicks();  for ( int s = 0;  s < 100;  s++ ) {     stars[s] = new Star; }  image[0] = engine->load_image( "star 1.png" ); image[1] = engine->load_image( "star 2.png" ); image[2] = engine->load_image( "star 3.png" ); image[3] = engine->load_image( "star 4.png" );  for ( int s = 0;  s < 30;  s++ ) {     for ( int s2 = 0;  s2 < 100;  s2++ )     {         if ( stars[s2]->alive == false )         {             stars[s2]->create( rand() % engine->screen_width, rand() % engine->screen_height, rand() % 30, rand() % 4 );             break;         }     } } }  void Background::cleanup() { for ( int s = 0;  s < 100;  s++ ) {     delete stars[s]; }  for ( int i = 0;  i < 4;  i++ ) {     SDL_FreeSurface( image[i] ); } }  void Background::logic() { delta_time = SDL_GetTicks() - delta_time;    //destroy stars for ( int s = 0;  s < 100;  s++ ) {     if ( stars[s]->alive == true )     {         if ( stars[s]->xposition < camera->x - 100 || stars[s]->xposition > camera->x + camera->w + 100 )         {             stars[s]->destroy();         }     }      if ( stars[s]->alive == true )     {         if ( stars[s]->yposition < camera->y - 100 || stars[s]->yposition > camera->y + camera->h + 100 )         {             stars[s]->destroy();         }     } }    //create stars if () {  }  delta_time = SDL_GetTicks(); }  void Background::render() { for ( int s = 0;  s < 100;  s++ ) {     if ( stars[s]->alive == true )     {         engine->apply_surface( image[stars[s]->type], engine->buffer, stars[s]->xposition - camera->x, stars[s]->yposition - camera->y );     } } } 
   
   
where can I get people to create project with me? [closed]
May 26, 2012 at 11:54 PM
 

I've almost finished my studies. Actually I am looking for job to get experience but besides this I have a lot of free time. Could you tell me where can I (make relationship with ) find new people who also likes create new games or apps in java/c# and work together?

   
   
How game engines handle transactions between users?
May 26, 2012 at 10:36 PM
 

my question is about situation when there is action between players at game (like items exchange, players money/tokens billing change). I know this depends on many factors, but please look at one of solutions below.

Game state is persisted at sharded database cluster (so no one server transactions possible). When user interact with other (like buy something from second one) there is created transaction at transaction manager (disturbed transactions - when money comes to gaming then some ACID is "must have").

This is heavy solution but ensure synchronization of resources, also serialize operations. Scalablity depends on transaction manager, but each transacion is very expensive (also in request latency). If transaction manager will be another component (not integrated in engine) then on each request (even non transactional) comes another request to ensure resource synchronization (latency penalty again).

How does game engines resolve this kind of problems?

   
   
Correct way to handle path-finding collision matrix
May 26, 2012 at 8:26 PM
 

Here is an example of me utilizing path finding. The red grid represents the grid utilized by my A* library to locate a distance. This picture is only an example, currently it is all calculated on the 1x1 pixel level (pretty darn laggy).

enter image description here

I want to make it so that the farther I click, the less accurate it will be (split the map into larger grid pieces). The problem I have is, my current library uses a two dimensional grid of integers. The higher the number in a cell, the more resistance for that grid tile. Currently I'm setting all unwalkable spots to Integer Max.

Here is an example of what I want:

enter image description here

I'm just not sure how I should set up the arrays of integers of the grid. Every time an element is added/removed to/from the game, it's collision details are updated in the table.

Here is a picture of what the map looks like on my collision layer:

enter image description here

I probably shouldn't be creating new arrays every time I have to do a path find because my game needs to support tons of PF at the same time.

Should I have multiple arrays that are all updated when the dynamic elements are updated (a building is built/a building is destroyed).

The problem I see with this is that it will probably make the creation and destruction of buildings a little more laggy than I would want because it would be setting the collision grid for each built in accuracy level. I would also have to add more/remove some arrays if I ever in the future changed the map size.

Should I generate the new array based on an accuracy value every time I need to PF?

The problem I see with this is that it will probably make any form of PF just as laggy because it will have to search through a MapWidth x MapHeight number of cells to shrink it all down.

Or is there a better way? I'm certainly not the best at optimizing really anything. I've just started dealing with XNA so I'm not used to having optimization code really doing much of an affect until now... :(

If you need code examples, please ask. I'll add it as an edit.

   
   
Circle inside circle collision
May 26, 2012 at 7:50 PM
 

In one of my projects I have a game area in the shape of a circle. Inside this circle another small circle is moving around. What I want to do is keep the small circle from moving outside the bigger one. Below you can see that in frame 2 the small circle is partly outside, I need a way to move it back to just before it is about to move outside. How can this be done?

Basic example

Also, I need the collision point along the arc of the big circle so that I can update the small circle's velocity. How would one go about calculating this point?

What I would like to do is before moving the small circle, I predict its next position and if it is outside I find the time of collision between t=0 and t=1 (t=1 full time step). If I have the collision time t then I just move the small circle during t instead of a full time step. But again, the problem is I don't know how to detect at that time the collision occurs when it comes to two circles and one being inside the other.

Thanks in advance.

EDIT:

Example of collision point (green) I want to find. Maybe the picture is a bit off but you get the idea.

enter image description here

   
   
How do I keep user input and rendering independent of the implementation environment?
May 26, 2012 at 6:58 PM
 

I'm writing a Tetris clone in JavaScript. I have a fair amount of experience in programming in general, but am rather new to game development.

I want to separate the core game code from the code that would tie it to one environment, such as the browser.

My quick thoughts led me to having the rendering and input functions external to my main game object. I could pass the current game state to the rendering method, which could render using canvas, elements, text, etc. I could also map input to certain game input events, such as move piece left, rotate piece clockwise, etc.

I am having trouble designing how this should be implemented in my object.

Should I pass references to functions that the main object will use to render and process user input? For example...

var TetrisClone = function(renderer, inputUpdate) {     this.renderer = renderer || function() {};     this.inputUpdate = input || function() {};     this.state = {}; };  TetrisClone.prototype = {     update: function() {         // Get user input via function passed to constructor.        var inputEvents = this.inputUpdate();         // Update game state.         // Render the current game state via function passed to constructor.        this.renderer(this.state);      }      };  var renderer = function(state) {     // Render blocks to browser page. }  var inputEvents = {};  var charCodesToEvents = {     37: "move-piece-left"     /* ... */ };  document.addEventListener("keypress", function(event) {     inputEvents[event.which] = true; });  var inputUpdate = function() {    var translatedEvents = [],        event,        translatedEvent;     for (event in inputEvents) {        if (inputEvents.hasOwnProperty(event)) {            translatedEvent = charCodesToEvents[event];            translatedEvents.push(translatedEvent);        }    }     inputEvents = {};     return translatedEvents;  }  var game = new TetrisClone(renderer, inputUpdate); 

Is this a good game design? How would you modify this to suit best practice in regard to making a game as platform/input independent as possible?

   
   
Opponent car logic in race games
May 26, 2012 at 6:11 PM
 

I'm developing a race game in Andengine. I have created a car which player is controlling. But since this is a race game, there should be 3 or 4 car which snatch with the player's car. My question is: How do the opponent cars move along the path? How their logic works? Must I know certain path?

   
   
Enemy car moving logic in race games
May 26, 2012 at 6:11 PM
 

I'm developing a race game in Andengine.I created a car which player is controlling.But because of being race game, there should be 3 or 4 car which snatch with the player's car.My question is: How do the other cars move along to path? How are their logics? Must I know certain path?

   
   
Object-oriented Snake game design
May 26, 2012 at 4:39 PM
 

I'm going to make a snake remake with SDL library and right now I'm thinking heavily about the object-oriented design.

I can imagine that I will have classes like GameEngine, Snake, Board and Food, but the interesting part is - how shall they interact between each other? How shall the game logic be designed?

For example, let's imagine here are some of the possibilities:

  1. Every class except of GameEngine will hold only it's data (position of snake, food, etc.). All the game logic will be done in engine's Update() function. Therefore this function will be very big and every other part of the program fairly small.
  2. GameEngine will only call appropriate functions of every object with the reference to Board and these individual functions will take care about the game logic.
  3. something other

So I would like to know your opinion - what approach do you think is the best? I'm not aiming at low number of lines the game will have, but at the quality and "modularity" of the game object design.

   
   
Synchronizing Movement in an MMO
May 26, 2012 at 3:52 PM
 

I'm trying to decide how to implement player movement in an MMORPG. Player positions must be synchronized in a way that meets the following requirements:

  • Low lag
  • Difficult to hack or cheat
  • Authoritative server with constant accurate knowledge of player positions
  • Fairly simple to implement

I already know of two approaches:

  1. The client sends position: Every so often, the client sends the player's current position to the server. This is simplest.

  2. The client sends input: Basically the player's machine sends keypresses to the server, and the server handles all simulation and state, sending back the player's position every so often.

Both systems have their advantages and disadvantages. Is either one superior to the other, or is there a better alternative?

   
   
Role movement implementation in MMORPG
May 26, 2012 at 3:52 PM
 

There are two methods I know which can apply in MMORPG:

  1. Client send role's position periodically to server. WOW use this method, client sends role's current position & movement states(walk or run) info to server every 500ms. This method have 2 defects: client can cheat and movement path is discrete when role' speed is very fast.

  2. Client send the move key press to server such as WASD. When player press W, then client sends move request to server, when server receive it, move role object according to current role's direction in map til player release W key - client send a stop move request. This method is some kind complex for client, because it needs to summary move states when player press & release a series key(press D after press W, client need to send change role's direction request rather than move right)

What is the best movement implementation in MMORPG? I say 'best' means: 1, low lag. 2, disable cheating such as change speed, transport... (or easy check) 3, server can knows every moment detail (role take 10 secs move from A point to B point, server has the states of role's every moment position (Path: a1 at time x1,a2 at time x2,...,b at time x+10) rather than position a1 at time x, position b at time x+10). Brief said, simulation of role's states in server can not too simple. It does not limit to above 2 methods, if there is some method which I don't know

   
   
Stack based state design for isometric character movement, am I doing it right?
May 26, 2012 at 3:25 PM
 

I have been reading around about stack-based FSM, and I found it to be perfect for my game. However, when a character moves, it consequently have to face in some direction (and animation of each direction will be different), now the problem that I am facing in my state machine design is the scope of each state.

For example, should I divide the state into MOVE_LEFT, MOVE_RIGHT, MOVE_UP, MOVE_DOWN or should I create one MOVE state with some direction argument in it. Now, the latter seems to be better, however, if I am to trigger direction change, how would I do it for a one-state MOVE? I could directly change the direction argument and manually change the animation sequence, which will destroy the whole purpose of state machine (State machine should change animation sequence OnEnter() state). Else, I would have complicate the state machine into hierarchy of states (Sub-states,etc.), and this seem unconvincing for me.

Or maybe I should implement some type of multiple, simultaneous states ---- Character's State (Jump, Move, Idle, Attack, etc) and Direction's State (Up down left right), then make it works concurrently, and apply stack-based architectue on Character's State only.

   
     
 
This email was sent to game@tlogoadi.com.
Delivered by Feed My Inbox
PO Box 682532 Franklin, TN 37068
Create Account
Unsubscribe Here Feed My Inbox