So help me God!!

Game development specific discussions.
Post Reply
HillbillyGeek
Posts: 50
Joined: Oct 27, 2011 1:51
Location: Texas
Contact:

So help me God!!

Post by HillbillyGeek »

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.
Boromir
Posts: 463
Joined: Apr 30, 2015 19:28
Location: Oklahoma,U.S., Earth,Solar System
Contact:

Re: So help me God!!

Post by Boromir »

I remember following that tutorial. :)
Did you name the images like this?
"BACKGRND.bmp"
"SPRITES.bmp"
BasicCoder2
Posts: 3906
Joined: Jan 01, 2009 7:03
Location: Australia

Re: So help me God!!

Post by BasicCoder2 »

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.
.
HillbillyGeek
Posts: 50
Joined: Oct 27, 2011 1:51
Location: Texas
Contact:

Re: So help me God!!

Post by HillbillyGeek »

Wow!! That would be amazing!!! It didn't occur to me that the newer version of FB could be the issue.
BasicCoder2
Posts: 3906
Joined: Jan 01, 2009 7:03
Location: Australia

Re: So help me God!!

Post by BasicCoder2 »

HillbillyGeek wrote: It didn't occur to me that the newer version of FB could be the issue.
My mistake!
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.
.
fxm
Moderator
Posts: 12081
Joined: Apr 22, 2009 12:46
Location: Paris suburbs, FRANCE

Re: So help me God!!

Post by fxm »

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:
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::()
(http://www.freebasic.net/forum/viewtopi ... 27#p215527)
Boromir
Posts: 463
Joined: Apr 30, 2015 19:28
Location: Oklahoma,U.S., Earth,Solar System
Contact:

Re: So help me God!!

Post by Boromir »

@HillbillyGeek
BasicCoder2 wrote: "Redefinition of intrinsic" on line 39
.
Remove the true and false definitions because the latest version of Freebasic already has them.
' Useful constants (makes your code easier to read and write).
const FALSE = 0
const TRUE = 1
HillbillyGeek
Posts: 50
Joined: Oct 27, 2011 1:51
Location: Texas
Contact:

Re: So help me God!!

Post by HillbillyGeek »

Great info here.....thanks so much!!
Post Reply