Advertisement

2D game in opengl

Started by January 03, 2003 09:58 AM
5 comments, last by InFlames 22 years, 2 months ago
Hi! How to setup the opengl enviroment for the 2D game (viev, ...)? Code Maniak
Code Maniak
Look at the tutorial on NeHe''s site about Ortho and Timing
Advertisement
I'm currently uploading my site to a new provider right now. it's here. if all uploads well there is a demo of a breakout game with source. it uses opengl in 2d. if it's not uploaded by tonight drop me an e-mail if you want it.

EDIT: I got my site uploaded completely. if you want to check it out just click on the link above.

My Homepage
I actually updated my website. Now if I can only find a provider that offers more than 500k upload limites.

[edited by - Julio on January 3, 2003 5:04:58 PM]
My HomepageSome shoot to kill, others shoot to mame. I say clear the chamber and let the lord decide. - Reno 911
quote:
Original post by Hawkeye3
Look at the tutorial on NeHe''s site about Ortho and Timing



Yep, He is right. U need to put it in Orthographic mode. One thing to keep in mind. I don''t think depth test works in ortho mode. So you have plan what u r going to draw first and what u r going to draw last.
Is it important what to draw first and what last? If so, why?

Code Maniak
Code Maniak
The importance of the z-order is equally as important in ortho as it is in perspective mode. Imagine a bunch of papersheets - if you put one on top of the other - will you be able to see the one underneath it? Ortho mode, incidentally, isn''t at all that different from perspective mode - You can place things further away from the camera to make them seem farther away although a better bet would be to scale the object. The true difference lies in the way the depth buffer is projected onto the view plane. Most things work in both modes (blending, antialiasing, etc).

Crispy
"Literally, it means that Bob is everything you can think of, but not dead; i.e., Bob is a purple-spotted, yellow-striped bumblebee/dragon/pterodactyl hybrid with a voracious addiction to Twix candy bars, but not dead."- kSquared
Advertisement
It matters a lot because as I experienced with my old Galactic Wars engine (Written in VB6 and DirectX8 actually, hehe), it mattered because when a ship runs into you, for a split second you can see that the enemy is actually above you (drawn after you, actually) and so their fire technically shouldn''t hit you, but oh well!

<- Digital Explosions ->
"Discipline is my sword, faith is my shield
do not dive into uncertainty, and you may live to reap the rewards" - (Unreal Championship)

This topic is closed to new replies.

Advertisement