Category Archives: Computer Technology

Creating a 3D Game With Three.js and WebGL

Creating a 3D Game With Three.js and WebGL

Prerequisites

  • A browser with WebGL – this game has been tested on Chrome and Firefox. IE still doesn’t support WebGL, unless you’re using Windows 8.1 with IE11.
  • Three.js library available for download from the Three.js website
  • The Keyboard.js helper library I used for this project, created by Arthur Schreiber at No Karma. Download it from my GitHub repository
  • A basic understanding of what Three.js does. Read this super simple, super quick tutorial by Paul Lewis. It’s basically a short-hand version of this article.

Setup

Get a base index.html running

Step one when making a web-based game is to create the host index.html file. In our case, it only needs to be a very simple set of elements, so we can bundle the CSS styling too.

Import Keyboard.js and Three.js

Three.js is a library contained in just one JavaScript file, so we can grab the minified version from the website.

For Keyboard input, we will need to referencethe aforementioned JavaScript file in our index.html as well.

Create setup() and draw() functions

The setup() function will be the start point for the game code. The draw() function will be run every frame and will handle all the rendering and game logic.

In order to loop the draw() function, we simply utilise the requestAnimationFrame() function call, and pass ‘draw’ as the parameter. Remember, not all browsers natively support the call, and you might have to use Paul Irish’s shim to gain maximum compatibility. Also, it is important to realise that requestAnimationFrame() does not guarantee a fixed frame-rate, so you need to use time-deltas to calculate realistic physics. For a basic game like Pong, we don’t really care about that.

Basic World

Set up the Three.js world and camera

Three.js includes these important elements:

  • Scene
  • Renderer
  • Camera
  • Mesh
  • Light
  • Material

Cameras, Meshes, and Lights need to be added to the scene using the scene.add() function.

Attach a WebGL Three.js Renderer to the DIV

The renderer is attached to whichever HTML DOM element you wish to render the scene to, and a render() call is made each frame to the renderer in order to draw the Three.js scene.

Add a camera to the scene

Three.js has the option to create Perspective and Orthographic cameras. For most uses, Perspective camera is the best choice. We can change position and rotation information of the camera like any other object in the scene.

Draw a sphere and light it

Meshes must be paired with Materials in order to give them a defined look and feel. Meshes can be of many types, include primitives such as Cube, Sphere, Plane and Torus. Materials can have different characteristics depending on their type. The basic Material types include Lambert, Phong, and Basic.

  • Basic renders an unlit Mesh with no shadows or dark shading. A sphere will look like a circle if rendered with Basic.
  • Lambert is a simple diffuse-like lighting that creates shading on sides facing away from a light source. It gives a basic 3D look of surfaces that are matte (non-shiny and non-reflective)
  • Phong is used for achieving a plastic-like look and feel, with the ability to gain highlights that give a much shinier appearance to the Mesh.

Show off your sphere with a Point Light. This is the most basic light, with no direction or rotation. Make sure you tweak the light’s intensity and distance to get it looking good.

Add Game Objects

Draw playing area plane

The playing area will be a Three.js Mesh object of type Plane. Make sure the plane matches the play area, giving a small buffer gap to indicate where the paddles can and can’t go.

Draw paddles

The paddles will be Mesh objects of type Cube. Position each of the paddles on opposite sides of the play area.

1234567891011121314151617181920212223242526272829303132333435363738394041
// set up the paddle vars
paddleWidth = 10;
paddleHeight = 30;
paddleDepth = 10;
paddleQuality = 1;
// set up paddle 1
paddle1 = new THREE.Mesh(
new THREE.CubeGeometry(
paddleWidth,
paddleHeight,
paddleDepth,
paddleQuality,
paddleQuality,
paddleQuality),
paddle1Material);
// add the paddle to the scene
scene.add(paddle1);
// Set up the second paddle
paddle2 = new THREE.Mesh(
new THREE.CubeGeometry(
paddleWidth,
paddleHeight,
paddleDepth,
paddleQuality,
paddleQuality,
paddleQuality),
paddle2Material);
// Add the second paddle to the scene
scene.add(paddle2);
// set paddles on each side of the table
paddle1.position.x = -fieldWidth/2 + paddleWidth;
paddle2.position.x = fieldWidth/2 – paddleWidth;
// lift paddles over playing surface
paddle1.position.z = paddleDepth;
paddle2.position.z = paddleDepth;
view rawBNG_Pong_paddlecreateThis Gist brought to you by GitHub.

If you manipulate the camera positions, as seen in the screenshot, you can give a different perspective to the player.

Basic Logic

Ball movement

The ball will have an X-direction and a Y-direction that determines the movement per frame.

// ball’s x-direction, y-direction and speed per frame
var ballDirX = 1, ballDirY = 1, ballSpeed = 2;

The ball will move at a constant speed in the X-plane every frame. To this end, we will specify a ballSpeed variable that acts as a multiplier for the direction values.

// update ball position over time
ball.position.x += ballDirX * ballSpeed;
ball.position.y += ballDirY * ballSpeed;

We want the ball to have some unpredictable characteristics (e.g. when it gets sliced quite hard) so we will allow the Y-direction to go up to a maximum of ballSpeed * 2. You can tweak the values until you’re happy with how the ball behaves.

// limit ball’s y-speed to 2x the x-speed
// this is so the ball doesn’t speed from left to right super fast
// keeps game playable for humans
if (ballDirY > ballSpeed * 2)
{
ballDirY = ballSpeed * 2;
}
else if (ballDirY < -ballSpeed * 2)
{
ballDirY = -ballSpeed * 2;
}

Ball wall bounce logic

