Hey Johnny, you'll probably give me some good reasons why this is a bad idea. Nonetheless, I believe that the various issues with Hacktendo running purely in a 3D environment can be solved if there are particular sets of functions for 2D and for 3D purposes. We already have some things distinguished, like drawText() and drawTextWorld(), but we do not have any way of drawing a sprite onto the screen, operating with Screen coordinates instead of Map coordinates. This isn't merely a way to make my life easier when it comes to making that gun stay on the screen for Doom, but a way to make 2D games work properly. You may not have noticed, but if you try to make a 2D game now, the 3d perspective affects the way the sprites look on the screen; they're flat sprites moving along the ground some ways below the camera, not flat sprites moving around the screen.
So essentially, there should be an additional parameter in createSprite() that determines whether it should be regarded as existing in the 2D (screen) environment or the 3D (map) environment. There could also be some way of deciding whether the Map itself is in the 2D environment or the 3D environment. If the map is in the 2D environment, then the game would be a purely 2D game, and if the map is in the 3D environment, then the game can optionally have 2D elements to create the menus, or a HUD.
two hacktendo versions
can't we simply create two different Hacktendos?
one for 2D things and one for 3D things?
Wouldn't that involve
Wouldn't that involve creating redundant functions etc?
How about you have ones lik 2d_draw_sprite() and 3d_render_model() instead?
Pity the dreamer for he has many ideas, and few ways to describe them.
Well when you make a sprite
Well when you make a sprite it should already be 2D. If you use setRenderType(int spriteID, int renderType) you can change it to a 3D shape.
But that doesn't actually make it 2D, it just makes it flat. It should be:
1 - A 3D flat sprite
2 - A 3D sphere sprite
3 - A 3D cube sprite
4 - A 3D cone sprite
Some games are 3D but have flat sprites. But like in doom, the gun sprite should be 2D.
I think some of the 3D function could be used in a 2D game too. Like drawTextWorld(). Can draw text on any part of the game. But drawText() only draws text on the screen. It would be a pain to make it like drawTextWorld() if possible.
http://www.hackwars.net/wiki/index.php/DrawTextWorld()
A problem I remember having was when using a sprite it lags and crashed sometimes. Which really made me mad cause I would loose a lot of code. I think it would be cause it acting like it's a 3D sprite. Which could be solved if we changed it to a 2D sprite some how. Two different Hacktendos is not necessary.
- Drizzt Do'Urden
Hacktendo
I don't think it's possible to create two separate versions of Hacktendo (the old and the new), because the entire engine was reworked to use openGL. In other words, the current functions need to be updated, or new functions need to be created to take the place of the old (2D) ones.
gluOrtho2D
Ahem: http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/glu...
2D graphics work just fine in OpenGL, once you tell it to use 2D mode.
True
That's what I was thinking about, but instead I had a brainfart.
Basically though, you still can't use 3d commands for a 2d job. So just include different functions for 2d jobs.
[edit] I hereby claim I have little to no knowledge about how 3d programming works
Pity the dreamer for he has many ideas, and few ways to describe them.
reply
removed by admins for spam content
reply
--revmoved--
f the map is in the 2D
removed