Jump to content

  • Log In with Google      Sign In   
  • Create Account

Awesome job so far everyone! Please give us your feedback on how our article efforts are going. We still need more finished articles for our May contest theme: Remake the Classics

DjMaSh

Member Since 18 Oct 2006
Offline Last Active Feb 21 2012 03:50 AM
-----

Topics I've Started

Network bottle neck?

08 February 2012 - 05:34 PM

Im writing my first ever client/server model, and im finding my implementation is too slow, but im not sure what the bottle neck is.

It consists of 1 client and 1 server,using BSD sockets. Both sockets are created using:

socket(AF_INET, SOCK_STREAM, 0);

The server socket is set to non blocking using:

u_long iMode=1;
ioctlsocket(Socket,FIONBIO,&iMode);

My client repeatedly sends the mouse position every frame to the server using write. It does this when ever the mouse moves. Thats all it does, so its going pretty fast. It doesnt perform any reads.

My server is in a simple loop, where each frame it:

- performs a read on the connected client socket, decodes the message if there was one, then sets the position of an image to the x/y position from the message
- draws the image

data is read and written using send() and recv()

However im finding there is significant lag. I would have thought it could handle this?

Im not sure where my bottle neck is?

Breakout code design exercise

02 February 2012 - 01:19 AM

Hi all,

Id like to do an exercise to come up with a code design for the traditional game breakout game (google if unsure)
using an entity component system to see what designs you all come up
with, and to practice my designing skills =P.

I have my own ideas how to design it, but im more interested in the way other people think, and hopefully I might learn a thing or 2.

Im particularly interested in designs engineered towards a data-driven entity
system such as Artemis, where data and behaviour are split into components, and systems processing those components:

http://t-machine.org/index.php/2007/11/11/entity-systems-are-the-future-of-mmog-development-part-2/


For simplicity, I want to focus on:

Objects:
- Ball
- Paddle
- Blocks
- Powerups
- Bullet

Behaviours:
- Ball travels with linear velocity, initially at a random upward angle.
- Ball bounces off left, top, and right boundaries
- Ball bounces of blocks
- Ball bounces off paddle

- Paddle can move left and right

- Blocks disappear when a ball touches them
- Blocks disappear when a bullet touches them

- Powerups have a chance of spawning when a block disappears
- Powerups travel down the screen until they hit the bottom boundary, at which point they are destroyed.
- A powerup is engaged when it collides with the paddle
- Powerups do not collide with blocks
- Powerup 1 - Ball sticks to paddle instead of rebounding
- Powerup 2 - Paddle is elongated in size
- Powerup 3 - Paddle can shoot bullets when fire is pressed for x seconds

- Bullets travel up the screen
- Bullets are destroyed when they collide with a block
- Bullets are destroyed when they hit the top boundary

- 3 lives
- loose life when ball touches bottom boundary
- game over at 0 lives
- game win when blocks == 0


So yeah, if you could list the components you would use to build those 5 objects, and what systems you would use to implement those behaviours, and how those systems would process your chosen components.

This is all about the details!
Hopefully someone is actually keen to give this a crack lol.

There are so many different ways this could be done. Im interested in your way

GPU Gems VS ShaderX

19 February 2011 - 06:27 PM

Hey,

I am just starting out shader programming and I'm looking for a book that can advance my shader programming skills. The two main gpu programming book series seem to be GPU Gems and ShaderX.

What is the main difference between these series? What would you guys recommend I buy?







PARTNERS