Page 2 of 2 FirstFirst 12
Results 11 to 12 of 12

Thread: Do I need a graphics engine?

  1. #11
    Hey, I figured I'd give you a status update, and let you know how things have been going.
    This last week has been kinda busy, so I haven't had a ton of time to program, but I still feel like I've made a lot of progress.
    I got the graphics engine going, and everything seems to be running smoothly. I still don't understand exactly what every part of it does, and that leaves me a little worried. Since that means there might be bugs that I have no idea how to fix. It's fine when I'm just working on my computer, but if I ever plan on publishing this game, or the next one, I want to make sure I know how to keep it as bug free as possible.
    Still, I feel like I understand a lot, and things are running well so far.

    I decided to learn how to use particles, since that seems to be pretty common in graphics programming, and I wanted to make a nice animated space background for the game.
    I had never worked with objects in that way before, so it took a while to figure it out, but it really helped me understand a lot more about how games work. It seems like a really useful way of doing things.
    So now I randomly create a "star" object every few EngineProcess runs, and have them moving across the screen at random speeds, only to be disposed of when they hit the other side.
    It looks WAY better than anything I've tried before, and it runs even faster than my previous simpler attempts at making a background using only Lazarus components.

    I decided to rewrite the game from scratch, and just copy over the important stuff from my old code. There's just so much more I can do graphically with this library, that I figured I might as well rewrite the UI completely.
    So far everything seems to work the way it's supposed to, but it's hard to test anything until I've made the new UI.

    By the way, am I correct in thinking I there's no way to print text in different sizes, without having to load in a separate font of that size?
    The samples all seem to use a single font, loaded from a .font, a .png and a .xml file.
    PXL's way of printing text looks great, but I'd like to have text of different sizes, and I'm not sure where to get all the files necessary to do that, if I need a separate file for each font size. I've never seen fonts saved like this before.


    Thanks for suggesting PXL to me. I'm still a little confused by some parts, but most of it makes a lot of sense. All in all it's a great library, and it's definitely improving my game!

  2. #12
    Quote Originally Posted by ajol View Post
    I got the graphics engine going, and everything seems to be running smoothly. I still don't understand exactly what every part of it does, and that leaves me a little worried. Since that means there might be bugs that I have no idea how to fix. It's fine when I'm just working on my computer, but if I ever plan on publishing this game, or the next one, I want to make sure I know how to keep it as bug free as possible.
    To be honest I also don't know what each part of PXL does since I don't have good enough knowledge on low lever graphical programming. But the purpose of PXL is to allow people who don't have enough low level graphical programming knowledge to start.
    Any way if you get stuck on some thing or are unsure about certain thing feel free to ask here and I will try to help the best I can or in case if I won't be able to help I will suggest you to contact PXL author.

    Quote Originally Posted by ajol View Post
    I decided to learn how to use particles, since that seems to be pretty common in graphics programming, and I wanted to make a nice animated space background for the game.
    I had never worked with objects in that way before, so it took a while to figure it out, but it really helped me understand a lot more about how games work. It seems like a really useful way of doing things.
    So now I randomly create a "star" object every few EngineProcess runs, and have them moving across the screen at random speeds, only to be disposed of when they hit the other side.
    It looks WAY better than anything I've tried before, and it runs even faster than my previous simpler attempts at making a background using only Lazarus components.
    That is one way of doing it. Another way would be to use Parallax scrolling which is basically moving of multiple semi-transparent images at different speed which then gives creates the illusion od depth perception.
    Unfortunately I lost a link to a great article about Parallax scrolling and google is mostly giving me tutorial on implementing Parallax scrolling into websites (which seems to have become quite a "thing" in web development lately).

    Quote Originally Posted by ajol View Post
    By the way, am I correct in thinking I there's no way to print text in different sizes, without having to load in a separate font of that size?
    The samples all seem to use a single font, loaded from a .font, a .png and a .xml file.
    PXL's way of printing text looks great, but I'd like to have text of different sizes, and I'm not sure where to get all the files necessary to do that, if I need a separate file for each font size. I've never seen fonts saved like this before.
    By default PXL uses so called Bitmap Fonts Rendering where each character is represented as a small image (tile or a sprite) inside the larger image. So when rendering text it is rendered character by character. Now I don't remember if it is possible to set its size directly or you need to do any resizing by yourself but definitely you don't need to have all possible character sizes stored in Bitmap Font. You would probably want to have a few different sizes stored because scaling any raster image which bitmap font actually is do lead to quality loss (pixilation when enlarged or missing details when shrunk).
    I would have to do some testing to see how font rendering is implemented in PXL.

    Any way if you need someone to bug-test your game or give you a honest opinion about it including tips on improving it (both design and implementation) I'm always prepared to do so.

Page 2 of 2 FirstFirst 12

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Comodo SSL