Sign in to follow this  
Noxir

Check bitmaps

Recommended Posts

Quote:
Original post by Noxir
Anyone know how to check if there is a bitmap 2.0f under the player?


OpenGL isn't going to tell your program if there is a bitmap under the player.. Rather it is your program which tells OpenGL that there is a bitmap under the player.. OpenGL is only for display - all it does is draw exactly what you tell it to draw. So your program needs to have some data structures which store the layout of the map or playing field. It also needs some data structure which stores the position of your player. With these two things you can write an algorithm which checks for certain things, like: is the player standing on a LAVA tile? Is he standing on an ICE tile? Is he standing on a DRAGON? etc.

Software engineering is all about using clever representations of things in data structures and clever manipulations of these things with algorithms to achieve a desired effect in an efficient manner. There's no 'magic' to it and no shortcuts.

Richard

Share this post


Link to post
Share on other sites
Quote:
Original post by Noxir
I don't get this.. How I code it myself? I mean how I'm supposed to know that.

Here is a surprise for you: That's what programmers do. They/we code stuff. And usually first they/we have to learn how to do it.

Now seriously lay off with your thread starting. I see 8 threads on front page by you. Do a bit of research first before asking everything.

Share this post


Link to post
Share on other sites
Haha I've researched very long for the stuffs I asked for but there seems no good OpenGL tutorial sites exists for RPGs etc. I'm going to buy a OpenGL book (that shows how to make a rpg etc) if you give me any good hints : )

You should never let your fears become the boundaries of your dreams.

Share this post


Link to post
Share on other sites
I don't think you can find a book about doing rpg's in particular.
All you need for the rendering and graphical representation should be in the nehe tuturials.

But a tip is to separate the game and it's graphical representation.
So you don't check if the players stand on something after/during/trough rendering.
That is done internaly in your code trough some other method like a 2d lookup array or an insane amount of if statements or whatever.

If it works, use it.
If it doesn't, do something else.
If it can't be done, cheat and just make it look like it's been done.

Other than that you just have to find what you want and then copy it.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
i suck i dont know how to do arrays etc with player positions :/ and cant find any tutorials

Share this post


Link to post
Share on other sites
You don't determine your game logic on what is on the screen, you render to the screen what your game logic determines. Keep track in your program where the ground is and where your player is, then just draw it all once you know were everything is. The bitmaps are just the paint on the current conditions.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Quote:
Original post by Kalasjniekof
I'm afraid that if you don't know how to do that you should learn some pure programming before attempting to create a game.

1 learn how to program
2 learn how to display
3 try to make a game (finally)


Actually, I already made a sidescroller game, and a rpg in OpenGL but it took very long

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this