Posts

Interpolation, Extrapolation - My life is still moving around...

Image
I needed a good interpolation system for my cars in the mmo world. I tried a few in the internet but nothing served its purpose. The logic used server time and current network time to figure out how old the packets were to based on which it would interpolate or extrapolate or simply snap. For most part the logic worked fine and so I don't blame all the wonderful articles I found in the internet. The problem I had was lag, frequent snapping, and sometimes slow and quick acceleration of the car. There wasn't a smooth movement. It would move smooth as long as the packets arrived fine and once they delay it would begin doing all crazy things. After dumping all logs it was evident that the problem was with the packets arriving very late. This is because over the wire through UDP there were lots of packets being dropped. This means on a high speed racing game where I collect and do a lot of things I definitely have a great deal of this loss and this magnifies where there are mo...

Smarfox 2x Compression Error

The smartfox 2x compression error has now been resolved. Very soon there shall be a patch released with the fix. Phew! finally some relief and the 2X server will now continue rocking!

SmartfoxServer 2X

The compression error in SmartFox 2x is probably due to the client side getting choked with a lot of incoming messages. The only solution as of now is to limit how much a client processes incoming messages. The client sends data to the server, the server maintains a queue of information and on a periodic interval keeps dispatching this data. This way we can control how much data is processed by the client. Though it looks like a smart fox issue, the solution above is temporary, but should work.

Unity 4

Unity 4 features comes with load of new stuff. Its good, but coming up with something that would re-write the GUI system would just be a blow to most of the companies out there who have all their projects working around it.

Asphalt 5

Image
Games for the iPad.. hmmm one of it is Asphalt 5 from GameLoft. And hey! it works on the iPod and the iPhone too. And it is a pure arcade racing game. The game has all the usual gaming mode that comes along with any racing game and also with other features like earning money, unlocking cars and like. There are twelve different locations and some awesome cars including Mini Cooper S and the Ferrari 599 XX. The graphics is good and so is the look and feel of the cars. There are cool soundtracks too. It is available on the PSP too.

Fallout 3 - Bethesda Softworks

Fallout 3 from Bethesda Games Studio is an action RPG game and is the third game of the fallout series. The game is available for the XBox, PS3 and for the windows and was released last year. Bethesda started the work of fallout in 2004. The game has some adult content and also violence and had chosen to pursue the ESRM rating of M (Mature).

Electroserver or Smartfoxserver

Electroserver rocks. It's simple, easy to use and quick to learn. Smartfoxserver on that other hand is slightly different but if you have worked on ES then working on SFS would not be difficult. SFS has an api for C#, now this is a plus for most people developing apps for windows or mac. Support for Actionscript however is there both for ES and SFS. So this would help game development for online games. Learning curve for ES is low and hence you could speed up in no time. It has got a good API and have a great documentation. And best of all, it is got a good customer support and forum. So my choice would always be on ES.

Windows versions and Operating Systems! Why so many?

Ok before I talk let me first show you the list of all operating systems we have had since Microsoft began. Windows XP Windows XP Starter Edition Windows XP Home Edition, Windows XP Home Edition N Windows XP Professional Windows XP Professional N Windows XP Professional x64 Edition, Windows XP Tablet PC Edition Windows XP Media Center Edition Windows XP 64-bit Edition Windows XP Tablet PC Edition, for tablet PCs Windows 2000 Windows 2000 Professional Windows 2000 Server Windows 2000 Advanced Server Windows 2000 Datacenter Server Windows Me Windows 98 Windows 98 Second Edition Windows NT 4.0 Windows 95 Windows NT 3.51 Windows NT 3.5 Windows for Workgroups 3.11 Windows 3.2 Windows NT 3.1 Windows for Workgroups 3.1 Windows 3.1 Windows 3.0 Windows 2.11 Windows 2.10 Windows 2.03 Windows 1.04 Windows 1.03 Windows 1.02 Windows 1.01 Right there you go. I have a list of 36 items here. Keep in mind that I have excluded the server and CE editions of windows. The first thing you will note is each ...

Reading an XML file from unity standalone application and web player.

If you try reading a XML file (or any file) inside a folder within the 'Assets' folder using the System.Xml namespace, you may notice that it works withing the Unity standalone application, but not when compiled and run in the web player. To make the file readable in both the Unity stand alone application and the web player do the following 1) Create a Resources folder within the Assets folder. 2) Place the file (say Config.xml) within the Resources folder. 3) And use Resources.Load("Config") to load the file. This would guarantee the file being read in the web player too.

Electro Server Configuration for MacOSX

