directx 2d game engine

Discussion about everything. New games, 3d math, development tips...
Post Reply
gamescore
Posts: 35
Joined: Sun Jan 29, 2012 10:21 pm

directx 2d game engine

Post by gamescore »

i want to create my own 2d game engine ("arcengine") and need some tipps and further information about some basic stuff.
1. what is the best way to render sprites in directx?
my idea is to disable zbuffering, then send one edge (that holds all information about the sprite like position, width etc.) into a geometrieshader that calculates the other edges and sends them to the vs.

2. after finishing the basic rendering i want to include a script language.
what is the best way to read a simple script into the programm?
REDDemon
Developer
Posts: 1044
Joined: Tue Aug 31, 2010 8:06 pm
Location: Genova (Italy)

Re: directx 2d game engine

Post by REDDemon »

If you are seriously intentionated to write a game engine you should already know answers to those questions. 2D engine is not easier of a 3D egine.

before thinking to wich way is best for render something would be nice also to think how the API will look to final user. That's the most important part because it can change everything. Internal structure can be designed around the API. good API make easy to use.
If you neglit the API you'll find yourslef writing a wrapper for your engine because is hard to use.

if you disable Z buffer anyway you have to render everything in the correct order. with Z buffer + Ortho camera you just need to draw at different "depths". Wich is the best approach for you?
both will works if used correctly. it's just question of what you find more comfortable
Junior Irrlicht Developer.
Real value in social networks is not about "increasing" number of followers, but about getting in touch with Amazing people.
- by Me
gamescore
Posts: 35
Joined: Sun Jan 29, 2012 10:21 pm

Re: directx 2d game engine

Post by gamescore »

the finished programm should be like ogre, because ogre has a very kind structure.
i know 2d isnt easier, but there arnt as many of them ;)

i didnt post this thread because i dont know anything, but dont want to start wrong. i work on the engine since a few days started programming and made a basic concept.

i think to render them without z buffer saves memory .
serengeor
Posts: 1712
Joined: Tue Jan 13, 2009 7:34 pm
Location: Lithuania

Re: directx 2d game engine

Post by serengeor »

gamescore wrote:i think to render them without z buffer saves memory .
Since zbuffer is just a simple "flag" (iirc from the days when I was writing my opengl renderer) it wouldn't be that hard to test what works better, and leave it as an option since you're writing an engine.
Working on game: Marrbles (Currently stopped).
gamescore
Posts: 35
Joined: Sun Jan 29, 2012 10:21 pm

Re: directx 2d game engine

Post by gamescore »

and what about my second question?
kazymjir
Posts: 727
Joined: Sat Feb 20, 2010 4:05 pm
Location: Munich, Bayern

Re: directx 2d game engine

Post by kazymjir »

gamescore wrote:2. after finishing the basic rendering i want to include a script language.
what is the best way to read a simple script into the programm?
1. Write your own parser
2. Use ready solutions, like GameMonkey
gamescore
Posts: 35
Joined: Sun Jan 29, 2012 10:21 pm

Re: directx 2d game engine

Post by gamescore »

I want to use an as low value of ready code as possible, so i will write my own parser.
I think i need some deeper information, like why is lua as fast?
kazymjir
Posts: 727
Joined: Sat Feb 20, 2010 4:05 pm
Location: Munich, Bayern

Re: directx 2d game engine

Post by kazymjir »

Hmm, there is never too much knowledge.
But if you want to make as much code from scratch... write your own scripting language!
If you need just a simple scripting this is good idea, a great way to learn something new.
Post Reply