Simple collision detection logic is required to check if the ball is touching each of the side ‘walls’. Using a series of ‘if-else’ statements, we check the ball positions against the predetermined wall positions. In the case of a collision, we simply switch the Y-direction of the ball, creating a bounce effect.

// if ball goes off the top side (side of table)
if (ball.position.y <= -fieldHeight/2)
{
ballDirY = -ballDirY;
}
// if ball goes off the bottom side (side of table)
if (ball.position.y >= fieldHeight/2)
{
ballDirY = -ballDirY;
}

Later, we will edit some of this code in order to implement scoring when the ball passes a paddle.

Keyboard input for paddles

We will utilise a very effective short-cut in order to easily get keyboard input working in this game. Using the Keyboard.js file provided, we simply have to include the reference to it in the index.html file and we are set. Only one function call is required, the Key.isDown() call. Given a parameter, the library checks if that particular key is current being pressed, and returns a boolean value.

// move left
if (Key.isDown(Key.A))
{
// code to move paddle left
}

We use the ‘A’ and ‘D’ keys to move the paddle left and right, but you can edit the Keyboard.js with additional values if you want to use your own control scheme.

var Key = {
_pressed: {},
A: 65,
W: 87,
D: 68,
S: 83,
// add your required key code (ASCII) along with the name here
// for example:
SPACE: 32,
};

While dealing with keyboard input, it is also important to ensure that the input is never blindly updated in game. We have to check that the paddle isn’t made to move off the play area, and we do that with some ‘if-else’ statements as well.

// move left
if (Key.isDown(Key.A))
{
// if paddle is not touching the side of table
// we move
if (paddle1.position.y < fieldHeight * 0.45)
{
paddle1DirY = paddleSpeed * 0.5;
}
// else we don’t move and stretch the paddle
// to indicate we can’t move
else
{
paddle1DirY = 0;
paddle1.scale.z += (10 – paddle1.scale.z) * 0.2;
}
}

Note that we use a paddle direction variable, rather than simply applying a change to the position values. This will come in handy when programming the ball to ‘slice’ when hit at an angle with a fast-moving paddle.

Opponent logic

When you code a game of this calibre, it is of utmost importance that you create a vivid, lush environment with a host of emotional, highly-relatable characters that showcase this generation’s strides forward in technology. Instead, we will code a Pong A.I. that blindly follows the ball, because that is even better.

We can update the opponent difficulty by using a variable instead of introducing magic numbers. This variable will affect the ‘reaction rate’ of the opponent by increasing the Lerp (Linear-Interpolation) time.

When using a Lerp (Linear-Interpolation) function, we must ensure the opponent plays fairly by limiting their maximum travel speed. We do that with a few more if-else statements.

// in case the Lerp function produces a value above max paddle speed, we clamp it
if (Math.abs(paddle2DirY) <= paddleSpeed)
{
paddle2.position.y += paddle2DirY;
}
// if the lerp value is too high, we have to limit speed to paddleSpeed
else
{
// if paddle is lerping in +ve direction
if (paddle2DirY > paddleSpeed)
{
paddle2.position.y += paddleSpeed;
}
// if paddle is lerping in -ve direction
else if (paddle2DirY < -paddleSpeed)
{
paddle2.position.y -= paddleSpeed;
}
}
If want to extend immersion, you could also using the paddle.scale property to stretch the paddle when it can’t be moved. This indicates an issue to the player which they can then address immediately. In order to accomplish this, we must ensure the paddle always Lerps back to the default scale size.
// We lerp the scale back to 1
// this is done because we stretch the paddle at some points
// stretching is done when paddle touches side of table and when paddle hits ball
// by doing this here, we ensure paddle always comes back to default size
paddle2.scale.y += (1 – paddle2.scale.y) * 0.2;

Adding Gameplay

Making the ball reset after missing a paddle

To get the main scoring gameplay working, we need to first remove the ball’s ability to bonce off the paddle-facing walls. To do this, we remove the bounce code from the two corresponding if-else statements.

// if ball goes off the top side (side of table)
if (ball.position.y <= -fieldHeight/2)
{
ballDirY = -ballDirY;
}
// if ball goes off the bottom side (side of table)
if (ball.position.y >= fieldHeight/2)
{
ballDirY = -ballDirY;
}
//// ——————————— ////
CHANGED CODE
//// ——————————— ////
// if ball goes off the ‘left’ side (Player’s side)
if (ball.position.x <= -fieldWidth/2)
{
// CPU scores a point
// update scoreboard
// and reset ball
}
// if ball goes off the ‘right’ side (CPU’s side)
if (ball.position.x >= fieldWidth/2)
{
// player scores a point
// update scoreboard
// and reset ball
}

We can handle scoring in many different ways. For a simple game like this, we can simply increment the corresponding score count variable.

// if ball goes off the ‘left’ side (Player’s side)
if (ball.position.x <= -fieldWidth/2)
{
// CPU scores
score2++;
// update scoreboard HTML
document.getElementById(“scores”).innerHTML = score1 + “-” + score2;
// reset ball to center
resetBall(2);
// check if match over (someone scored maxScore points)
matchScoreCheck();
}

We can then update the HUD element in the DOM by setting its innerHTML value. Finally, we have to reset the ball once someone has scored. A simple function can be written to reset the ball, with a parameter indicating which paddle just lost (so we know which paddle to send the ball to next time).

// resets the ball’s position to the centre of the play area
// also sets the ball direction speed towards the last point winner
function resetBall(loser)
{
// position the ball in the center of the table
ball.position.x = 0;
ball.position.y = 0;
// if player lost the last point, we send the ball to opponent
if (loser == 1)
{
ballDirX = -1;
}
// else if opponent lost, we send ball to player
else
{
ballDirX = 1;
}
// set the ball to move +ve in y plane (towards left from the camera)
ballDirY = 1;
}

Making the ball bounce off paddles

Alright, this is it. The big one. Literally the biggest feature of this game. It’s time to get the paddles hitting the ball. In a simple Pong game, paddle-ball physics are nothing more than a couple of if-else statements. We check the X-position and Y-position of the ball against the paddle’s rectangular bounds, and if they intersect, we bounce the ball away.

// if ball is aligned with paddle1 on x plane
// remember the position is the CENTER of the object
// we only check between the front and the middle of the paddle (one-way collision)
if (ball.position.x <= paddle1.position.x + paddleWidth
&& ball.position.x >= paddle1.position.x)
{
// and if ball is aligned with paddle1 on y plane
if (ball.position.y <= paddle1.position.y + paddleHeight/2
&& ball.position.y >= paddle1.position.y – paddleHeight/2)
{
// ball is intersecting with the front half of the paddle
}
}

It’s also important to check the direction of the ball’s travel, as we only want to check collisions in one direction (the direction towards the opponent.)

// and if ball is travelling towards player (-ve direction)
if (ballDirX < 0)
{
// stretch the paddle to indicate a hit
paddle1.scale.y = 15;
// switch direction of ball travel to create bounce
ballDirX = -ballDirX;
// we impact ball angle when hitting it
// this is not realistic physics, just spices up the gameplay
// allows you to ‘slice’ the ball to beat the opponent
ballDirY -= paddle1DirY * 0.7;
}

We will also affect the ball’s lateral movement depending on the relative speed of the paddle when hitting the ball. This is particularly useful in introducing the biggest variable in Pong: the slice. Slicing the ball is often the only way to confuse and outmaneuver the opponent, so it is vital in this game.

Remember to duplicate the code, but update the values to match the opponent’s paddle. You can use this opportunity to gimp your opponent’s ability somewhat, by reducing the hitbox size or decreasing the slice amount. It’s what we would all do.

Here is the final paddle-ball collision function:

// Handles paddle collision logic
function paddlePhysics()
{
// PLAYER PADDLE LOGIC
// if ball is aligned with paddle1 on x plane
// remember the position is the CENTER of the object
// we only check between the front and the middle of the paddle (one-way collision)
if (ball.position.x <= paddle1.position.x + paddleWidth
&& ball.position.x >= paddle1.position.x)
{
// and if ball is aligned with paddle1 on y plane
if (ball.position.y <= paddle1.position.y + paddleHeight/2
&& ball.position.y >= paddle1.position.y – paddleHeight/2)
{
// and if ball is travelling towards player (-ve direction)
if (ballDirX < 0)
{
// stretch the paddle to indicate a hit
paddle1.scale.y = 15;
// switch direction of ball travel to create bounce
ballDirX = -ballDirX;
// we impact ball angle when hitting it
// this is not realistic physics, just spices up the gameplay
// allows you to ‘slice’ the ball to beat the opponent
ballDirY -= paddle1DirY * 0.7;
}
}
}
// OPPONENT PADDLE LOGIC
// if ball is aligned with paddle2 on x plane
// remember the position is the CENTER of the object
// we only check between the front and the middle of the paddle (one-way collision)
if (ball.position.x <= paddle2.position.x + paddleWidth
&& ball.position.x >= paddle2.position.x)
{
// and if ball is aligned with paddle2 on y plane
if (ball.position.y <= paddle2.position.y + paddleHeight/2
&& ball.position.y >= paddle2.position.y – paddleHeight/2)
{
// and if ball is travelling towards opponent (+ve direction)
if (ballDirX > 0)
{
// stretch the paddle to indicate a hit
paddle2.scale.y = 15;
// switch direction of ball travel to create bounce
ballDirX = -ballDirX;
// we impact ball angle when hitting it
// this is not realistic physics, just spices up the gameplay
// allows you to ‘slice’ the ball to beat the opponent
ballDirY -= paddle2DirY * 0.7;
}
}
}
}
view rawBNG_Pong_paddlecollCompleteThis Gist brought to you by GitHub.

Scoring

In Pong, it is usually simplest to have a maximum score value, such that a game is won when either player reaches that score. To that end, we can easily create a maxScore variable and set it at the start of the match.

We then create a function to check if either player has scored equal or higher than the maximum. This function should be called only when a score has been changed (i.e. when someone scores a point.)

// checks if either player or opponent has reached 7 points
function matchScoreCheck()
{
// if player has 7 points
if (score1 >= maxScore)
{
// stop the ball
ballSpeed = 0;
// write to the banner
document.getElementById(“scores”).innerHTML = “Player wins!”;
document.getElementById(“winnerBoard”).innerHTML = “Refresh to play again”;
}
// else if opponent has 7 points
else if (score2 >= maxScore)
{
// stop the ball
ballSpeed = 0;
// write to the banner
document.getElementById(“scores”).innerHTML = “CPU wins!”;
document.getElementById(“winnerBoard”).innerHTML = “Refresh to play again”;
}
}

After a match is deemed complete, it is simplest to just return the ball to the centre and stop any movement, so that play doesnt inadvertently continue.

Prettifying the Game

HUD

It’s important to give feedback to the player so they know what’s going on. For Pong, the least we can do is keep a scoreboard ticking over. Instead of trying to draw the HUD on the same layer as the game, we can use the other DOM elements to provide the required feedback.

It’s also good to indicate the maximum score as well, so we have another element for that which we will update at match start.

// update the board to reflect the max score for match win
document.getElementById(“winnerBoard”).innerHTML = “First to ” + maxScore + ” wins!”;