Configuring ElectroServer (4.0) is an easy task for Windows. You just download the setup, install it and run the server. And you also have the admin tool and the UI to tweak and adjust the settings of the server. But not an easy task with MacOSX. Here I would be giving an information about how to configure Electro-Server for the MacOSX. As you know to run ElectroServer 4.0+ you need JVM 1.6 or higher. But SUN does not have a download of JVM 1.6 for MacOSX as Mac decided to bring up its own virtual machine. At this point I hope you must be knowing what ElectroServer is. In simple words it is a server used for developing and configuring multiplayer games and MMOs. For more information kindly visit the Electro Server website . To run the Electro Server in MacOSX, do the following 1) Download the Unix (without JVM) version of the Electro Server. 2) Un-Archive it. And run ElectroServer unix executable file. 3) If you run it, you would probably get an error stating that the required JVM was ...

J2ME Game Canvas and 3D Cube

Image
import javax.microedition.lcdui.Graphics; import javax.microedition.lcdui.game.GameCanvas; import javax.microedition.m3g.*; public class My3DClass extends GameCanvas implements Runnable { private Graphics3D v3DInstance = Graphics3D.getInstance(); private Appearance vAppearance; private Material vMaterial; private VertexBuffer vVBuffer; private IndexBuffer vIBuffer; private Camera vCamera; private Background vBackground; private Transform vTransform; private Light vLight; private float vAngle; boolean vRunning; My3DClass() { //call the parent super(true); //initiate the variables vAppearance = new Appearance(); vMaterial = new Material(); vVBuffer = new VertexBuffer(); vCamera = new Camera(); vBackground = new Background(); vLight = new Light(); vTransform = new Transform(); vRunning = false; } public void init() ...

J2ME,GameCanvas and Thread

Image
And here is the GameCanvas class package MyApp; import java.io.IOException; import javax.microedition.lcdui.*; import javax.microedition.lcdui.game.*; import java.lang.Runnable.*; public class MyGameCanvas extends GameCanvas implements Runnable { private boolean vRenderLoop; private int vXPos; private int vWidth; private int vHeight; MyGameCanvas() { super(true); System.out.println("Constructor called"); vXPos=0; vWidth=getWidth(); vHeight=getHeight(); vRenderLoop=false; } public void paint(Graphics g) { } public void start() { System.out.println("start invoked"); vRenderLoop=true; Thread t = new Thread(this); t.start(); } public void stop() { vRenderLoop=false; } public void render(Graphics g) { g.setColor(0xffffff); g.fillRect(0,0,vWidth,vHeight); vXPos++; g.setColor(0x000000); g.fillRect(vXPos, 50, 100,100); ...

J2ME Canvas with Threading

Image
What we shall do here is the following 1) Create a Midlet 2) Create a Canvas class which implements the threading 3) Load a PNG image 4) Render the image through the thread. Configuration. You would need to download the Netbean IDE. When I did this program the version I had was NetBean IDE 6.1. You can go to their website to download it. It would suite for other programming languages too, including the Set Top Box. The program. The Midlet: Just like an applet for the browser, the midlet is an application running in the mobile platform using J2ME. So to run an application on a mobile device you first need a Midlet class. This is the midlet class. package MyApp; import javax.microedition.midlet.*; import javax.microedition.lcdui.*; public class MyApp extends MIDlet { public void startApp() { MyGameCanvas myApp = new MyGameCanvas(); myApp.start(); Display.getDisplay(this).setCurrent(d); } } For better understanding I am keeping this class as sm...

Embedding Font in ActionScript 3.0

Image
Embedding fonts in Action Script 3.0 is fairly an easy job. The following is the steps you need to follow Goto the library of the Movie. Right click and click New Font. And enter the following information as shown in the image below. Now goto to the property panel and choose the newly created font. All fonts created and placed in the library will be post-fixed with a *. In our care here it is WProCap*. Now go to the property panel and click the embed font button. And do as shown in the image below. Click open and enjoy dynamic fonts in AS 3.0.

Configuring Flash in Eclipse using ASDT, MTASC and Flashout

Image
Software Needed: Eclipse MTASC ASDT Flashout Java JDK Installation: Make sure the latest version of the Java JDK installed in your machine. Preferably J2SE 5.0 or higher. Install the JDK preferably in c:\program files\Java http://java.sun.com/j2se/index.jsp Download the latest version of the Eclipse IDE and extract it to c:\program files\Eclipse or any other folder you want. Create a shortcut, right click, go to properties and enter the following argument to the Target Path C:\program files\Eclipse\eclipse.exe –clean Download MTASC (Motion Twin ActionScript Compiler) and extract it to c:\program files\MTASC or any other folder you prefer. Installing ASDT (Actionscript Development Tool) . Open eclipse, Help – Software updates - Add Site. Add the following url in the location text box. http://aseclipseplugin.sourceforge.net/updates and click ok. Check ASDT and click Finish. Download the latest version of Flashout and extract the content of the archive (excluding the Flashout.as file) ...