ENIGMA Forums

Sharing is caring => Graphics and Video => Topic started by: edsquare on July 29, 2014, 05:17:17 pm

Title: Gifs for my top-down scrolling shooter
Post by: edsquare on July 29, 2014, 05:17:17 pm
Got stuck with the opensurge mod and it was because I tried to fly when I can't even walk!

What I mean is this: Programming a game is not the same as programming regular applications, so I decided to start humble in order to learn the finner points of lgm-enigma, gml, edl, and if possible c++, so I started with an Asteroids clone, but the code is from a tutorial and for some reason it doesn't work, well to forget about it for a while I made this gifs for a 1945 look alike (While the images are not really mine I did enhance them and the propellers are mine and mine alone):

(http://imageshack.com/a/img661/3759/MDHmVt.gif)

(http://imageshack.com/a/img661/2498/sKZYut.gif)

(http://imageshack.com/a/img674/5610/IM26UQ.gif)

I have a question though: Do I need the whole plane on evry image? or just the propeller is alright? In my pc both look good but I don't know in a game, and here in the forum I can see which one doesn't have the plane in all the images.
Title: Re: Gifs for my top-down scrolling shooter
Post by: Josh @ Dreamland on July 29, 2014, 08:21:25 pm
You can just draw the four propellers over top of the image, if you're really looking to save memory. I'd suggest keeping it how you have it, though, unless you're programming for embedded systems. If you're going to be drawing shitloads of planes, drawing fewer polygons will be much better for you. (You still have to draw the whole plane; you'll actually just be drawing more pixels and more polygons to sew the propellers on over top.)

So yeah, unless graphics memory is a huge concern, leave it how you have it. It's better for performance and for code quality.
Title: Re: Gifs for my top-down scrolling shooter
Post by: edsquare on July 29, 2014, 09:09:42 pm
You can just draw the four propellers over top of the image, if you're really looking to save memory. I'd suggest keeping it how you have it, though, unless you're programming for embedded systems. If you're going to be drawing shitloads of planes, drawing fewer polygons will be much better for you. (You still have to draw the whole plane; you'll actually just be drawing more pixels and more polygons to sew the propellers on over top.)

So yeah, unless graphics memory is a huge concern, leave it how you have it. It's better for performance and for code quality.

So, if I understood you right it works both ways, but... To make it work placing the propellers correctly requires more coding and it makes almost no difference unless memory, cpu and gpu are a huge concern (embedded or older hardware). Right?

Drawing fewer polygons? It's a 2D game although the planes do look kinda 3D they are not. Or you end up using polygons anyway?

Thanks for all your help Josh!

 (Y)
Title: Re: Gifs for my top-down scrolling shooter
Post by: Darkstar2 on July 29, 2014, 10:28:56 pm
I see games with tons of more  complex sprites, graphics no problem, 2D or 3D memory is used, should not be an issue in this case.  If you have lots of rooms and lots of graphics you could optimise your memory usage and performance using dynamic resource handling and only loading the assets you will be needing for a given room as opposed to loading EVERYTHING in memory/video memory at game start, and removing from memory what is not used anymore.  These type of sprites are compressed and have decent file size so they load quickly. No need to complicate things :)

Title: Re: Gifs for my top-down scrolling shooter
Post by: edsquare on July 30, 2014, 12:13:41 am
I see games with tons of more  complex sprites, graphics no problem, 2D or 3D memory is used, should not be an issue in this case.  If you have lots of rooms and lots of graphics you could optimise your memory usage and performance using dynamic resource handling and only loading the assets you will be needing for a given room as opposed to loading EVERYTHING in memory/video memory at game start, and removing from memory what is not used anymore.  These type of sprites are compressed and have decent file size so they load quickly. No need to complicate things :)

First I need to make one game with one level work.  :(

Then I can start thinking about several levels and dynamic handling.  :raise:

You should see the original size of those MFs! One is over 1200 x 1200 Pixels per layer!

The smallest is around 700X500! :o

But since to play a game with sprites of that size you need a 50" monitor and a gazillion mb of ram... 
Title: Re: Gifs for my top-down scrolling shooter
Post by: TheExDeus on July 30, 2014, 04:36:37 am
I didn't really get the original question, because yes, you should have a plane in the plane sprite. :D If Josh understood your correctly, then I agree with him. Not much use in having the plane and the propeller separate.

Quote
Drawing fewer polygons? It's a 2D game although the planes do look kinda 3D they are not. Or you end up using polygons anyway?
In computer graphics everything is drawn with polygons. A sprite is 2 triangles, making up a quad. You can actually use "d3d_set_fill_mode(rs_line);" in a 2D game to enable wireframe. What you will see is that all sprites are still triangles/polygons.
Title: Re: Gifs for my top-down scrolling shooter
Post by: Goombert on July 30, 2014, 06:20:26 am
Quote
In computer graphics everything is drawn with polygons. A sprite is 2 triangles, making up a quad. You can actually use "d3d_set_fill_mode(rs_line);" in a 2D game to enable wireframe. What you will see is that all sprites are still triangles/polygons.

In vector graphics sprites and backgrounds and everything is drawn with polygons.

In raster graphics everything is drawn by bitblt, progressive scan, or raytracing.

In computer graphics everything is generally drawn by vector or raster graphics.

I for one would like to see more vector graphics in video games, I think they provide a lot of quality especially at varying resolutions.
Title: Re: Gifs for my top-down scrolling shooter
Post by: edsquare on July 30, 2014, 09:55:12 am
Quote
In computer graphics everything is drawn with polygons. A sprite is 2 triangles, making up a quad. You can actually use "d3d_set_fill_mode(rs_line);" in a 2D game to enable wireframe. What you will see is that all sprites are still triangles/polygons.

In vector graphics sprites and backgrounds and everything is drawn with polygons.

In raster graphics everything is drawn by bitblt, progressive scan, or raytracing.

In computer graphics everything is generally drawn by vector or raster graphics.

I for one would like to see more vector graphics in video games, I think they provide a lot of quality especially at varying resolutions.

Yes I would also like vector graphics, and may be temped to use them if:

One I managed to complete a game without enigma fucking me over.  :)

Two if I knew how the fuck to implement them on enigma, or they work out of the box?  ;D

And finally

Three if some one hadn't fucked up Inkscape, now I can't convert and save the way I used to, it tells me it's working on it but ends up not doing it, or it gives me some kind error message I havn't looked it up since I don't use inkscape that much.  ::)
Title: Re: Gifs for my top-down scrolling shooter
Post by: time-killer-games on August 19, 2014, 03:56:57 pm
if you want the file to stay small and everything will be at least semi-HD, making the propeller a different sprite for each plane, could help a bit. Anything that removes the need for duplicate data can always be a help. Just depennds how much help it is and how badly you care about it. This is some really nice artwork, btw. you don't cease to surprise me. :D Really talented artist.

Edit

also make the propellers faster they look slow-mo which I'm sure was intentional, just don't keep it that way in the actual game!
Title: Re: Gifs for my top-down scrolling shooter
Post by: edsquare on August 19, 2014, 05:58:06 pm
if you want the file to stay small and everything will be at least semi-HD, making the propeller a different sprite for each plane, could help a bit. Anything that removes the need for duplicate data can always be a help. Just depennds how much help it is and how badly you care about it. This is some really nice artwork, btw. you don't cease to surprise me. :D Really talented artist.

Edit

also make the propellers faster they look slow-mo which I'm sure was intentional, just don't keep it that way in the actual game!

The speed was due to the image (because of its size) freezing up my pc when I tried faster propellers, of course once in the game the images will be a little bit smaller so maybe that will help and also I'll let enigma handle the speed so I hope that will solve that isue.

Not really worried about making it HD, just not 16 bits sprites thats all.  :cool: