Jump to content

  • Log In with Google      Sign In   
  • Create Account


CC Ricers

Member Since 04 Jul 2004
Offline Last Active May 13 2013 10:08 PM
-----

#5050382 When does the failure end?

Posted by CC Ricers on 05 April 2013 - 12:46 PM

I'm not sure if you intended to post in the Music forum, sounds more like a Breaking In Topic. Unless you were applying for a musician job and you did want to post here. Also, some background on your education and jobs would be helpful. I can relate to Kylotan's words on the harsh reality. My own harsh analogy is, each interview is like taking a college exam, where the "teacher" will only pass the top 5% who take it :o

 

I recently intereviewed to a (non-gaming) developer job in which they commonly used a framework I am not familiar with, but my knowledge of MVC and other frameworks/CMSes using the methodology would make me good at learning it quickly. They were accepting of that fact, and would provide ramp-up time. Unfortunately, and perhaps not surprisingly, they interviewed someone who did know the framework, and he was hired.

 

So although on-the-job training and ramp-up to get working with the tools the company uses is not an impossibility. But with competition that can bypass that, it becomes more and more improbable to get in that situation.

 

Honestly, the closest I've ever gotten to get into the games industry (even if it was just QA) fell short, for what to me a pretty dumb and disappointing one- I have no car and their location was out of my reach, so I could not plan an interview in person, much less travel every day to work there. I was in college at the time.




#5050063 Loading and storing game assets in a Entity Component system

Posted by CC Ricers on 04 April 2013 - 01:46 PM

I am trying my hand at my first entity-component system after a newfound love for the concept reading the recent GameDev article (because the other articles I've read on the subject didn't do a good enough job to make things clear as an intro to it). It's pretty clear to me right now how an aggregate of components can define an object's behavior. But as they are mostly data containers, I assume it should be a system's responsibility to load the data from the file system, correct? Should it be the same system that acts upon the component on every update?

For instance, if I have a Sprite component that holds a texture for the sprite, and I want to load this when I need the sprite, I picture having a GraphicsSystem with a Load function to prepare the appropriate Entities it needs to work on.


Some pseudocode would go as such:

 

// Main game code

GraphicsSystem graphics;

LoadGameContents()
{
    GameObject objectWithSprite = new GameObject();

    objectWithSprite.AddComponent("SpriteComponent");
    objectWithSprite.Component("SpriteComponent").textureName = "texture.png";

    graphics.LoadAndRegister(objectWithSprite);
}

// In SpriteComponent

String textureName;
Texture spriteTexture;

// In GraphicsSystem

List<GameObject> graphicsObjects;

