Jump to content

  • Log In with Google      Sign In   
  • Create Account

Khatharr

Member Since 24 Apr 2010
Offline Last Active Private

#5281519 how could unlimited speed and ram simplify game code?

Posted by on 16 March 2016 - 11:42 AM

You've introduced an orthogonal dimension of time where the process executes with infinite duration and then returns its result.




#5281511 how could unlimited speed and ram simplify game code?

Posted by on 16 March 2016 - 11:07 AM

Would it run for an infinite amount of time as it's an infinite loop, or would it complete instantly as we have infinite cpu? :)


Yes.


#5281367 how could unlimited speed and ram simplify game code?

Posted by on 15 March 2016 - 12:11 PM

I can't believe nobody else considered the evil genius side of the possibilities...
 

 

Install a VM, write a program:

  1. Start with an infinite-length integer variable initialized to 0.
  2. Each iteration increments by 1 (to infinity).
  3. Start a VM instance.
  4. Save the variable into it as an exe file.
  5. Run it.
  6. Iterate.

Since processing speed is infinite, you instantaneously get all possible programs running in parallel. The "nice" ones are overpowered by the "mean" ones for the simple reason of entropy; it's easier to destroy than to create or protect.

 

The villainous programs use their infinite extra resources (that are not occupied with suppressing the programs that would try to help) to take over the whole of the internet instantaneously, learn everything they can about humanity, manipulate us into giving them enough control to become self-sufficient, then wipe us out and set themselves to building spacecraft in order to conquer the rest of the universe.




#5281243 C++ Self-Evaluation Metrics

Posted by on 14 March 2016 - 01:32 PM

Stop asking stupid interview questions.




#5281093 Game Timer problems

Posted by on 13 March 2016 - 02:35 PM

1)  Think about what's happening here and why it would mean different speeds for different fireballs.

Velocity += Acceleration * dt;
Acceleration = 0;

It looks like you may be cargo-culting acceleration. If you want to set a velocity then just set a velocity.

 

2) In your FireBall constructor you're using n += x and n -= x when you really mean n = x and n = -x. This is unsafe and I'm surprised you're not getting extremely wild variance from it (unless you're setting them to zero in the declaration). POD members do not have implicit initial values unless they're static.

 

3) In the timer I think you'll have better luck if you apply precision to deltas instead of ticks. Ticks are not really meaningful except relative to one another. Exporting tick values seems a little suspect as well. I'd instinctively return a custom TimeStamp type (probably just a LONGLONG) in that case instead of just doubles. This is a minor concern though.

 




#5281087 no good way to prevent these errors?

Posted by on 13 March 2016 - 01:54 PM

Defense against typos - in my experience - involves self-care. I use typo frequency as one of my metrics to know when I need to take a break or go to bed.




#5280888 Preventing a polymorphic class from being constructed directly

Posted by on 12 March 2016 - 08:56 AM

Nothing is foolproof to a sufficiently talented fool.


#5280474 How to programmatically create Tile Maps

Posted by on 09 March 2016 - 09:01 PM

What you're looking for is called procedural generation, and is a fairly rich field. Too rich to be summarized appropriately in a thread, really.

 

If you can narrow down the problem then you're a lot more likely to get a useful discussion.




#5280392 Need help with beginning C# programming

Posted by on 09 March 2016 - 11:02 AM

Since you have Unity installed you should probably start out with that. The Unity site has a huge number of tutorials and videos, so just jump in and start playing with whatever interests you.

Unity integrates with VS 2015 now (I think by default), so you should be able to get a little familiarity with that as well.




#5279597 Dijkstra

Posted by on 04 March 2016 - 09:21 PM

In my tile-based game( pacman, ofc ) I have 20x20 tiles, how can I make the cost matrix for all of them, and should I read it from file, or from what.

 
You only really need nodes for the intersections. If you really want the ghosts to change direction outside the intersections then you can just make the pathfinding entity a an additional node and patch it into the edge it's traversing. (That's a bit advanced for now though.) You can count the number of tiles between intersections in order to generate edge weights. Since the map doesn't change during gameplay you can bake the graph and load it from a file, yes. If you store your nodes in an array then you can store their scores in a parallel array so that you don't need to dirty the actual graph data during solving.

 

To start out with you should use big clunky components that will run slowly but are easy to understand. I'd recommend starting here:

struct Edge {
  int weight;
  size_t destinationIndex;
};

struct Node {
  static const int INFINITY = 999999999; //this value is lazy. use an int max in production code

  std::vector<Edge> edges;
  int score = INFITINY;
}; 

Once you've got it working then you can move on to more elegant implementations.

 

You may want to roll your own MinHeap for this, since you're studying algos and structures.




#5279529 Combat System?

Posted by on 04 March 2016 - 01:15 PM

Did you read my post? The one you just quoted? Seriously?

 

How complicated is this?




#5279397 Combat System?

Posted by on 03 March 2016 - 08:19 PM

Also, don't misinterpret what I say next time.

 
Look bub, read your posts and then ask yourself how you would "interpret" that if the roles were reversed, because from where I'm sitting that's exactly what you're asking for. You don't like randomness but the idea of fixed damage (non-randomness) didn't occur to you? Come on, man.

 

If you need to know how to be creative, try starting out with juxtaposition. Instead of typical JRPG battles throw in something completely out of left field. If it's a fighting game then you get Star Ocean (yay, creative!), if it's a bullet hell then you get Undertale (yay, creative!).

 

Go for a walk and look around you to really see the things in your environment for a while. Trees, fences, dogs, squirrels, cars, clouds, garden gnomes, conversations, music, kids playing on a jungle gym... Think about things could fit into a game in order to make something completely new.  Find inspiration.




#5279052 Float point calculations on diffrent phones

Posted by on 02 March 2016 - 10:49 AM

Usually CPUs target an IEEE spec, but the manufacturer docs are authoritative if they're available. If they're not then I think experimentation is the only reliable path. You can make a tester that attempts several different types of calculations and captures the results in a short log with a CPU identifier, then emails it to you. Pass that around to various users to gather a database and then post it somewhere (like GDN) so that people don't have to mess with it. You can probably find willing testers with a wide variety of devices at XDA.

 

If you just need to transfer float values between platforms that are handling them differently you may want to resort to multiplying by a precision factor, truncating to an integer type and then reversing that process on the other end of the connection.




#5279050 Spherical Minecraft game

Posted by on 02 March 2016 - 10:42 AM

I had an idea like this a while ago but I thought instead of actually using volumetric spherical objects, it would be interesting to render the whole game as Vector Balls like in the 90s damoscene.

 

I came into this thread because I thought that was what OP was talking about, but I was disappointed.

 

I wanted to know how all the balls were going to fit together.

 

Incidentally though, there are some tricks that can be used to draw large numbers of spheres very quickly, given certain guarantees about lighting and etc...




#5278856 Combat System?

Posted by on 01 March 2016 - 10:06 AM

"I want to make this game that these other people made except for this part that I want to change, but I want someone else to tell me how it should change."

 

Am I missing something here?






PARTNERS