Jump to content

  • Log In with Google      Sign In   
  • Create Account

ApochPiQ

Member Since 17 Jul 2002
Offline Last Active Yesterday, 11:08 PM

Posts I've Made

In Topic: Animated Cursor: how get frame delay?

Yesterday, 09:26 PM

.ani cursor files have a delay associated with each frame. You can see this page for some details: http://www.gdgsoft.com/anituner/help/aniformat.htm

In Topic: why i don't get the HBITMAP from file\resource?

24 May 2016 - 05:26 PM

Your resource file specifies your bitmap file as type "bmp" which is not correct. You need to change the bmp here:

subzero bmp


Change it to BITMAP.

In Topic: why i don't get the HBITMAP from file\resource?

24 May 2016 - 04:47 PM

This is the same problem you had with icons. The correct resource type is called "BITMAP" not "bmp".

In Topic: c++: sprintf but return chars. Possible?

23 May 2016 - 10:30 AM

What do you mean "if it fails"?
 
What i do now with sprintf could then also potentially fail no? I just want to compress the code i need to write. I end up in many such situations (must create a temporary char array that i inject floats and other stuff with %.2f etc and then pass it to a function that takes a "char *" parameter).



The best way to solve this is with a string class of some kind. Otherwise you're going to have a nightmare cleaning up all the heap-allocated temporary strings. Honestly, I think you're pushing the laziness lever a little too hard here. I'd be shocked if your actual coding bottleneck was declaring temporary char arrays.

In Topic: Animal-like AI

23 May 2016 - 10:22 AM

This is the wrong way to go about building a model of a simulation.

You need to start with concrete requirements - i.e. specific things that you want the AI to do. What does it even mean to have the emotions of a dog or cat? How does that influence their behavior? How will the player observe these simulated emotional states?


Those are the kinds of questions to begin with. Once you know what the observable effects of your AI should be, it becomes much easier to build a model that actually produces those effects.

What you have now is... ambiguous, I guess. Maybe it does what you want, maybe it doesn't. But cramming features into a code sketch is not going to get you a good result either way.

PARTNERS