Showing posts with label Sandbox. Show all posts
Showing posts with label Sandbox. Show all posts

Wednesday, July 27, 2016

Game-Hobby

Game-Hobby

Well I have small team of friends and we decided to make game, so a lot of problems causing us to think twice, wel first of all map, well map we thinking in future create a huge x> 1000k km, so only plausible solution is to cut into sections and render for client only 10km range(first we just thinking just stay in 100m), another thing is we make game in first person that you do actions in first person like you click, push or just watch it some things in game clock, compass, etc, next is keeping clients in 100km2(10x10) map if they in that position at least 100 that would be fine, how we should maintain it? and also weather and makes good looking in grapchic(we have talented 3d designer so he good with that), so main question which grapchic engine could provide us to these request? Thank you.

Also for objects object like house as a main object and child object is TV what should do in smart way if i want take out TV from house through game. Thank you guys for answers, I'd like to see smart answers, also if you dont understand(because in my head too much ideas), just say it and i try to rexplain it.

I have few ideas unreal engine and cryengine(damm it eats alive pc)


Horizon:zero Dawn Cloud System

Horizon:zero Dawn Cloud System

recently  i read the gpu pro 7 article <<Real-Time Volumetric Cloudscapes>>, i want to implement a volumetric cloud system myself.

 

i create the 3d noise texture accord to the article.

and write the shader, test it. but i found it's hard to model the cloud.

i use the sample cloud density code from the article, and a weather texture from the video which embed in the siggraph 2015 ppt.

and the result is not good.

 

the article didn't said how to mapping the weather texture to the sky dome?

and how to generate the weather?

i found the left bottom weather texture in the video maybe is not the original weather texture, it's just used show some info.

 

has someone do the same thing?

any suggestion will be so appreciate.

thanks.


Population Spread Simulator...

Population Spread Simulator...

I have a black and white heightmap image where rivers/ocean is black land is progressively whiter as it gets higher (as a heightmap does)

 

I want to be able to place a population, set it's fecundity rate, it's lifespan, generation length, rate of death of offspring before age of puberty, and death from pregnancy rate.

 

I then want this program to tell me how this species spreads across the map, divides into clans, and countries.

 

I want to be able to track a family line from begining to end and their associations.

 

And I need to do this through about 10,000 years. I would like to be able to track forward or backwards in time without it altering the results as well.

 

----------

 

Is there a program that does this?

How hard would this be to do?

Would anyone be willing to help me make this? 

 

Having to do these things manually is a real pain and having this would be extremely helpful. Obviously I don't do it to the extent I'm asking for but I'd like as much detail as possible to work with.

 

The main issues I see with this is the number of instances for the population which to get up to modern times, assuming a full world map would be around a billion at the end of the simulation... of course once it gets to that amount I don't think a billion individuals would be needed...


Why Does Xcode Give My Application A Command Line Argument?

Why Does Xcode Give My Application A Command Line Argument?

So, today I played around a little with my main function and decided to print out the argv and argc arguments in the main function.

This resulted in the following being printed out : 

Commandline argument amount : 1.

1. /Users/name/Library/Developer/Xcode/DerivedData/Playground-bdassylsrksorocyjtssfnwfbkpg/Build/Products/Debug/Playground

Input anything to continue.
a
Program ended with exit code: 0

After the '1.' it prints out the command line argument, my question is why does it have that command line argument? And what is it used for?

 

Here's the code I used for this little program : 

#include <iostream>

int main(int argc, const char* argv[]) {
    
    std::cout << "Commandline argument amount : " << argc << "." << std::endl;
    
    for (int i = 0; i < argc; i++)
    {
        std::cout << std::endl;
        std::cout << i + 1 << ". " << argv[i] << std::endl;
    }
    
    std::cout << std::endl;
    std::cout << "Input anything to continue." << std::endl;
    std::string inpt;
    std::cin >> inpt;
    
    return 0;
}

Multi Vertex Buffer And Inputlayout