Shadows

Finally, it is time to make things look a tad more polished. Three.js has the awesome ability to create shadows for primitive objects (Cube, Plane, Sphere, etc.) so we can utilise that to make the game look nicer.

Shadows can’t be created with just a Point light, so we have to add a DirectionalLight or a SpotLight. A SpotLight shines a circular beam of light onto surfaces, which DirectionalLight simply shines a light in a certain direction with no regard to positioning.

We will use a SpotLight because it clearly indicates where the light originates from and shines towards.

We can update the SpotLight to follow the ball around to give a more dynamic look and feel to the game, whilst showcasing the hard work we just put into the lighting.

// we can easily notice shadows if we dynamically move lights during the game
spotLight.position.x = ball.position.x;
spotLight.position.y = ball.position.y;

To make an object in the scene cast or receive shadows, we simply set their .receiveShadow and .castShadow variables to true. For example,

paddle1 = new THREE.Mesh(
new THREE.CubeGeometry(paddleWidth, paddleHeight, paddleDepth, paddleQuality, paddleQuality, paddleQuality),
paddle1Material);
// add the sphere to the scene
scene.add(paddle1);
paddle1.receiveShadow = true;
paddle1.castShadow = true;

Conclusion

This is but a basic introduction to the power of Three.js, which should allow you to create a basic Pong clone.

Play the latest build of this game here: LATEST BUILD*

Find the latest code at its GitHub page*

You can still do quite a number of things to polish your game, such as

  • Create animations for the paddles and ball
  • Update the HUD to look prettier
  • Import complex objects created in Modeling packages, to design a more immersive environment
  • Move HUD elements inside the game view to allow for full-screen gaming
  • Mess around with complex shaders to create reflections and other cool effects

Yahoo Sports Launches New Fantasy App With Mobile Drafting

Yahoo Sports Launches New Fantasy App With Mobile Drafting

Yahoo announced that it has launched its new 2013 Fantasy Sports app today, which brings a new design, and new features to the experience.

One of the big new improvements is that it now features mobile drafting, which many will find tremendously helpful. It’s a lot of pressure to be at a computer during draft time.

 

“Managers can now sign up, draft a team and win their league championship from their iOS and Android device thanks to new technology incorporated by Bignoggins Production, Loki Studios and the Yahoo! Sports mobile team,” a spokesperson for Yahoo tells WebProNews. “The app also now features mock drafting, to help fans prepare and get an edge on the competition.”

Yahoo announced its acquisition of Bignoggins just a few weeks ago. They haven’t wasted any time.

“And starting with football, for the first time ever, all of Yahoo! Sports Fantasy games will live under one mobile roof – the Yahoo! Sports Fantasy app – including basketball, hockey and baseball,” the spokesperson adds.

According to Yahoo, the new app is faster than previous experiences. It also has free notifications.

The app is available for iOS and Android.

How Apollo 11′s 1.024MHz guidance computer did a lot with very little

How Apollo 11′s 1.024MHz guidance computer did a lot with very little

 

early 44 years ago computer hardware was in an entirely different place than it is now. The levels of performance don’t even fit on the same scale. The anniversary of the Apollo 11moon landing is upon us, and those brave space pioneers got by without a 3GHz multi-core CPU. The guidance computer used on the Apollo 11 mission ran at only 1.024 MHz.

The moon landing was the height of technological achievement at the time, and some of the rocket technology is still relevant today. That computer, though, has been left in the dust. In fact, it was well and truly obsolete a few years after the landing.

The Intel 8086 came about roughly ten years after the Apollo landing, marking the beginning of x86. Apollo 11’s computer had 4 registers — essentially slots for holding numeric values. The 8086 boosted that to eight 16-bit registers.

The IBM PC XT ran the next version of that chip, the famous 8088. This computer ran at 4.077MHz, which sounds incredibly slow by today’s standards, but is still four times faster than the Apollo 11computer. The XT also packed in eight times the memory used on Apollo 11.

The Apollo 11 guidance computer actually had some impressive software features for a system that didn’t even run a graphical interface. It could multitask up to 8 different operations, but it didn’t work the way we think of multitasking. Today’s operations use preemptive multitasking that allows the OS to distribute computing resources as needed. On Apollo 11, programs were in charge and had to give control back to the OS periodically. A kind of virtual machine was used to allow developers to mix hardware-level instructions with virtual machine commands within the same assembler code.

Inputting commands required translating the English words into “verb noun pairs,” which could be input as numbers. There was a handy sign in the cabin as a reminder. To top it all off, none of the computer’s systems were software upgradeable. All the code was stored in read-only memory. Several years after Apollo 11, Apollo 14 was forced to manually input the code to patch a system malfunction — it took 90 minutes just to type it in.

Maybe your computer is a little sluggish, and your smartphone is a couple years old, but you have it better than those astronauts

Intel Aims to “Re-Architect” Datacenters to Meet Demand for New Services

Intel Aims to “Re-Architect” Datacenters to Meet Demand for New Services
  • Reveals new details of the forthcoming 22nm Intel® Atom™ processors C2000 product family, enabling the company to target a larger portion of the datacenter market.
  • Unveils future roadmap of 14nm datacenter products including a system-on-chip (SoC) that for the first time will incorporate Intel’s next-generation Broadwell architecture to address an even broader range of workloads.
  • Rackspace Hosting* announces that it will deploy a new generation of rack designs as part of its hybrid cloud solutions aligned with Intel’s Rack Scale Architecture vision.

As the massive growth of information technology services places increasing demand on the datacenter, Intel Corporation today outlined its strategy to re-architect the underlying infrastructure, allowing companies and end-users to benefit from an increasingly services-oriented, mobile world.

