Jump to content

SpiderPig

Members
  • Posts

    2,411
  • Joined

  • Last visited

Posts posted by SpiderPig

  1. Curious as to what peoples thoughts are on this.  Should releasing your game on Steam be the best and only choice you should make as an indie?  Or should you aim to get your game out on as many platforms as possible including selling it on your own website?  Steam takes a large cut out of your revenue - 30% if I remember correctly.   But can Steam do more for your game than a good marketing campaign can do?  And is their marketing of your game actually worth 30% of the sales - if that's even what they do - what do they do?  My Wife has just started her own marketing company so naturally I'm thinking it'd work out better for me to ditch Steam and just do a website that handles all the sales/updates and forum discussions.  I can see this being better value for money due to the website running costs and marketing costs being near a set amount per year regardless of sales - but the best and right choice?  Not sure yet.  What do you think?

  2. Is the program somehow executing the delete event when you click add?  Use a break point on bakerlist->RemoveItem(1) to find out.  If it is, then after adding one item, its trying to remove index 1 which doesn't exist yet.  Not sure why it's trying to remove it though.

     

    If you're trying to remove the last element, check if the element you want to remove actually exists in the array.

    int size = bakerlist->GetSize();
    if (size != 0){
    	bakerlist->RemoveItem(size - 1);
    }

    (Not sure what the right syntax is for the widget your using)

  3. It is expensive per frame.  Usually like you say you would only call it when you click the mouse.  I've never done this - but you could cast the mouse position into a 3d position and then detect if a ray from that position going in the direction that the camera is facing would intersect the AABB of the objects in the scene.  It would involving looping through every object (you may find a way to reduce the amount you go through depending on what your trying to find) but I'm not sure how must faster it could be, if at all.

    If your trying to detect a specific object you could add those objects too a list at start-up and do an AABB intersecting of that list only.  It won't be as accurate as a pick but it may point you in the direction you need.

  4. Now that I have this working I want to get the pixels of the texture rendered from the camera...

     

    //Setup
    auto texture = CreateTextureBuffer(512, 512);
    auto cam2 = CreateCamera(world);
    cam2->SetRenderTarget(texture);
    
    //Loop
    auto my_precious = texture->give_me_pixels()

     

    I can see SetPixels() and SetSubPixles() but no GetPixels().  Can it be done yet?

  5. I'm using Ultra - trying to do something like this.

    //Setup
    auto texture = CreateTextureBuffer(512, 512);
    auto cam2 = CreateCamera(world);
    cam2->SetRenderTarget(texture);
    
    auto panel = CreatePanel(0,0,512,512,ui);
    
    //Loop
    auto pixmap = ConvertToPixmap(texture->GetColorBuffer());???
    panel->setPixmap(pixmap);

     

  6. Its been a while since I tried something like this, the camera render draws to the screen but doesn't update as the camera moves.  Am I doing something wrong?  Or should I just draw to a buffer instead?

     

    //c++ setup
    auto cam = Camera::Create();
    cam->move(0,1,0);
    auto tex = Texture::Create(512, 512);
    cam->SetRenderTarget(tex);
    
    Map::Load("Maps/TestScene_001.map");//Just a ground plane,skybox and a few trees.  Primary camera in here.
    
    //Loop
    while (true) {
    	if (window->Closed() || window->KeyDown(Key::Escape)) { return false; }
    
    	cam->Move(0,0,0.01);
    
    	Time::Update();
    	world->Update();
    	world->Render();
    
    	context->SetBlendMode(Blend::Alpha);
    	context->DrawImage(tex, 0.0f, 0.0f);
    	context->Sync();
    }

     

×
×
  • Create New...