Multi Vertex Buffer And Inputlayout

Hellow!

I'm going to do skin mesh, I don't know whether I 'm in the right way.

Here's the code:

struct Vertex1 
{

  float3 pos;

  float3 normal;

  float2 texcoord;

};

 

struct Vertex2 
{

  float4 weights;

  float4 ids;
};

 

And I have 2 vertex stream,  std::vector<Vertex1> v1,  std::vector<Vertex2> v2, then I use these 2 stream to create two vertex buffer  vb1 and vb2;

The question is : 

How to set vertex buffer?   VSSetVertexBuffer( 0, 1, &vb1);   VSSetVertexBuffer( 1, 1, &vb2);

How big the stride ?  sizeof(Vertex1) + sizeof(Vertex2) ?

 

Another question is :

If I want to combine the two kind of vertex, how can I do ? 

 

The new Vertex look like this: 

struct Vertex
{

  float3 pos;

  float3 normal;

  float2 texcoord;

  float4 weights;

  float4 ids;
};

If the mesh is not skined, I just use pos,normal,texcoord,   can I set the stride to sizeof(pos) + sizeof(normal) + sizeof(texcoord)?  and use a input layout with 3 elements?

When the mesh is skined, the whole Vertex will be used, and the input layout will be 5 elements.

 

 

 

 


Tuesday, July 26, 2016

2.5D Movement Problem

2.5D Movement Problem

I'm a newbie working on a 2.5D game, and I've run into a bit of a problem with the character movement when it comes to UP and DOWN controls that handle depth.

 

The objects in this game are in a 2D top down world space, and in rendering they are put into a walking area with a front to back perspective transformation.  Mainly I'd like to scale them appropriately as they walk towards or further from the screen/camera.  This is then all put over top a 2D background.  The issue is that the strictly up and down movement in the world coordinates is going to render showing them following along the imaginary perspective lines.  Meaning that at any point off the center of the screen, UP/DOWN becomes a diagonal movement that gets wider the further off center the player is.  This makes for some really wonky controls that are hard to navigate.

 

I've attached an image depicting the problem, and what I would prefer to achieve.

 

2.5D problem.png

 

I'd like the movement to actually just go up and down, but maintain their world position accurately for collision detection.

 

There were a few thoughts that I had, and I was wondering if someone with more experience could tell me if I'm headed in the right direction.

 

My first idea, a not very ideal one, was to split the physics and rendering on the X axis.  The rendering would not scale the X into perspective, but the scaling amount would be captured in the physics and scale movement speeds and collision width.  Creating a strange distorted physics world, but rendering the way I'd like.  I've done this one part way and so far seems to work, but I worry about collision detection.

 

Now I'm wondering that maybe it's sensible to apply some sort of transformation to their movement force vectors, so they will orient to a path in world space that will create the desired results in rendering.

 

Last was that perhaps there is some other method of projection I'm not yet aware of that will get me the sprite scaling effects without the movement side effect.


Using Convolution Network To Upscale Texture?

Using Convolution Network To Upscale Texture?
There was some outstanding demo of deep neural network being developed for artistic purpose. Google wrote deep dream which mix a content image and a style image and output an image combining both. Neural doodle extend the idea by taking a single 4 color map and output a "Monnet like" picture.

I wonder if it is possible to create and train a dnn that could upscale a texture. I know it has been done for manga/anime picture, and neural doodle can be used to "transfer" high resolution picture on minecraft blocky texture.
Unfortunately I have no experience with dnn. I know the theory behind neural network and I know the math Def of a convolution however I think I'm missing some knowledge to correctly understand dnn articles and latest evolution.

Is there some "dnn theory for game dev" resources available and can the technic be used to upscale texture?

How To Go About Releasing A Game?

How To Go About Releasing A Game?

I was programming my game today (about 20% complete) and thought to myself, "What am I actually going to do once this is finished?" Should I do an alpha release? Should I start a business? Greenlight it on steam? Advertise? I'm 15, with an above-average knowledge on business (for my age), and I can handle a lot of things - I can make websites myself and stuff, but how would I actually go about the business part of it all? This is mostly hypothetical, because my game isn't so close to done - probably months, maybe a year away from alpha.


