Isometric Game: The World Of The Ronics
-
- Posts: 1759
- Joined: May 23, 2007 21:52
- Location: Cut Bank, MT
- Contact:
-
- Posts: 33
- Joined: Dec 18, 2007 1:34
- Contact:
-
- Posts: 1759
- Joined: May 23, 2007 21:52
- Location: Cut Bank, MT
- Contact:
This is my favourite. All you have to do is
and then to load an image
and to put it on the screen you use the standard fbgfx command
(but of course you must first set the screen mode). Very simple, but very useful. You can also save PNGs with the same library, should you need to do that (for example to save screenshots).
Code: Select all
#Include Once "\fbpng\fbpng.bi"
#Include Once "\fbpng\png_image.bi"
Code: Select all
Dim As FB.Image Ptr myBuffer = png_load( "someImage.png", PNG_TARGET_FBNEW )
Code: Select all
Put (0, 0), myBuffer
fbpng is built into the Extended library as well, you can simply use:
if you wanted to save a png, the function is now: ext.gfx.png.save(file)
Code: Select all
'init gfx mode first
var mypic = ext.LoadImage("image.png")
-
- Posts: 33
- Joined: Dec 18, 2007 1:34
- Contact:
-
- Posts: 33
- Joined: Dec 18, 2007 1:34
- Contact:
-
- Posts: 1759
- Joined: May 23, 2007 21:52
- Location: Cut Bank, MT
- Contact:
-
- Posts: 33
- Joined: Dec 18, 2007 1:34
- Contact:
yeah, i think most of the problem was that everything was too complex, which doesn't help in debugging the whole thing; and i have the habit of NOT commenting (any beginners reading this, heres a helpful tip; Comment your work! if you don't you'll end up in the same mess as me) my rewritten version will include more of a simple style...and hopefully comments in the engine so that when i set my engine out for others, they can learn from the code/edit any bugs easily.
is this a good habit: to test a new feature of the program/engine to the extreme?
is this a good habit: to test a new feature of the program/engine to the extreme?
-
- Posts: 1759
- Joined: May 23, 2007 21:52
- Location: Cut Bank, MT
- Contact:
Only test it as far as it needs to be tested. Also, a good principle I learned from anonymous1337 is to only write code for what you actually need. Don't bother adding features to your engine unless your game needs them. Which means, your engine should start out very simple and you develop the game itself alongside with the engine, at least in some form. Only as the game develops and needs special features should you add them to the engine. This will help you avoid wasting time and make things easier.
-
- Posts: 33
- Joined: Dec 18, 2007 1:34
- Contact:
yeah, i wish i had that advice some time ago; I just erased 100+ lines of code that weren't used, or needed to be used; I'm almost done the cleaning the code; I'm still using SDL because it seems to fit lots of my needs. I'm also making my code in different files, so that is easy to debug problems and makes a cleaner looking code. well, I hope that I get where I was wanted to be last month, by the end of the week.
-
- Posts: 33
- Joined: Dec 18, 2007 1:34
- Contact:
I know that 100 is a small bit; thats because the error happened when the code was small.
at the current moment of time; the best thing i need is something to deal with sound, in WAV, OGG, and MP3. The rest I have to make myself because my maps exporter that I made needs to load a special format; But what would be nice is something to load a sprite sheet, and loads the sprite, and depending on the sprite action, it will get ready the next pic of the sprite;
All of this I can do, but the sound is the part I haven't learned yet, but i'm planning too; the one thing that i would love to learn, but in a later game i'll implant it, is networking (ie making a chat for people, and also sending information about the character location in the game, and his current status, etc)
at the current moment of time; the best thing i need is something to deal with sound, in WAV, OGG, and MP3. The rest I have to make myself because my maps exporter that I made needs to load a special format; But what would be nice is something to load a sprite sheet, and loads the sprite, and depending on the sprite action, it will get ready the next pic of the sprite;
All of this I can do, but the sound is the part I haven't learned yet, but i'm planning too; the one thing that i would love to learn, but in a later game i'll implant it, is networking (ie making a chat for people, and also sending information about the character location in the game, and his current status, etc)