LoadAndRegister(GameObject object)
{
    if (object.HasComponent("SpriteComponent")
    {
        Texture spriteTexture = LoadTextureFromDisk(object.Component("SpriteComponent").textureName);
        object.Component("SpriteComponent").SetTexture(spriteTexture);
        graphicsObjects.Add(object);
    }
}

 

So in this example the graphicsSystem takes care of the loading, which would be called only when the game or a game state is initialized. The same graphicsSystem would also draw the sprites from its list of GameObjects to the screen in a different function. The texture data is stored in the SpriteComponent.

 

Is this a common way to store and load assets in a game using Entity Components? I've just seen the Entity Systems being talked about as they are used in the update loop but I was wondering about their use during initialization.




#5049035 Game Engine Design

Posted by CC Ricers on 01 April 2013 - 06:50 PM

Meh, I think that graph in wintertime's link nails the idea down very succinctly.

The thing with me is, I am staying away from making a multi-function, general purpose game engine and just doing something that fulfills one core aspect (graphics), but that in itself can still be general purpose. Right now I plan to halt my "main" engine progress to work on two games, one big and one small. The big game will be longer term but in the meantime I still want to produce smaller games that take less time.

 

My smaller, as of yet not started, game will take code from what I have made in my graphics engine and re-purpose and trim it in size to only keep what I need for the game. So it's going to be sort of a "lite" version of the engine. I still prefer each domain of logic as separate as possible and only have some wrappers as helper code with which to tie certain aspects together, like making a game object that needs both a graphical and physics representation.




#5048803 [TUTORIAL]How to make a register/login/logout system for your game in PHP.

Posted by CC Ricers on 31 March 2013 - 11:53 PM

Also, use parameterized queries to keep searches cleaner and quicker.

 

You don't have to loop through the entire set of rows. Where's the WHERE clause? Build a query which will complete something like "SELECT username, password FROM users WHERE Username = $username AND password = $password"




#5047741 Voxel engine, storage of blocks

Posted by CC Ricers on 28 March 2013 - 01:35 PM

I would explore the octree approach, though that also comes with its own challenges of figuring out how to represent the octree in a structure so as to make it efficient to store and read as well, because the number of octree leaves for each chunk can differ greatly from one another. 

 

Edit: Never mind, I realized you can store the octree data by assinging each leaf for each level a different number ID. This makes it much easier to understand and apply. All the solid areas can then be represented by the biggest leaf possible that encloses it by only storing these numbers. Numbering them, for example, starting with the top-most level (single leaf) is 0, next level down are 1-8, next level down 9 through 72, etc. Going down one level to subdivide a leaf by multiplying the current leaf's ID by 8, and then adding 1 through 8 to get the inner leaves.




#5047366 Point Light's Effect On A Rotating Pyramid

Posted by CC Ricers on 27 March 2013 - 02:05 PM

My guess is that you are just using per-vertex lighting, and the pyramid, having very few faces, will see a sharp gradation in lighting as it turns. I'm mostly basing on the fact that you are using a fixed function pipeline instead of shaders.




#5045031 What does 2.5D actually mean?

Posted by CC Ricers on 20 March 2013 - 04:22 PM

I didn't know that it had two definitions but I guess the wiki is right.

 

2.5D ("two-and-a-half-dimensional"), 3/4 perspective and pseudo-3D are terms, mainly in the video game industry, used to describe either:

 

2D graphical projections and similar techniques are used to cause a series of images (or scenes) to simulate the appearance of being three-dimensional (3D) when in fact they are not, or gameplay in an otherwise three-dimensional video game that is restricted to a two-dimensional plane.

 

Until today, I was only aware of the latter.  Live and learn.

 

The second definition is coming more and more into use for describing current games. Because 3D is still preferred for artistic reasons, but the design of the game applies a limited degree of movement as in 2D, there have been more games showing up that want to offer a "classic" gameplay experience but with modernized graphics.




#5045018 Drawing sprites without a texture

Posted by CC Ricers on 20 March 2013 - 03:42 PM

I don't remember the specifics, but you can make the texture during runtime by locking a texture resource and writing the pixel color to it. What I usually do is create a single 1x1 white texture for all uses, and a helper function to draw a rectangle area for the sprite using that texture. The function would also let you set your own color, which to multiply with the white texture. Either in your drawing code or pixel shader will do.




#5044936 Xna animation without using skinned model example?

Posted by CC Ricers on 20 March 2013 - 11:01 AM

Skeletons in a model are essentially a collection of special mesh deformations, which influence an object based on vertex weights you give the model during its creation. Since your model does not use a skeleton, it does not have vertex weights so it cannot be skinned in the way you would expect.

 

Robots (and other mechanical objects) need matrix transformations that are only local to specific parts of a mesh, and it's ideal to export your model into a group of meshes, one for each pivot sphere, limb, etc. Then you can apply movement to the parts individually.

 

Here's an example of a tank with animated parts in a more rigid fashion. Each part is a separate mesh and has a bone matrix transformation applied locally to move each part. You animate the bones not in the way a skinned model would, but with rigid transforms over a hierarchy of parts.




#5043123 How to implement gamestates

Posted by CC Ricers on 14 March 2013 - 12:55 PM

Also, a more slimmed down version of the game state system does away with the game state manager or a similar concept. Instead, it just uses a group of GameStates, and each returns a GameState object at the end of the Update() function.

 

The game state can return itself, so it continues running every frame, or a different state if game conditions require that you switch to a different one. It's a bit harder to wrap your head around if you're still learning OOP, but for many games it can work pretty well without the overhead of coding a manager class.




#5042445 Starting Game Engine

Posted by CC Ricers on 12 March 2013 - 02:58 PM

You gotta walk before you run. Learning the basics of C++ is trivial, but applying it to real-world applications, not so much.

 

Applying what you learned, code simple console window games all by yourself if you haven't already, instead of trying to modify someone else's more complex code. You should try to make games like Hangman, Tic Tac Toe, or a small text RPG if you're feeling a bit more ambitious.

 

I once tried to follow a SDL tutorial before completely understanding pointers or objects and classes. Classes aren't a hard requirement with using SDL but the tutorial used them so it went way over my head. Understanding these concepts comes quicker in smaller console programs so you aren't distracted by with things that are API specific like setting up a window or rendering a model on the screen.

 

If you feel ready to go into graphics, use SDL, SFML or something similar. Then go with the basic 2D games (Pong or Snake are good ones).




#5040611 Monogame and cross platform multiplayer

Posted by CC Ricers on 07 March 2013 - 05:13 PM

Actually, MonoGame does use Lidgren and it is required to include with the framework.




#5040127 Game Loop Not Repainting

Posted by CC Ricers on 06 March 2013 - 03:06 PM

You probably need to force a redraw whenever the controls are idle. A straightforward way shown here is using a Timer control, and using the Timer.Tick method to call Invalidate, telling the control to draw itself again. I've seen this used in the XNA Winforms sample.

 

Moving to XNA would be a good choice- it takes over the message loop in its looping functions.




#5039150 Painting texture layers - pixel shader

Posted by CC Ricers on 04 March 2013 - 02:15 PM

From my experience disabling mipmapping lowers framerate in many situations, especially if the texture is being drawn to many pixels like a terrain would. Not so much a problem for closer objects than it is for farther ones. Part of the extra GPU work of not using mipmaps also results from determining which texel takes priority for a given pixel.




#5039144 God Rays + Alpha ( is it possible )?

Posted by CC Ricers on 04 March 2013 - 02:06 PM

Here's a cheap way to get God rays in screen-space. It's an adaptation of radial blur with the center pointing to the light source. Here's what looks like.


It works like this:

- Find the light's position in screen space

- Compute the intensity of the rays using the direction the camera is facing in relation to the light

- Create a low-res mask texture to only allow the sky to contribute to the blur (depth buffer is good for this)

- Apply the mask to a downsampled render target of your scene, so it only keeps sky pixels

- Blur the pixels in the direction of pixel position to light's screen space position (most costly step)

- Add the blurred texture times intensity to the original scene render

 

Optionally you can have a threshold for luminance on the blur.






PARTNERS