The company also announced additional details about its next-generation Intel® Atom™ processor C2000 product family (codenamed “Avoton” and “Rangeley”), as well as outlined its roadmap of next-generation 14nm products for 2014 and beyond. This robust pipeline of current and future products and technologies will allow Intel to expand into new segments of the datacenter that look to transition from proprietary designs to more open, standards-based compute models.

“Datacenters are entering a new era of rapid service delivery,” said Diane Bryant, senior vice president and general manager of the Datacenter and Connected Systems Group at Intel. “Across network, storage and servers we continue to see significant opportunities for growth. In many cases, it requires a new approach to deliver the scale and efficiency required, and today we are unveiling the near and long-term actions to enable this transformation.”

As more mobile devices connect to the Internet, cloud-based software and applications get smarter by learning from the billions of people and machines using it, thus resulting in a new era of context-rich experiences and services. It also results in a massive amount of network connections and a continuous stream of real-time, unstructured data. New challenges for networks, computing and storage are emerging as the growing volume of data is transported, collected, aggregated and analyzed in datacenters. As a result, datacenters must be more agile and service-driven than ever before, and easier to manage and operate.

The role of information technology has evolved from being a way to reduce costs and increase corporate productivity to becoming the means to deliver new services to businesses and consumers. For example, Disney* recently started providing visitors with wirelessly connected-wristbands to enhance customers’ in-park experience through real-time data analytics. Additionally, a smart traffic safety program from Bocom* in China seeks to identify traffic patterns in a city of ten million people and intelligently offers better routing options for vehicles on the road.

‘Re-Architecting’ Network, Storage and Servers

To help companies prepare for the next generation of datacenters, Intel revealed its plans to virtualize the network, enable smart storage solutions and invest in innovative rack optimized architectures.

Bryant highlighted Intel’s Rack Scale Architecture (RSA), an advanced design that promises to dramatically increase the utilization and flexibility of the datacenter to deliver new services. Rackspace Hosting*, an open cloud company, today announced the deployment of new server racks that is a step toward reaching Intel’s RSA vision, powered by Intel® Xeon® processors and Intel Ethernet controllers with storage accelerated by Intel Solid State Drives. The Rackspace design is the first commercial rack scale implementation.

The networking industry is on the verge of a transition similar to what the server segment experienced years ago. Equipping the network with open, general purpose processing capabilities provides a way to maximize network bandwidth, significantly reduce cost and provide the flexibility to offer new services. For example, with a virtualized software defined network, the time to provision a new service can be reduced to just minutes from two to three weeks with traditional networks. Intel introduced Open Network Platform reference designs to help OEMs build and deploy this new generation of networks.

Data growth is a challenge to all datacenters and transferring this large volume of data for processing within a traditional, rigid storage architecture is costly and time consuming. By implementing intelligent storage technologies and tools, Intel is helping to reduce the amount of data that needs to be stored, and is improving how data is used for new services.

Traditional servers are also evolving. To meet the diverse needs of datacenter operators who deploy everything from compute intensive database applications to consumer facing Web services that benefit from smaller, more energy-efficient processing, Intel outlined its plan to optimize workloads, including customized CPU and SoC configurations.

As part of its strategy, Intel revealed new details for the forthcoming Intel® Atom™ processors C2000 product family aimed for low-energy, high-density microservers and storage (codenamed “Avoton”), and network devices (codenamed “Rangeley”). This second generation of Intel’s 64-bit SoCs is expected to become available later this year and will be based on the company’s 22nm process technology and the innovative Silvermont microarchitecture. It will feature up to eight cores with integrated Ethernet and support for up to 64GB of memory.

The new products are expected to deliver up to four times1,3 the energy efficiency and up to seven times1,2 more performance than the first generation Intel Atom processor-based server SoCs introduced in December last year. Intel has been sampling the new Intel Atom processor server product family to customers since April and has already more than doubled the number of system designs compared to the previous generation.

Roadmap for Expansion

The move to services-oriented datacenters presents considerable opportunities for Intel to expand into new segments. To help bolster the underlying technologies that power much of the next generation of datacenters, Intel outlined its roadmap of next-generation products based on its forthcoming 14nm process technology scheduled for 2014 and beyond. These products are aimed at microservers, storage and network devices and will offer an even broader set of low-power, high-density solutions for their Web-scale applications and services.

The future products include the next generation of Intel Xeon processors E3 family (codenamed “Broadwell”) built for processor and graphic-centric workloads such as online gaming and media transcoding. It also includes the next generation of Intel Atom processor SoCs (codenamed “Denverton”) that will enable even higher density deployments for datacenter operators. Intel also disclosed an addition to its future roadmap – a new SoC designed from the ground up for the datacenter based on Intel’s next-generation Broadwell microarchitecture that follows today’s industry leading Haswell microarchitecture. This SoC will offer higher levels of performance in high density, extreme energy efficient systems that datacenter operators will expect in this increasingly services-oriented, mobile world.

Ubiquitech Software Expands Globally by Acquiring Blue Crush Marketing Group, LLC, an Innovative Worldwide Marketing Company in a 20 Billion Dollar per Year Industry

Ubiquitech Software Expands Globally by Acquiring Blue Crush Marketing Group, LLC, an Innovative Worldwide Marketing Company in a 20 Billion Dollar per Year Industry

