Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


Member Since 07 Oct 2011
Offline Last Active Yesterday, 11:26 PM

#5188304 input in realtime.

Posted by irbaboon on 21 October 2014 - 08:09 AM


Every time I see a "realtime" thread, one moronic wannabe just shows up trying to make the OP feel as stupid as possible.
It is incredibly obvious that the OP is a beginner, and doesn't need actual realtime input.

Correcting misconceptions of a beginner is a very important step, especially because such misconceptions can make researching your own answer extremely difficult because the keywords you use are not the keywords which will be helpful. I did not see what tonemgub wrote as something to make someone feel stupid.



I just feel there are other ways to explain the difference.


I won't deny the fact that I'm overreacting, but it's just that I think beginners do not need to know things like this at the stage they're in.

They will probably not understand what you are talking about with the knowledge they have, so they will assume it's hard to check for input or use a timer.


You have to realise that people do not react to information the same way you do. Just because you understand what a post means, does not mean the relevant OP will understand. 

#5188285 input in realtime.

Posted by irbaboon on 21 October 2014 - 05:00 AM

You will never be able to get real-time input from any Windows operating system, as these are not real-time operating systems (RTOS). Windows lets you get keyboard presses and depresses as events (and you can also get the internal timer value for when this happened) as window messages sent to a window, or to get the state of the keys (pressed or not) at any time. It's up to you to use all of these in such a way that the user thinks everything is happening in real-time.


Also, console programs are a bit different, as they put the key events into an input buffer that you can read from, and in this case, I don't think you can get the timer value for when the event happened...


Since you haven't specified what sort of program you are writing (console or GUI), the question still remains too broad for us to give you a straight answer.


Every time I see a "realtime" thread, one moronic wannabe just shows up trying to make the OP feel as stupid as possible.

It is incredibly obvious that the OP is a beginner, and doesn't need actual realtime input.



Lol at the downvotes. I'm speaking the damn truth. It's okay to mention that realtime isn't the correct term.

However: "omg but realtime is not possible on Windows" etc... that is the kind of attitude that I am talking about here.

Why not just casually mention it and move on to actually answering the question?

Don't just treat the topic as if it actually is something else than what the OP intended.

#5166109 Terrain - map editor

Posted by irbaboon on 10 July 2014 - 08:28 PM

I would go height map for a terrain editor. Bullet's height map object allows for the map array to be dynamically modified. Creating a new btBvhTriangleMeshShape every time the terrain is modified may or may not be too slow, but using the height map wouldn't require quite as much Bullet-related code.


On the other hand, do you really need physics *while* the terrain is being altered/extruded/etc? You could stop physics, allow the user to extrude (terminology?) a hill, and then start simulating again after building a new btBvhTriangleMeshShape. If your editor includes placing other objects (like debris), you might need to use an invisible sphere to push away other objects before creating a new btBvhTriangleMeshShape. Or even try to detect which non-static objects would need to be moved and just warp them above the new highest point in the area and let them fall back down (the user will have to re-place them, but hey, they rose a hill there).


Disclaimer: I've never written such an editor; I use Blender (poorly).


True, that is an advantage to using a heightmap. But it really limits how you can edit the vertices.


As for the triangle mesh method:

I suppose I can disable physics while editing, which would make it necessary to make a new class which has the vertices. The problem I can see with that, is I would need to reimplement certain features Bullet does for me, such as raycasting. 


Anyone else have any thoughts?

#5166102 Terrain - map editor

Posted by irbaboon on 10 July 2014 - 06:45 PM

I've been getting into 3D for a while now, and I'm using Bullet Physics for physics, and OpenGL 3+ for graphics.

Up until now, I've used Blender to create a map, and then load it to a btBvhTriangleMeshShape for use in Bullet. 


However, I want to create a map editor, and I first thought the easiest way would be to use a heightmap. This requires the entire terrain to be in a grid however, and that makes it hard to make good terrain without making a small grid full of unnecessary vertices. Therefore it seems like I can't use that.


I've tried Googling for resources on how I should go about this, but it's always topics which do not help me.

What I've been thinking about is to make the map in the editor a btBvhTriangleMeshShape, but I don't see any way to quickly modify vertices.


I hope anyone can give me some advice on what I should do.



#5152803 opengl question

Posted by irbaboon on 10 May 2014 - 09:11 PM

well then am I just stupid?

Way to miss the point.



