Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 24 Apr 2010
Offline Last Active Private

#5309241 My Dream World

Posted by on 02 September 2016 - 06:04 PM

What's the make/model of your motherboard?

#5309240 2D Game Making Softwares For Beginners?

Posted by on 02 September 2016 - 06:01 PM

You may want to look at: http://www.yoyogames.com/gamemaker


or if you have Steam then: http://store.steampowered.com/app/214850/ (same thing, but on Steam)

#5309102 Recalculate trajectory?

Posted by on 01 September 2016 - 09:34 PM

tti = time to impact (impact time minus current time)

ptti = previous time to impact (the tti from the previous tick)

displacement = self position - target position

new position = target position + (displacement * (tti/ptti))

#5309093 My Dream World

Posted by on 01 September 2016 - 07:44 PM

My suggestion would be to save up $10 every week and just start out doing what artwork or planning you can. Before long you should have enough to buy a decent graphics card. You don't need to spend anything like $300 for a card if this is all you're after. I've been using this http://www.newegg.com/Product/Product.aspx?Item=N82E16814127783 for quite a while now and it runs everything I need just fine. Apparently there's a slightly cheaper version of the same chipset as well (http://www.newegg.com/Product/Product.aspx?item=N82E16814127836) though that's clocked a little lower. You're probably going to want to use Blender to make 3D assets, and I'm not sure you can pull it off with what you have right now, but the card there will do it just fine.


If you're interested in visual scripting then you may want to take a look at UE4 once you have capable hardware. It uses a visual scripting system called Blueprint that's decently straightforward, and is fairly similar to Unity. There are a lot of tutorials on their site as well. Game Maker Studio is free now, if you're interested in 2D. I'd recommend poking around and deciding what best fits your needs.

#5309089 Need a very simple collision detection for walls. ( 3d )

Posted by on 01 September 2016 - 07:29 PM

Is this only for the character, or also for projectiles, etc? Are your walls always perpendicular to the ground? If so then you can do circle-vs-edge, since your problem would effectively be 2D. If your geometry is static then you can tessellate it into regions beforehand and skip the broad phase entirely, since each region will know exactly what walls are within reach.
Check out http://www.metanetsoftware.com/technique/tutorialA.htmland http://www.metanetsoftware.com/technique/tutorialB.htmlto get some of the basics and gather a bit of vocabulary.

#5308635 d3d11 frustum culling on gpu

Posted by on 30 August 2016 - 05:44 AM



I think you may be missing the point of frustum culling...

#5308583 How to compute % of target visibility/cover?

Posted by on 29 August 2016 - 08:48 PM

Start here: http://ncase.me/sight-and-light/


If you have your visibility volumes worked out then you can just calculate visibility/cover geometrically on a simple collision primitive. If you put an AABB around the target then work out your visibility you can just figure what percentage of the AABB overlaps the visibility volume. If you do it in 2 dimensions it should be straightforward. You're just comparing the volume of the overlap with the volume of the AABB. If that's not precise enough for you then a circles could work too.

#5308527 Why can't I print out my std::string vector?

Posted by on 29 August 2016 - 01:00 PM


for(auto& line : map) {
  std::cout << line << "\n";



Also, before you 'fix' the Meyers Singleton, why does this class need to be a singleton?

#5307939 Enums and their extendability via mods

Posted by on 25 August 2016 - 05:53 PM

Half-decent hashing can significantly reduce the performance impact of using strings.


What you're describing is something that scripting languages are really specifically designed for though. Be careful not to spend months working on patchwork solutions and then decide to embed an interpreter and end up throwing all that work away.

#5307938 Player follow as seen in Donkey Kong Country 2

Posted by on 25 August 2016 - 05:45 PM

Looks like it's got a few techniques that it's delegating to based on distance from the player character. If it's too close it backs away slowly, if it's slightly too far then it plays back recorded player positions, if it's significantly far then it just approaches the player as quickly as possible.

#5307322 Preventing overengeneering

Posted by on 23 August 2016 - 12:13 AM

Over-engineering appears to be cathartic to a sizable population of engineers. Making things that feel more elegant to you can be satisfying, even if it doesn't actually meaningfully improve the project.

#5306989 Win loop errors

Posted by on 21 August 2016 - 02:36 AM

  • Rather than determining the winner twice (once in the loop and once after), why not use an int instead of a bool? The int could be called "winnerID" and a value of zero would indicate that nobody has won yet.
  • p2score increments by 2 every round. You can express that as p2score += 2.
  • What would happen if the scores started at 1 instead of zero?

#5306453 C++ what is in string after std::istreambuf_iterator< char >(sourceFi...

Posted by on 17 August 2016 - 07:37 PM

You seem to keep wanting to break back to C'ish behavior. You'll be much happier if you stick to idiomatic C++ instead. Mixing the two is begging for problems.
#include <string>
#include <fstream>
#include <iostream>
#include <iomanip>
#include <sstream>

#define infile "in.txt"

std::stringstream loadFromFile(const std::string& filename) {
  std::ifstream sourceFile(filename);
  std::stringstream ss;

  if(!sourceFile) {
    ss << "Error opening file [" << filename << "].\n";
    throw std::runtime_error(ss.str());

  ss << sourceFile.rdbuf();
  return ss;

int main() {
  try {
    std::stringstream stream = loadFromFile(infile);

    std::string line;
    int lineNum = 1;
    while(std::getline(stream, line)) {
      std::cout << std::setfill('0') << std::setw(6) << lineNum++ << "] " << line << "\n";
  catch(std::exception& e) { std::cerr << e.what() << "\n"; }


#5305786 Is it pathetic to never get actually helpful answers here?

Posted by on 14 August 2016 - 01:22 PM

This is your second "everybody hates me I guess I'll go eat rocks" topic in a pretty short span of time.


You're either going to do it or you're not.


If you're looking for someone to blame then just blame Chubu and then you can go away and not worry about how you failed.


Otherwise grow the fuck up and do what you have to do to make it work. Nobody here is responsible for you or for your success. If you want it, you make it.

#5305648 Is this function correct?

Posted by on 13 August 2016 - 12:23 PM

If this isn't something you do often then you could just use std::find instead of writing a function:

#include <algorithm>

bool found = std::find(vec.begin(), vec.end(), val) != vec.end();