Alternative tile implementation
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
Re: Alternative tile implementation
I implemented this now, and it seems to run pretty well. What I do is that I, at start, create as many 512*512 framebuffers as I need, and draw tiles to them. Then, I draw the one or two framebuffers currently needed to the screen. Just wondering, how many 512*512 framebuffers is it reasonable for a computer to be able to keep in its memory? Between 5-10 something seems to work great on my netbook, but I'm guessing it's going to vary a lot between computers. I guess framebuffers are stored in VRAM so it's kind of hard to guess.
My game called Hat Cat and the Obvious Crimes Against the Fundamental Laws of Physics is out now!
- Jasoco
- Inner party member
- Posts: 3726
- Joined: Mon Jun 22, 2009 9:35 am
- Location: Pennsylvania, USA
- Contact:
Re: Alternative tile implementation
I did tests a while ago on my MacBook Pro 13" and it let me do thousands of them. But some other modern PC's can't even do 1. So there's no "average" to aim for. The best you can do is use as many as you need and if possible offer a non framebuffer mode or put a readme with the project that tells the user they won't be able to use it.T-Bone wrote:I implemented this now, and it seems to run pretty well. What I do is that I, at start, create as many 512*512 framebuffers as I need, and draw tiles to them. Then, I draw the one or two framebuffers currently needed to the screen. Just wondering, how many 512*512 framebuffers is it reasonable for a computer to be able to keep in its memory? Between 5-10 something seems to work great on my netbook, but I'm guessing it's going to vary a lot between computers. I guess framebuffers are stored in VRAM so it's kind of hard to guess.
What I would do is use the pcall on the function that creates the framebuffers, and if it fails, place a message on screen in plain english/spanish/whatever that their computer is not worthy enough to play the game because their video card is not up to date.
Re: Alternative tile implementation
That sounds like a good solution. Thanks!Jasoco wrote:I did tests a while ago on my MacBook Pro 13" and it let me do thousands of them. But some other modern PC's can't even do 1. So there's no "average" to aim for. The best you can do is use as many as you need and if possible offer a non framebuffer mode or put a readme with the project that tells the user they won't be able to use it.T-Bone wrote:I implemented this now, and it seems to run pretty well. What I do is that I, at start, create as many 512*512 framebuffers as I need, and draw tiles to them. Then, I draw the one or two framebuffers currently needed to the screen. Just wondering, how many 512*512 framebuffers is it reasonable for a computer to be able to keep in its memory? Between 5-10 something seems to work great on my netbook, but I'm guessing it's going to vary a lot between computers. I guess framebuffers are stored in VRAM so it's kind of hard to guess.
What I would do is use the pcall on the function that creates the framebuffers, and if it fails, place a message on screen in plain english/spanish/whatever that their computer is not worthy enough to play the game because their video card is not up to date.
My game called Hat Cat and the Obvious Crimes Against the Fundamental Laws of Physics is out now!
- Jasoco
- Inner party member
- Posts: 3726
- Joined: Mon Jun 22, 2009 9:35 am
- Location: Pennsylvania, USA
- Contact:
Re: Alternative tile implementation
You could also use the Boolean that gets returned to do things differently instead of just erroring out so the player can still play the game, just not as fully intended.
- Robin
- The Omniscient
- Posts: 6506
- Joined: Fri Feb 20, 2009 4:29 pm
- Location: The Netherlands
- Contact:
Re: Alternative tile implementation
That is a very good way of handling things if the game doesn't depend too much on the framebuffers.Jasoco wrote:You could also use the Boolean that gets returned to do things differently instead of just erroring out so the player can still play the game, just not as fully intended.
Help us help you: attach a .love.
Re: Alternative tile implementation
Currently, all menus and all tiles in-game depend on framebuffers, so that's not a very good solution for me
My game called Hat Cat and the Obvious Crimes Against the Fundamental Laws of Physics is out now!
- bartbes
- Sex machine
- Posts: 4946
- Joined: Fri Aug 29, 2008 10:35 am
- Location: The Netherlands
- Contact:
Re: Alternative tile implementation
I remember Lafolie's game disabled certain blood effects when your hardware didn't support it.
Re: Alternative tile implementation
I have a macbook pro (2009) and it does not support framebuffers.
Re: Alternative tile implementation
2009? Are you sure it doesn't just support power-of-2 framebuffers? I know some graphics cards can handle framebuffers with PO2 dimensions but otherwise fail.
Re: Alternative tile implementation
That sounds... Horrible. Truly terrifying if that's the case. I really hope it supports sqaure PO2 framebuffers, otherwise this could really be an issue.appleide wrote:I have a macbook pro (2009) and it does not support framebuffers.
Try this:
http://dl.dropbox.com/u/7572962/algal.love
This game shows first a title screen, where it uses non-PO2 framebuffers to draw the text. Then, press "k", and it takes you to my test of this tileset implementation (you can scroll with WASD, but scrolling too far to the left causes issues), which uses PO2 framebuffers. Does it work?
My game called Hat Cat and the Obvious Crimes Against the Fundamental Laws of Physics is out now!
Who is online
Users browsing this forum: Ahrefs [Bot], Bing [Bot] and 6 guests