Ubiquitech Software, Inc. (www.ubiquitechsoftware.com) (OTC Pink: UBQU), an International Technology and Services Organization announced today that it has completed a Definitive Agreement to acquire 100% of the equity of Blue Crush Marketing Group, LLC (http://www.bluecrushmarketing.com), a dynamic multi-media, multi-faceted corporation utilizing state-of-the-art global Internet marketing, plus Direct Response (DRTV) Television, Radio, and traditional Internet marketing Additionally, AffiliateCashExpress.com (www.AffiliateCashExpress.com), was recently developed to quickly take advantage and capitalize on the popular business model that is growing throughout the world, CPA Advertising. The two companies have been conducting requisite due diligence since the signing of a letter-of-intent in June. The Blue Crush management team will assume management of the business on completion to expand their business and grow their platforms worldwide.

James Ballas, CEO of Blue Crush Marketing Group, commented, “I am very pleased to reach this stage of our transaction. We are excited to move forward with Ubiquitech Software and take our business platforms to the next level. The Direct Response TV and radio industry is an over 20 Billion dollar per year industry and BCMG exists to capture a segment of this lucrative and ever expanding market. We are particularly excited about our newest division, AffiliateCashExpress.com, as we enter one of the fastest growing strategies in advertising today.”

About Ubiquitech Software, Inc.

Ubiquitech Software, Inc., through its newly acquired subsidiary Blue Crush Marketing Group, LLC, is a dynamic multi-media, multi-faceted corporation utilizing state-of-the-art global Internet marketing, plus Direct Response (DRTV) Television, Radio, and traditional Internet marketing, to drive traffic to the new and emerging multi-billion dollar industries.

This press release contains forward-looking statements. Words such as “expects,” “intends,” “believes,” and similar expressions reflecting something other than historical fact are intended to identify forward-looking statements, but are not the exclusive means of identifying such statements. These forward-looking statements involve a number of risks and uncertainties, including the timely development and market acceptance of products and technologies, the ability to secure additional sources of finance, the ability to reduce operating expenses, and other factors described in the Company’s filings with the OTC Markets Group. The actual results that the Company achieves may differ materially from any forward-looking statement due to such risks and uncertainties. The Company undertakes no obligation to revise or update any forward-looking statements in order to reflect events or circumstances that may arise after the date of this release.

Yahoo Acquisition of Chinese Startup

Yahoo Acquisition of Chinese Startup

Beijing – Yahoo Inc. back shopping. A pioneering company alias startup from Beijing so the target. Is Zletic, a company that provides data analysis services purchased Yahoo social network on Thursday (July 18, 2013). However, the acquisition value is not known how many.
In its website pages, Zletic was pleased to acquire this. Founder Zletic is Hao Zheng, a former employee of Yahoo China. Hao Zletic founded only a year ago.
One of Yahoo spokesperson stated, with this acquisition, the eight employees Zletic will be brought to the office of research and development of Yahoo in Beijing.
This is Yahoo’s acquisition of the 19th under the control of Marissa Mayer. Yahoo under control Mayer likes shopping startup. Mayer wants Yahoo to focus on the realm of mobile and new generations still.
Some time ago Yahoo acquired wide startup Summly, Xobni and Tumblr. Tumblr purchased with cash worth U.S. $ 1.1 billion.

Crank Software Selects GrammaTech to Turn Up Software Quality and Security

Crank Software Selects GrammaTech to Turn Up Software Quality and Security

GrammaTech, Inc., a leading software developer specializing in software assurance tools, today announced that Crank Software, Inc., an innovator of embedded graphical user interface (GUI) solutions, is using GrammaTech’s CodeSonar to advance the integrity of their code.

Crank Software’s products and services enable R&D teams and user interface (UI) designers to quickly and collaboratively develop rich, animated UIs for resource-constrained embedded devices. These embedded software solutions are used in safety-critical applications, such as animated global positioning systems, in-car graphical displays and user interfaces on factory floors, so software quality and security are paramount. To enhance these areas, the team at Crank is now using CodeSonar’s advanced static analysis capability to more efficiently find and fix quality and security issues within their code.

“We wanted an innovative, high-performance static analysis tool we could drop into our process and quickly see improvements,” explained Thomas Fletcher, VP of Research and Development at Crank Software. Now that Crank’s development teams have integrated CodeSonar into their production process, quantifiable results have reinforced their choice to adopt the powerful tool. “Issues are being caught and fixed very early in the coding process. I look at these as problems I won’t have to hassle with in QA, and most critically, calls to customers I will never have to make,” he said.

CodeSonar provides Crank’s team with a high quality solution that integrates well and allows Crank’s engineers to fix problems early in development, saving time. As a result, they’ve also improved their end product and Crank Software is now feeling better-positioned for the certifications it wants to achieve to drive greater adoption. As Fletcher explained, “We wanted a comprehensive tool to push the quality and security of our software forward. And we got exactly what we aimed for.”

For a more detailed look into Crank Software’s adoption of CodeSonar, view the case study.

About GrammaTech and CodeSonar:
GrammaTech’s static analysis tools are used worldwide by Fortune 500 companies, educational institutions, startups and government agencies. The staff includes 15 PhD experts in static analysis and a superb engineering team, all focused on creating the most innovative and in-depth analysis algorithms. The company’s flagship product, CodeSonar, is a sophisticated static analysis tool that performs a whole-program, interprocedural analysis on C/C++, Java and binary code, identifying complex programming bugs that can result in serious reliability or security problems. More information about CodeSonar can be found on our website at

Make OS X Faster & Efficient

Make OS X Faster & Efficient

Because created and designed by one company, hardware and software from Apple can work optimally and efficiently. One of the advantages are when we install OS X, we do not need to fuss looking for drivers for the Mac that we use.

Moreover, because the security system, not many viruses that successfully made to screw up OS X, though there is still malware that managed to infiltrate. It was not to screw up OS X, but rather aims to steal sensitive data or personal in the Mac.

While it is arguably efficient, we can still fiddling with that OS X running faster again.
Here are some things we can do:

Hardware side

T02-436-111-make. Upgrading memory up stuck. Output for Macbook Pro 2012 to the above, this is not possible, because the memory is soldered directly to the motherboard. Even so great a minimum of memory available is quite capable, which is 4 GB. 4 GB of memory is the minimum for all major applications in both heavy-and could not walk comfortably. The bigger the memory, the better.

2. Upgrade the hard drive. Mac can walk comfortably if enough free space available in the T02-436-make-12partisi existing OS X. In order to walk comfortably, should be available at least 30 GB of free space. If you use a heavy application sorts PhotoShop, AutoCAD, or the other, there are at least 80-120 GB of free space on my hard drive. So get used to the data stored on the internal hard drive external hard drives that can have empty space relief. If forced, upgraded hard drive to a larger capacity. If you can, use a hard drive upgrade to SSD. It is still expensive, but the performance is much more hurried.

 

Software side

T02-436-21a1-making. Repair Disk Permissions. Actually this procedure is to check whether the file status in accordance with the original. File status could change as the applications that use them have problems. As a result, the Mac can run slow or weird, such as the application of a sudden go out alone, running slower, slower booting, and other sebagainya.Caranya quite easily, run Disk Utility> click on the existing partition OS X it> click repair permission and wait until the process is complete. If you’ve done repair permissions, more afdol followed by a second step.

T02-436 T02-make-436-21b-21c-making

T02-436-22-fetched

2. Reset NVRAM. Non-Volatile RAM or NV-RAM is an OS X application and keep most of the settings that we often use. The goal is that we run the application on the condition that we use. But at a certain point, the NV-RAM will be full and will actually make the Mac went awry. How to reset the NV-RAM is quite straightforward, we turn on the computer and then we immediately pressing Cmd + alt + P + R and press and hold until dueng Mac emits three times.

3. Provide enough free space on the disk / partition OS X is. The trick is to move the data to another hard drive and remove any unwanted applications. With so many free apps available on the AppStore, maybe some of us a lot of the “greedy” to install the free application. In the end, many of these applications are not suitable for us and ultimately make the hard drive so full. Most applications are indeed living discard the application file to the trash. But it does not hurt to uninstall the application using software like CleanApp, AppZapper, CleanMyMac, etc..

T02-436-244-make. Clean desktop. Try not store any files on your desktop as this will slow down the boot. Each boot, OS X will prepare a file on the desktop that can be accessed at any time. If only one or two files it may seem, but we would feel if a desktop full of files.

 

T02-436-255-make. Delete unneeded languages. Mac provides multiple language that is easy to use by people from various countries. Surely we do not need all of the existing language. If only need English only, we better just delete the language that we do not need, especially when they take a big enough hard drive space. The easiest way is to use Monolingual which can be downloaded from http://www.monolingual.sourceforge.net. The trick is easy, just check the language that you want to delete and click remove.

T02-436-26a6-making. Turn off animation. When running the application, mac will display an animation that gives the impression that the application is open from the icon that we double-click the. When the mouse over the application icon in the dock line, the application automatically enlarges. Such animations can we Disable that Mac go faster. Run the System Preferences> Dock> uncheck the choice of animate opening applications. Also do not use the option of changing the existing wallpaper in System Preferences> Desktop & Screen Saver.

T02-436-make-26b

 

T02-436-27-fetched

7. Set the Startup Item. Some immediate applications come running when OS X booting. Check if there are applications that do not really matter that went along with running. I run the System Preferences> Users & Groups> and check the applications that do not want to run at startup.

 

Mac Monitor Every Time

After performing such optimization step above, of course, we should be able to monitor the Mac that is always in top condition. Some steps we can do include:

T02-436-31-fetched

 

1. Activity Monitor running. This application provides a complete and detailed information firsthand what is happening on the Mac. So when Mac was running slow and do not know why, we can run the Activity Monitor and find out.

a. Button to shut down the application. Once we click on the application process takes a wild and uncontrolled, click the button to turn it off.

b. Percentage of CPU used by an application. Applications that run normally just use cpu power is not more than 10%. More than that, the application will be considered illegal and should be turned off. Applications typically do not have errors and uncontrolled eating up 90% cpu power. No wonder Mac can be slow.

c. This is the part where we can see the other processes of the cpu, such as memory, disk activity, disk in use, and network. Some of them are equipped with a chart showing the current work process.

T02-436-32-fetched

 

2. iStat Menus. This application can display the information that we need in the menu bar, so we only glance we can determine the condition of the current cpu. This application can be purchased at macupdate.com costs 25 dollars.

 

T02-436-333-make. Daisy Disk. Very useful for hard drive clean up when we needed space. Daisy Disk folder instantly displays the big size, so we know which folder has a large file. Can be purchased in the App Store for USD. 95 thousand.

 

T02-436-344-make. Memory Clean. As we know, that we run most of the applications will be put into memory. The problem is, when we close the application, most will still be stored in memory. Over time the memory will be full and the computer was so slow. Used to be the only way to clear this memory just by turning off the computer or restart. Now we can use the Memory Clean with one click direct memory clean. Purge memory several times in order to get maximum results. Download it for free in the App Store.

Yahoo! Acquisition AdMovate, Develop Mobile Advertising Service

Yahoo! Acquisition AdMovate, Develop Mobile Advertising Service

Internet giant head of Marissa Mayer, Yahoo!, recently rumored to re-acquire a startup working in the areas of mobile advertising, AdMovate. The umpteenth time that the acquisition by Yahoo! Yahoo! is regarded as an effort to improve service advertisements that are considered “lackluster” lately.

Yahoo! via his blog on Tumblr, has officially announced the purchase AdMovate engaged in the mobile advertising services. AdMovate parties themselves have confirmed this issue by stating that they were aimed at helping advertisers to reach consumers at the right time and place via private message certainly be provide by AdMovate.

Quoted from a news release The Next Web today (18/7), Yahoo! states that carried AdMovate personalization technology can improve the ability of Yahoo! in advertising through the mobile platform. In addition, after the acquisition of all employees AdMovate instantly brought to the Yahoo! offices are located in Silicon Valley, USA.

Marissa Mayer as CEO of Yahoo!, concerning this acquisition had expressed interest in re-focusing the Yahoo! mobile services that could be left behind. According to him, the future of Yahoo! ‘s business models will be on the mobile segment in which this segment continues to experience a significant increase, “Yahoo’s future is on the phone. So we put the products for mobile phones, “he said.

In a blog post on tumblr, Scott Burke who is SVP of Display Advertising and Advertising Technology Yahoo! said Yahoo! is now trying to focus on investments in the mobile segment, “Yahoo is currently investing more in the purchase program and advertising on mobile phones,” she called.

Description Scott was indeed not a hoax. Yahoo! is just a period of four months was reported to have acquired 10 startup that Summly, Astrid, Milewise, Loki Studios, Go Poll Go, PlayerScale, Rondee, Ghostbird Software, Tumblr, and most recently Qwiki, and it is almost entirely a startup working in the mobile field. With the acquisition AdMovate which is a provider of mobile advertising services, then shopping “wholesale” a la Yahoo! The Yahoo! could be an attempt to break through the mobile industry is growing rapidly these days.

5 Coding Hacks to Reduce GC Overhead

5 Coding Hacks to Reduce GC Overhead

In this post we’ll look at five ways in roomates efficient coding we can use to help our garbage collector CPU spend less time allocating and freeing memory, and reduce GC overhead. Often Long GCs can lead to our code being stopped while memory is reclaimed (AKA “stop the world”). Duke_GCPost

Some background

The GC is built to handle large amounts of allocations of short-lived objects (think of something like rendering a web page, where most of the objects allocated Become obsolete once the page is served).

The GC does this using what’s called a “young generation” – a heap segment where new objects are allocated. Each object has an “age” (placed in the object’s header bits) defines how many roomates collections it has “survived” without being reclaimed. Once a certain age is reached, the object is copied into another section in the heap called a “survivor” or “old” generation.

The process, while efficient, still comes at a cost. Being Able to reduce the number of temporary allocations can really help us increase of throughput, especially in high-scale applications.

Below are five ways everyday we can write code that is more memory efficient, without having to spend a lot of time on it, or reducing code readability.

1. Avoid implicit Strings

Strings are an integral part of almost every structure of data we manage. Being much heavier than other primitive values, they have a much stronger impact on memory usage.

One of the most important things to note is that Strings are immutable. They can not be modified after allocation. Operators such as “+” for concatenation actually allocate a new String containing the contents of the strings being joined. What’s worse, is there’s an implicit StringBuilder object that is allocated to actually do the work of combining them.

For example –

1
a = a + b; / / a and b are Strings
The compiler generates code comparable behind the scenes:

1
StringBuilder temp = new StringBuilder (a).
2
temp.append (b);
3
a = temp.toString () / / a new string is allocated here.
4
/ / The previous “a” is now garbage.
But it gets worse.

Let’s look at this example –

1
String result = foo () + arg;
2
result + = boo ();
3
System.out.println (“result =” + result);
In this example we have 3 StringBuilders allocated in the background – one for each plus operation, and two additional Strings – one to hold the result of the second assignment and another to hold the string passed into the print method. That’s 5 additional objects in what would otherwise Appear to be a pretty trivial statement.

Think about what happens in real-world scenarios such as generating code a web page, working with XML or reading text from a file. Within a nested loop structures, you could be looking at Hundreds or Thousands of objects that are implicitly allocated. While the VM has Mechanisms to deal with this, it comes at a cost – one paid by your users.

The solution: One way of reducing this is being proactive with StringBuilder allocations. The example below Achieves the same result as the code above while allocating only one StringBuilder and one string to hold the final result, instead of the original five objects.

1
StringBuilder value = new StringBuilder (“result =”);
2
value.append (foo ()). append (arg). append (boo ());
3
System.out.println (value);
By being mindful of the way Strings are implicitly allocated and StringBuilders you can materially reduce the amount of short-term allocations in high-scale code locations.

2. List Plan capacities

Dynamic collections such as ArrayLists are among the most basic dynamic structures to hold the data length. ArrayLists and other collections such as HashMaps and implemented a Treemaps are using the underlying Object [] arrays. Like Strings (Themselves wrappers over char [] arrays), arrays are also immutable. Becomes The obvious question then – how can we add / put items in their collections if the underlying array’s size is immutable? The answer is obvious as well – by allocating more arrays.

Let’s look at this example –

1
List <Item> <Item> items = new ArrayList ();
2

3
for (int i = 0; i <len; i + +)
4
{
5
Item item = readNextItem ();
6
items.add (item);
7
}
The value of len Determines the ultimate length of items once the loop finishes. This value, however, is unknown to the constructor of the ArrayList roomates allocates a new Object array with a default size. Whenever the internal capacity of the array is exceeded, it’s replaced with a new array of sufficient length, making the previous array of garbage.

If you’re executing the loop Welcome to Thunderbird times you may be forcing a new array to be allocated and a previous one to be collected multiple times. For code running in a high-scale environment, these allocations and deallocations are all deducted from your machine’s CPU cycles.
%0