erasing text

Started by
30 comments, last by phil67rpg 11 years, 6 months ago
thanks spiro, I will work on your solution. I will study up on game loops.I am trying to write better questions.
Advertisement
OMG Spiro. Laughing so hard. laugh.png

?, ?????, ???????????
void hurrrrrrrr() {__asm sub [ebp+4],5;}

There are ten kinds of people in this world: those who understand binary and those who don't.
I have done a great deal of research about game loops, message pumps, windows messages, windows threads and timer functions. I also read about splash screens and finite state machines. I still want to erase text on the screen. After much research I am still stuck on how to solve this problem. Google is my friend. Go easy on me I am attempting to ask better questions. Basically I am confused about how to use game loops.My question is when in the game loop do you print text to the screen and then print black text to the screen. Fastcall22 gave me some code and a explanation on how to use game loops I would like just little more information on how to use game loops.
Such as?
void hurrrrrrrr() {__asm sub [ebp+4],5;}

There are ten kinds of people in this world: those who understand binary and those who don't.
OK, fundamental misunderstanding here.

When you're drawing stuff you don't just set down a baseline and then only change stuff that needs to be changed.

Instead, for each frame, you first clear the screen - everything goes away - then you draw everything all over again. The "draw everything all over again" part is where you can remove stuff that you don't want to draw and add new stuff that you do want.

This flies in the face of all logic if you come from an "everything is software" mode of thinking, but this is actually the way GPUs like to be used. So don't try anything tricksy to circumvent it; instead use your GPU the way it wants to be used and it will be good to you in return.

If by now you're recoiling in horror and thinking "surely that's going to give awful performance" - remember - Quake did this in 1996. It wasn't a problem then and it's not a problem now.

Direct3D has need of instancing, but we do not. We have plenty of glVertexAttrib calls.

hey kathar thanks for the reputation boost, and to mhagain can you post some code.
Ok, I don't think you are actually learning DirectX, you are just using precoded functions right?
I would suggest you to learn about it first, you are missing the basic of it while you are trying to create a game.
If you don't want to get stuck in every single thing you want to do you should learn how DirectX works.
http://directxtutorial.com this is a good site to get started.
ok I am going to study this tutorial, then later go back to my game
I give up on dx9.I am going to study up on win 32.
I assume you already familiar with c++, right?

This topic is closed to new replies.

Advertisement