Easily 2 years ago, I spent a lot of time with Lachie's FB Game Newsletter.....tutorials and what-not. I did the one with the little sprite sheet depicting the warrior walking on the green background. [Oh and it worked great then....go figure] Although Lachie jumps around (pathologically -- while also contradicting himself left and right), his tutorial in the game newsletters were fairly darned good.....and the whole 'beggars can't be choosers' shtick too, so............ ya' know.
So, today....I sit down to recreate it and find myself in bug-ridden country.......... 'OK, I probably goofed up.' So, I cut-n-paste the entire bit of code
found at the end here: http://games.freebasic.net/BASICGaming/ ... #tutorial1
Place the background image and the sprite sheet and the code all in a dedicated folder in my FB folder and away I go........ looks pretty and legit inside the IDE, yippee, it's going to work.
When I compile it all, I get a freaking black screen......really?! A black screen?! Really?!!!!!!!! Man, this is frustrating. ......at least I don't get error messages. Oh, and the executable it came with, it loads as a black screen too.....no sprites, no background, nothing.
Any ideas?? What a freaking guy has to do to make a sprite run around a background.............seems like a lot of mess......but I'm trying to be tenacious.
So help me God!!
-
- Posts: 50
- Joined: Oct 27, 2011 1:51
- Location: Texas
- Contact:
Re: So help me God!!
I remember following that tutorial. :)
Did you name the images like this?
"BACKGRND.bmp"
"SPRITES.bmp"
Did you name the images like this?
"BACKGRND.bmp"
"SPRITES.bmp"
-
- Posts: 3906
- Joined: Jan 01, 2009 7:03
- Location: Australia
Re: So help me God!!
I downloaded and extracted the zip file and also get a black screen with a compiler message,
"Redefinition of intrinsic" on line 39
I remember it ran years ago when I downloaded same files so it must be incompatible with the latest version of FreeBasic.
I can write you a version that will work.
.
"Redefinition of intrinsic" on line 39
I remember it ran years ago when I downloaded same files so it must be incompatible with the latest version of FreeBasic.
I can write you a version that will work.
.
-
- Posts: 50
- Joined: Oct 27, 2011 1:51
- Location: Texas
- Contact:
Re: So help me God!!
Wow!! That would be amazing!!! It didn't occur to me that the newer version of FB could be the issue.
-
- Posts: 3906
- Joined: Jan 01, 2009 7:03
- Location: Australia
Re: So help me God!!
My mistake!HillbillyGeek wrote: It didn't occur to me that the newer version of FB could be the issue.
The .zip download didn't come with the two sprite sheets. I had to download them separately. The black screen was due to there being no images to display.
.
Re: So help me God!!
When debugging a program, it may be interesting to compile it with the '-exx' option in order to capture a possible runtime error like the one resulting from the code you want to test:
(http://www.freebasic.net/forum/viewtopi ... 27#p215527)Aborting due to runtime error 2 (file not found) at line 26 of D:\Users\T0003830
\Documents\Mes Outils Personnels\FBIde0.4.6r4_fbc1.06.0\FBIDETEMP.bas::()
Re: So help me God!!
@HillbillyGeek
Remove the true and false definitions because the latest version of Freebasic already has them.BasicCoder2 wrote: "Redefinition of intrinsic" on line 39
.
' Useful constants (makes your code easier to read and write).
const FALSE = 0
const TRUE = 1
-
- Posts: 50
- Joined: Oct 27, 2011 1:51
- Location: Texas
- Contact:
Re: So help me God!!
Great info here.....thanks so much!!