Ecs Gui Systems

Ecs Gui Systems

Does anyone have any tips, or articles about creating GUIs in an ECS system?

 

Would an interactive console fit well into a GUI system or would it be it's own thing?

 

I feel like, a sufficiently flexible GUI system should be able to handle a console... after all, it is only a text output and input control that triggers events based on input rather than button presses or some such...

 

I suppose I am looking for a starting point...

 

Currently I have a bunch of systems, plus the render system and the minimap system...

Each system has a priority... events are processed by systems in priority order as are updates... So I thought I might have to make two systems for the GUI, one to run after the renderer to draw the gui ontop of everything and another that updates before the playerinput control to catch input events.... which shouldn't be to bad... but I don't know what kind of components I'll need...

 


Character Animations

Character Animations

Im in the process of creating a 3rd person shooter, and im not a very good animator, so i would like to know if any of you know any good sites where i can buy soldier character animations. or if you guys would be interested in a animation "gig" you can just send me a messeage, my budget is not massive but maybe we could figure something out :)


Monday, July 25, 2016

Basic Game Object Communication

Basic Game Object Communication
D3DXVECTOR3 vpos = FindPosition(warehouse, Convert_Truck_ID_To_Name(this->m_truck_id));

 

The line is contained the class called Truck,

It needs to retrieve where it's going to park in the warehouse.

In this case, The FindPosition requires a warehouse pointer/handle to

know where to start to look.

 

I've several options here.

1) Store a global pointer of the warehouse, so I can access it anywhere

2) Use a Singleton to do the similar stuff

3) Store a local pointer, so a warehouse is always passed into the truck object (Not quite modular in this case)

4) Make use of the state machine, and let the state machine store a vector/map of game objects pointers, so it starts to look up from there inside. And I just send a message to the Truck State Machine, the truck state machine fills up the warehouse information and Just put the FindPosition inside the state machine. And it will handle the rest

 

Should I use option 4? it seems to be the preferred way to go? Not sure, so want to ask your opinion?

 

 


Billboards Problems

Billboards Problems

Hey everyone, im trying to get a 2d plane to face the camera (Billboards for particles) but im having some problems.

 

Im currently trying to construct a quaternion using angle axis to face the object to the camera but either the object is not completely facing the camera or the object flickers a lot

 

currently I am constructing the angle and axis with a vector from the object to the camera and the direction vector of the object (0,0,1)

        glm::vec3 tocam = glm::normalize(camerapos - pos);

        float angle = std::acos(glm::dot(newdirection, tocam));

        float a = fabs(glm::degrees(angle));
         
        glm::vec3 axis = glm::cross(newdirection, tocam);

        currentrotation = glm::angleAxis(angle, axis);

        newdirection = currentrotation * direction;

        glm::mat4 RotationMatrix = glm::toMat4(currentrotation);

        glm::mat4 translationmatrix = glm::translate(glm::mat4(1.0f), pos);

        modelMatrix = translationmatrix * RotationMatrix;

Is my understanding of this incorrect? i very much believe that the angle calculation is correct but that im doing something wrong with the axis.

 

 

Thanks in advance for any help and feel free to explain in detail what im doing wrong (more i can learn the better) :).

 


Compiling My Sdl C++ In Mac

Compiling My Sdl C++ In Mac
hi all,

i knw there are Hundreds of tutorials on compilation of SDL to mac whenn doing google search, but excuse my ignorance as i am new and have no idea on mac environment/platform..

i have a game written in C++ and SDL on windows/linux and wants the same code to be compiled to Mac without rewriting most of the code, is it possible? i mean how about things like file IO, etc? i am totally new to Mac, i knw in linux basic FILE IO works but in Mac i am not sure,
so how to proceed with this? can the code be compiled and run without too much effort?