To clarify. Yes. I now see you as a stupid person.

#5152801 opengl question

Posted by irbaboon on 10 May 2014 - 08:47 PM

I'm sorry, but have you been trolling for a whole decade now?

Downvote me all you want, but I can not stop laughing.


Phil, have you really been programming for 10 years? I looked at your first posts, and I'm amazed at how you're still trying to grasp the basics.

If you haven't managed to understand the basics by now, you will probably never do so.


I have a feeling I'm not the first one to tell you this.


I'm honestly feeling really, really weird writing this post. I just can't comprehend the fact that you've been trying to learn programming for 10 years. It feels like I'm daydreaming and that my post doesn't make sense. It is just that weird.



Also, you say: "Am I just stupid?"

Sure, that might be the case. However, it's maybe the fact that you do not have a talent related to programming.

People like to say that as long as you work hard enough, you will accomplish things. The reality of it is that you have to work hard and be talented.

Let's face it; you have no talent within the realm of programming. Try something different.

#5152017 Circular Dependency with Pimpls

Posted by irbaboon on 07 May 2014 - 05:32 AM

Well, it seems like this would become a huge mess.

I'll stick with void pointers for now, and see what happens.


Thanks for your posts however.



Lol, just because I said I will see how it goes with void pointers, I get downvoted?

I mean, I get that they're hated, but seriously?

#5075756 How to Program SDL More Efficiently?

Posted by irbaboon on 06 July 2013 - 11:58 AM

So I wrote my first SDL game (don't ask why I'm still using SDL, it's a programmer's thing)


SDL is in no way outdated or lacks features. I don't quite understand why you brought that up.


Also, since your background doesn't have many details, you should go for PNG instead of JPEG.


As for the BMP question. When you load an image, SDL will load the pixels from the image file to the surface. A BMP file will load faster because there is no compression, but there won't be any significant difference. BMP files get bigger by the amount of pixels, so they can be used for small icons, but you should use PNG either way to be honest.

JPEG should be used for very detailed backgrounds. (if space is an issue of course)

But beyond loading, there is no performance difference between different image formats. As pixels are pixels.


I do not have much experience with SDL surfaces and blitting, so I'll leave it at that.

#5074142 SDL Key/Mouse Simplified Intput Class

Posted by irbaboon on 30 June 2013 - 07:38 AM



As for why #defines are generally considered bad practice, consider this:

#define FIVE 3 + 2
#define FOUR 4

std::cout << "The wrong result: " << FIVE * FOUR << std::endl;


Which is why it's recommended to do this:

#define FIVE (3 + 2)
#define FOUR (4)
std::cout << "The correct result: " << FIVE * FOUR << std::endl;

I do agree that constants or an enum is a better choice though.


Just thought I'd defend #define a bit. rolleyes.gif

It's very useful at times. Just needs to be used when it should be used.

#5073141 Joysticks - Controller ID?

Posted by irbaboon on 26 June 2013 - 11:32 PM

I am going to support configuring new controllers, but I still want to have preset controllers.

So that the user does not have to configure the controllers themselves. A better user experience basically.


I got an idea though, I can just have the XBOX360, Nintendo 64 and other presets in there, and when the user selects a controller, they have to specify what controller it is.

If it's a GameCube controller for example, they have to add a preset themselves, but if it's an XBOX360 controller, they can just select the 'XBOX360 preset'.


This could work out pretty well.


Anyway, thanks for your input on it, kburkhart84.
I'm not sure if you implied   what I just said   in your message, but I suppose this works best either way.

#5000070 C++ - Is Goto a Good Practice?

Posted by irbaboon on 11 November 2012 - 07:06 PM

Is goto a good practice?

Is synonymous with

Is jumping into a volcano a good idea?

#4916427 My program seems to have a memory leak, but there's absolutely no explana...

Posted by irbaboon on 24 February 2012 - 10:51 PM

while(!done)             // Loop That Runs While done=FALSE

Posted ImageSorry. Just had to :)

#4870291 [Solved] Loading part of an image

Posted by irbaboon on 07 October 2011 - 04:40 PM

Solved, I am using glTexCoords to render a part of the image.

How would I do that?
A while ago I made a game that required a tileset and I just split up the tiles I needed into separate files as I had no idea how to load them through code.

Libraries I use: SDL w/ SDL_image and OpenGL.

I have been searching on Google for a while, but I find nothing relevant to my problem...

Thanks in advance, :)