So help me God!!

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

So help me God!!

Postby HillbillyGeek » Jun 04, 2017 0:41

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/Issue2/index.html#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: 406
Joined: Apr 30, 2015 19:28
Location: Texas,U.S., Earth,Solar System
Contact:

Re: So help me God!!

Postby Boromir » Jun 04, 2017 2:19

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

Re: So help me God!!

Postby BasicCoder2 » Jun 04, 2017 3:04

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: 48
Joined: Oct 27, 2011 1:51
Location: Texas
Contact:

Re: So help me God!!

Postby HillbillyGeek » Jun 04, 2017 3:16

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

Re: So help me God!!

Postby BasicCoder2 » Jun 04, 2017 4:56

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
Posts: 8016
Joined: Apr 22, 2009 12:46
Location: Paris suburb, FRANCE

Re: So help me God!!

Postby fxm » Jun 04, 2017 5:48

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::()
(viewtopic.php?p=215527#p215527)
Boromir
Posts: 406
Joined: Apr 30, 2015 19:28
Location: Texas,U.S., Earth,Solar System
Contact:

Re: So help me God!!

Postby Boromir » Jun 04, 2017 13:40

@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: 48
Joined: Oct 27, 2011 1:51
Location: Texas
Contact:

Re: So help me God!!

Postby HillbillyGeek » Jun 04, 2017 17:37

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

Return to “Game Dev”

Who is online

Users browsing this forum: No registered users and 2 guests