Sprite 2d

You are an experienced programmer and have a problem with the engine, shaders, or advanced effects? Here you'll get answers.
No questions about C++ programming or topics which are answered in the tutorials!
Post Reply
echo55
Posts: 12
Joined: Sun May 29, 2016 6:52 pm

Sprite 2d

Post by echo55 »

Hi all,

I want to use sprite on 2d "isometric" and i dont know how to do this.

Which function should i use ? (draw2dimage?)

How can i simulate 3d with my 2d , do irrlicht supports it ?
netpipe
Posts: 669
Joined: Fri Jun 06, 2008 12:50 pm
Location: Edmonton, Alberta, Canada
Contact:

Re: Sprite 2d

Post by netpipe »

did you compile example 6 ?
Live long and phosphor!
-- https://github.com/netpipe/Luna Game Engine Status 95%
echo55
Posts: 12
Joined: Sun May 29, 2016 6:52 pm

Re: Sprite 2d

Post by echo55 »

Of course i will , but i didn't understand it very well .

Where can i find other sprite like this?
CuteAlien
Admin
Posts: 9670
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: Sprite 2d

Post by CuteAlien »

Depends on what you plan to do. draw2dimage does just that - draw an image. Which might be enough or not - depends on what you try to do. If you need stuff like rotating, scaling for example then it won't be enough. In that case you should use textures which you put on polygons. That will also allow you to do other flexible stuff like zooming in/out with the camera. And probably make scrolling a little easier.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
echo55
Posts: 12
Joined: Sun May 29, 2016 6:52 pm

Re: Sprite 2d

Post by echo55 »

"In that case you should use textures which you put on polygons."

So use invisible polygons and draw texture over them?
echo55
Posts: 12
Joined: Sun May 29, 2016 6:52 pm

Re: Sprite 2d

Post by echo55 »

I try to code a Hammerwatch-like game but with sprite on isometric form.

http://www.rpgfrance.com/medias/images/ ... 0x1080.jpg

my map is done with tilemapping and my character works with sprite.
CuteAlien
Admin
Posts: 9670
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: Sprite 2d

Post by CuteAlien »

Don't know Hammerwatch. What is important is which features you need. Does the camera zoom. Will the world rotate or not.
Same for characters (some games draw the same character 8 times in different directions - so they never need to rotate, other rotate the same image in 8 direction, others need more than 8 direction as you can rotated in smaller angles). Once you know which features you need in your game we can discuss the technology to use for it.

edit: Using draw2dimage is the easiest. Try to start with that. Getting a 3d effect with 2d is just clever tile-drawing. You can find free tile-sets on the web to start with.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
echo55
Posts: 12
Joined: Sun May 29, 2016 6:52 pm

Re: Sprite 2d

Post by echo55 »

I don't need to rotate etc
Just move my character into all directions

Also , thank you very much =)
Post Reply