Hello Guest, please login or register.
Did you miss your activation email?
Login with username, password and session length.

Pages: [1]   Go Down

Author Topic: [C++] Top-Down Shooter Engine - Crisis Point Zero  (Read 3475 times)

0 Members and 1 Guest are viewing this topic.
[C++] Top-Down Shooter Engine - Crisis Point Zer...
« on: September 01, 2006, 08:42:19 pm »
  • (y)(;>.<;)(y)
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 3293
This engine uses YAGL, and is Extremely Basic.

I started work on a TDS engine awhile ago, and even begun the Basic's of the Game ideas etc. It was to be called Crisis Point Zero, and be somewhat like Doom. However, I found that I simply prefered to work on The Legend of Zelda - The Ruins Of Time, maybe I just like RPG's more, maybe it's because it was Zelda, who knows.

So the basic Engine and my progress on the actually Larger game Engine halted, and it began to just take up bytes on my Hard-Drive. Until Hyrule Boy managed to convince me to release a Demo. I decided to go one better, and release the whole engine.

Click Here to Download the Basic Engine
Controls:
Move mouse to look around
W,A,S,D to move           

Download What I was trying to do with the Engine
Controls:
1 to 9: Switch Weapons
Left Mouse Button: Fire (No bullet is created though)
W,A,S,D: Move.

Here's a screen-shot (clickable thumbnail):


Please note: I do not know if Yagl will work in Visual-C++, Yagl can be found here, you have to download the C version. C++ one was never release <_<

If you use any of these Engines in your projects, please give credit to "Jason Morley" (me). thank You and enjoy.
« Last Edit: March 01, 2007, 01:40:28 am by 4Sword »
Logged
Re: [C++] Top-Down Shooter Engine - Crisis Point...
« Reply #1 on: September 04, 2006, 05:39:33 am »
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 6206
You can do great things already in C++ 1 question though why do you not use OpenGL?
Logged
Re: [C++] Top-Down Shooter Engine - Crisis Point...
« Reply #2 on: September 04, 2006, 08:34:34 am »
  • (y)(;>.<;)(y)
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 3293
I use YAGL, an OpenGL Wrapper, which can interact perfectly with OpenGL if needed. Fortunatly the YAGL Commands are very generic and so it wouldn't be that hard to port them to another form of Graphical Programming, like Allegro, which, like YAGL is a OpenGL wrapper, Allegro is a DirectX wrapper.


 OpenGL from what I've learned is incredibly difficult to do accurate 2D placement with, possible but difficult. The fact that most web-tutorials/e-books for it aren't very good, and most books I've found at my local book-stores are for Advanced OpenGL and advanced DirectX, so it's kinda hard to learn OpenGL or DirectX when you try.

When I've finished the Ruins Of Time engine, I'm gonna start dabbling in pure OpenGL and DirectX more.
« Last Edit: September 04, 2006, 08:36:14 am by TheDarkJay »
Logged
Re: [C++] Top-Down Shooter Engine - Crisis Point...
« Reply #3 on: September 04, 2006, 10:30:39 am »
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 6206
Well Helios gave me this awesome site for if you want to learn OpenGL!
http://nehe.gamedev.net/
Logged

aab

^ Evolved from a Hobbit
Re: [C++] Top-Down Shooter Engine - Crisis Point...
« Reply #4 on: September 04, 2006, 11:49:31 am »
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 992
OpenGL from what I've learned is incredibly difficult to do accurate 2D placement with, possible but difficult. The fact that most web-tutorials/e-books for it aren't very good, and most books I've found at my local book-stores are for Advanced OpenGL and advanced DirectX, so it's kinda hard to learn OpenGL or DirectX when you try.

When I've finished the Ruins Of Time engine, I'm gonna start dabbling in pure OpenGL and DirectX more.
Sounds like a good plan.

Theres an OpenGL Manual you cvan download somewhere from here: http://www.opengl.org/

When i started off with OpenGL, i found tutorials for certain things, but obviously i was limited to the types of things in the tutorials. Eventually, i found this manual, and started reading through all the commands to see exactly what i could do (though the real trick is in thinking inbetween commands).
OpenGL is like a big set of states, and you basically set the states that you want, and then it displays depending on those states.
Now, reading through this manual, there were many states which at the time, i couldn't understand the purpose of, or would ever have a reason to use (almost always will be many of them, though not hypothetically), but i just skipped them, and went overthem later, or learned some 3d theory, maths. If theres something you think it can do, then by repeating this kind of process while searching whatever tutorials you can, you can end up not quite needing as many tutorials. Or get a book :D



The following little tips aren't very complete: Some research is needed to get through all of them, they are just a direction:

For pixel perfect OpenGL, the first thing gluOrtho2D() or glOrtho() (gluOrtho2D calls glOrtho2D but with two default values for its last parameters).

Textures can't be mipmapped, as the filtering would destroy the pixel perfect requirement, so when creating a texture, you would be using glTexImage2D and not something like gluBuild2DMipmaps.
You would also need to disable texture filtering on that texture, using glTexParameteri. The parameters for GL_TEXTURE_MAG_FILTER and GL_TEXTURE_MIN_FILTER would both be GL_NEAREST: This says use the nearest pixel on the texture, rather than filtering the pixels with the surrounding ones (which looks smoother, less jagged, in 3d).
Its also good to clamp the textures to the edge, so for glTexParameteri again, GL_TEXTURE_WRAP_R/T/S can have the parameters passed GL_CLAMP_TO_EDGE.

If a texture is not of dimensions of power two (other conditions, see descriptions of glTexImage2D() ), it can't be displayed by the hardware, and so mipmapping must occur, so basically working only with images that are of that dimensional constraint is a requirement. Alternatively, you could have a spriite class which pastes the image loaded onto the nearest larger power of two size image, makes the texture from that, and then scissors a bounding rectangle when rendering the quad to which the texture is bound, such that the overhanging border region is 'scissored out'.

Now, In OpenGL, if you have a  scene set up that should have a red pixel at an exact coordinate, such as 40, 30, that pixel will not actually be at 40, 30.
It will be at the exact coordinate 40,30, but thats actually at the middle point between four pixels: The pixel obviously can't be drawn between pixels, and is instead drawn in one of the four pixels that it is in; It draws/outputs the pixel that occupys most of the space of that pixel, and where several are equally present, takes them in a right hand order. If you draw a pixel at 0.5,0.5, then it is actually centered in the pixel. This doesnt cause too much of a problem, but the offset can clean a few impurities you might have during animation, rotation, etc.

In case it is enabled, disable dithering as well: glDisable(GL_DITHER); (.. i think)
And no depth testing, such that images are drawn in order of being sent through (disabled by default).

Logged




I ♥ Sol
.... I ♥ Sol ? wtf how long has that been there? >_> *rrrrrrrrar*
  • MySpace
Pages: [1]   Go Up

 


Contact Us | Legal | Advertise Here
2013 © ZFGC, All Rights Reserved



Page created in 0.386 seconds with 48 queries.