Game Programming and Development Tools

Proofing eachothers code – Mene-Mene

Mene-Mene

Member

Posts: 1398
From: Fort Wayne, IN, USA
Registered: 10-23-2006
This thing has changed, it no longer is a "Proofing eachothers code", but a "Please help me with my code".


;Basic Set-up
Graphics 800,600,32,2 ;The resolution is 800x600, the color depth 32, and its set at full screen.

SetBuffer BackBuffer() ;Set the buffer to the back buffer to allow for double buffering
AutoMidHandle True

;Type Set up
Type Ship ;This type is to cover all the ships.

Field X ;X coordinate of the ships
Field Y ;Y coordinate of the ships
Field Img ;Image for the ships
Field ImgFrame ;Image frame for the ships
Field Speed ;Speed of the ships
Field Facing ;Where the ship is facing
Field Name$ ;Ships name
Field Actions[100] ;The actions of the ship to do
Field ActionsLeft[100] ;The number of times left to do for each action
Field CurrentAction ;The number total of actions
Field Sight ;The length of the ships sight
Field AI$ ;The AI selected

End Type ;End of this type

Type Bullet ;This type is to cover all the bullets.

Field X ;X coordinate of the bullets
Field Y ;Y coordinate of the bullets
Field Img ;Image for the bullets
Field Speed ;Speed of the bullets
Field Facing ;Where the bullet is facing
Field ImgFrame ;Image frame for the bullets

End Type ;End of this type

Global Player.Ship = New Ship ;Player ship

Player\X# = 100 ;Player X = 100 px.
Player\Y# = 100 ;Player Y = 100 px.
Player\Img = LoadAnimImage("P Ship Attack.bmp",40,40,0,16) ;Load the Player's animated image
Player\ImgFrame = 6 ;Set the player's starting frame
Player\Speed = 4 ;Set the player's speed
Player\Facing = 135 ;Set where the player is facing
Player\Name$ = "Player" ;Player's name
Player\Sight = 100 ;How far the player can see
Player\AI$ = "Attack"

Global Enemy.Ship = New Ship ;Enemy ship, neither are really good or bad just different

Enemy\X = 700 ;Enemy X = 700 px.
Enemy\Y = 500 ;Enemy Y = 500 px.
Enemy\Img = LoadAnimImage("P Ship Attack.bmp",40,40,0,16) ;Load the Enemy's animated image
Enemy\ImgFrame = 14 ;Set the Enemy's starting frame
Enemy\Speed = 4 ;Enemy Speed = 4 px.
Enemy\Facing = 315 ;Enemy is facing 315 degrees
Enemy\Name$ = "Enemy" ;Enemy's name
Enemy\Sight = 100 ;Enemy's vision = 100 px.
Enemy\AI$ = "Attack"

;End set-up

;;;;;;;;;;;;;
;;Main Loop;;
;;;;;;;;;;;;;

;Loop until User presses Esc.
While Not KeyHit(1)

Cls

If (Player\Imgframe < 0) ;If frame is below 0

Player\Imgframe = 15 ;Move it to the highest frame

ElseIf Player\Imgframe >= 15 ;If its above the highest frame

Player\Imgframe = 0 ;Move it to 0

EndIf ;End if statement

If Enemy\ImgFrame < 0

Enemy\Imgframe = 15

ElseIf Enemy\Imgframe >= 15

Enemy\Imgframe = 0

EndIf

Draw() ;Go to function which draws graphics
AI() ;Go to function which sorts AI
Act() ;Go to function which issues commands

VWait ;Slow down frame speed
Flip ;Flip buffers

Wend ;Wend

End ;End program after loop

;End Main Loop

;Functions

Function Draw() ;This is the function which draws Graphics

DrawImage Enemy\Img,Enemy\X,Enemy\Y,Enemy\ImgFrame ;Draw Enemy Image at Enemy X & Y in Enemy Frame
DrawImage Player\Img,Player\X,Player\Y,Player\ImgFrame ;Draw Player Image at Player X & Y in Player Frame

End Function ;End Function

Function Distance#(aX,aY,bX,bY) ;Calculate distance

gX = aX - bX ;The Difference of X = Player X - Enemy X

If gX < 0 Then ;If its less than 0

gX = Abs(gX) ;It = its absolute

EndIf ;End if statement

gY# = aY - bY ;The Difference of Y = Player Y - Enemy Y

If gY < 0 Then ;If its less than 0

gY = Abs(gY) ;It = its absolute

EndIf ;End if statement

Dist# = Sqr#((gX ^ 2) + (gY ^ 2)) ;The Distance = The Square root of the difference of the Player X and Enemy X squared plus the difference of the Player Y and Enemy Y is the Distance

Return Dist ;Return the Distance

End Function ;End of function

Function AI() ;This function sorts AI

If Player\AI$ = "Attack" Then ;If the Player's AI is the Attack AI

AttackAI("Player") ;Send it to the Appropriate function

EndIf ;End if statement

If Enemy\AI$ = "Attack" Then ;If the Enemy's AI is the Attack AI

AttackAI("Enemy") ;Send it to the Appropriate function

EndIf ;End if statement

End Function ;End of Function

Function AttackAI(thing$) ;Attack AI function which issues orders

If thing$ = "Player" ;If this is the player

Player\Actions[Player\CurrentAction] = 1 ;Initial action is to move forward
Player\ActionsLeft[Player\CurrentAction] = 2 ;Make it last 2 turns

Player\CurrentAction = Player\CurrentAction + 1 ;Add one more action to be filled

ElseIf thing$ = "Enemy" ;If its the Enemy

Enemy\Actions[Enemy\CurrentAction] = 1 ;Initial action is to move forward
Enemy\ActionsLeft[Enemy\CurrentAction] = 2 ;Make it last 2 turns

Enemy\CurrentAction = Enemy\CurrentAction + 1 ;Add one more action to be filled

EndIf ;End if statment

End Function ;End of function

Function Act() ;Function which forces orders to be carried out

For a = 0 To Player\CurrentAction ;Start a loop which cycles through as many times as we have orders

If Player\Actions[a] = 1 ;If the order is to move forward

Move(Player\Facing,"Player",2) ;Move forward using this function
Player\ActionsLeft[a] = Player\ActionsLeft[a] - 1 ;It doesn't need to be filled 1 less time

EndIf ;End of if statement

If Player\ActionsLeft[a] < 0 ;If the order has expired

For b = a To (Player\CurrentAction) ;Repeat up through all the orders

;Refill all the slots upwards
Player\Actions[b] = Player\Actions[b + 1]
Player\ActionsLeft[b] = Player\ActionsLeft[b + 1]

Next ;End loop

Player\CurrentAction = Player\CurrentAction - 1

a = a - 1 ;Go back one order to check

EndIf ;End if statement

Next ;End loop

For a = 0 To Enemy\CurrentAction ;Start a loop which cycles through as many times as we have orders

If Enemy\Actions$[a] = 1 ;If the order is to move forward

Move(Enemy\Facing,"Enemy",2) ;Move forward using this function
Enemy\ActionsLeft[a] = Enemy\ActionsLeft[a] - 1 ;It doesn't need to be filled 1 less time

EndIf ;End of if statement

If Enemy\ActionsLeft[a] =< 0 ;If the order has expired

For b = 1 To (Enemy\CurrentAction - a) ;Repeat up through all the orders

;Refill all the slots upwards
Enemy\Actions$[a + (b-1)] = Enemy\Actions$[a + b]
Enemy\ActionsLeft[a + (b - 1)] = Enemy\Actions$[a + b]

Next ;End loop

a = a - 1 ;Repeat the loop to check

Enemy\CurrentAction = Enemy\CurrentAction - 1

EndIf ;End if statement

Next ;End loop

End Function ;End of Function

Function Move(facing,thing$,direction) ;Function move, which allows it to move in the direction which is in the front most of the ship

Local movex#
Local movey#

If thing$ = "Player" Then ;If its the player

If direction = 1 Then ;If its going left

;Set the variables which determine its direction
movex# = Cos(facing - 180) * Player\speed
movey# = Sin(facing - 180) * Player\speed

ElseIf direction = 2 Then ;If its going up

;Set the variables which determine its direction
movex# = Cos(facing-90) * Player\speed
movey# = Sin(facing-90) * Player\speed

ElseIf direction = 3 Then ;If its going right

;Set the variables which determine its directon
movex# = Cos(facing ) * Player\speed
movey# = Sin(facing ) * Player\speed

ElseIf direction = 4 Then ;If its going back

;Set the variables which determine its direction
movex# = Cos(facing + 90) * Player\speed
movey# = Sin(facing + 90) * Player\speed

EndIf ;End if statement

;Move player to the new coordinates
Player\x# = Player\x# + movex#
Player\y# = Player\y# + movey#

ElseIf thing = "Enemy" Then ;If its the Enemy

If direction = 1 Then ;If its going left

;Set the variables which determine its direction
movex# = Cos(facing - 180) * Enemy\speed
movey# = Sin(facing - 180) * Enemy\speed

ElseIf direction = 2 Then ;If its going up

;Set the variables which determine its direction
movex# = Cos(facing-90) * Enemy\speed
movey# = Sin(facing-90) * Enemy\speed

ElseIf direction = 3 Then ;If its going right

;Set the variables which determine its directon
movex# = Cos(facing ) * Enemy\speed
movey# = Sin(facing ) * Enemy\speed

ElseIf direction = 4 Then ;If its going back

;Set the variables which determine its direction
movex# = Cos(facing + 90) * Enemy\speed
movey# = Sin(facing + 90) * Enemy\speed

EndIf ;End if statement

;Move Enemy to the new coordinates
Enemy\x# = Enemy\x# + movex#
Enemy\y# = Enemy\y# + movey#

EndIf


End Function ;End of Function


Function Ang(x1#,y1#,x2#,y2#)

a# = x1# - x2#
b# = y1# - y2#

length# = Sqr#((a#^2) + (b#^2))

c# = (a# / length#)
d# = (b# / length#)

angle# = ACos(c#)
angle# = ASin(d#)

Return angle#

End Function

;;;;;;;;;;;;;;;;;;;;;;
;;Action Appendix;;;;;
;;1 = "Move Forward";;
;;;;;;;;;;;;;;;;;;;;;;

Edit: Code updated

Edit2: Code Updated again, still not working.

Edit3: Code updated again, looping now, but not moving.

Edit4: Works!!!!!! Why is the up-left so fast?
------------------
MM out-
Thought travels much faster than sound, it is better to think something twice, and say it once, than to think something once, and have to say it twice.
"Frogs and Fauns! The tournament!" - Professor Winneynoodle/HanClinto

[This message has been edited by Mene-Mene (edited January 18, 2007).]

Mene-Mene

Member

Posts: 1398
From: Fort Wayne, IN, USA
Registered: 10-23-2006
Um, how come no ones noticed this?

------------------
MM out-
Thought travels much faster than sound, it is better to think something twice, and say it once, than to think something once, and have to say it twice.
"Frogs and Fauns! The tournament!" - Professor Winneynoodle/HanClinto

buddboy

Member

Posts: 2220
From: New Albany, Indiana, U.S.
Registered: 10-08-2004
I did. it's just kind of an impromptu thing. just 'lets proof each other's code'. one, some people might not want to share their code. two, they may not have time, it being right around Christmas. three, why not just start their own topic if they need help?

but I'll take a look at your code. is that in B3D?d

------------------
that post was really cool ^
|
[|=D) <---|| me

Mene-Mene

Member

Posts: 1398
From: Fort Wayne, IN, USA
Registered: 10-23-2006
I get your point, I see the folly of it now. But everyone always starts their own threads about "This doesn't work", "Why isn't this working" and there is no need to have 100, 1 page threads, and rather instead have 1 large thread. (Like the spam magnet instead of having 100 spam threads you have 1)

I keep forgetting to say the language. (Although I only program in one) Yes this is B3d+B. (In other words B3d/B+/BB, I think it works on them all.

PS. Why would you post in this thread if, 1. You don't want to share, or 2. You don't have the time.

------------------
MM out-
Thought travels much faster than sound, it is better to think something twice, and say it once, than to think something once, and have to say it twice.
"Frogs and Fauns! The tournament!" - Professor Winneynoodle/HanClinto

buddboy

Member

Posts: 2220
From: New Albany, Indiana, U.S.
Registered: 10-08-2004
um. I never said I didn't have the time or that I didn't want to share.

I don't have any code to share, but I am posting. I'm looking at your code. but I can't get it to run. it says 'End Function without Function'. referring to the last line.

------------------
that post was really cool ^
|
[|=D) <---|| me

Mene-Mene

Member

Posts: 1398
From: Fort Wayne, IN, USA
Registered: 10-23-2006
For some reason all of a sudden it came up with the same error. Fixed now. Look at top for the current code.

------------------
MM out-
Thought travels much faster than sound, it is better to think something twice, and say it once, than to think something once, and have to say it twice.
"Frogs and Fauns! The tournament!" - Professor Winneynoodle/HanClinto

buddboy

Member

Posts: 2220
From: New Albany, Indiana, U.S.
Registered: 10-08-2004
oh ok cool. will run in a sec.

um. could I have the ship image?

------------------
that post was really cool ^ <IMG SRC="http://s49.photobucket.com/albums/f272/mitchelldude/swordbanner.png[/IMG]
[IMG]http://i49.photobucket.com/albums/f272/mitchelldude/liberalismjoke.jpg">
|
[|=D) <---|| me

[This message has been edited by buddboy (edited December 28, 2006).]

Mene-Mene

Member

Posts: 1398
From: Fort Wayne, IN, USA
Registered: 10-23-2006
Send me your email in a PM. I don't have a server yet.

------------------
MM out-
Thought travels much faster than sound, it is better to think something twice, and say it once, than to think something once, and have to say it twice.
"Frogs and Fauns! The tournament!" - Professor Winneynoodle/HanClinto

buddboy

Member

Posts: 2220
From: New Albany, Indiana, U.S.
Registered: 10-08-2004
um, I get an error when I send the PM. so here it is:

buddboy(at)gmail(dot)com

just replace the words in () with the symbols.

------------------
that post was really cool ^ <IMG SRC="http://s49.photobucket.com/albums/f272/mitchelldude/swordbanner.png[/IMG]
[IMG]http://i49.photobucket.com/albums/f272/mitchelldude/liberalismjoke.jpg">
|
[|=D) <---|| me

[This message has been edited by buddboy (edited December 29, 2006).]

Mene-Mene

Member

Posts: 1398
From: Fort Wayne, IN, USA
Registered: 10-23-2006
Sent.

One question. If your email is Gmail, then why is it on your profile bluebottle?

------------------
MM out-
Thought travels much faster than sound, it is better to think something twice, and say it once, than to think something once, and have to say it twice.
"Frogs and Fauns! The tournament!" - Professor Winneynoodle/HanClinto

[This message has been edited by Mene-Mene (edited December 30, 2006).]

ArchAngel

Member

Posts: 3450
From: SV, CA, USA
Registered: 01-29-2002
Mene, buddboy didn't fully type out his e-mail on purpose, so if you edit your post and write it like he did, he probably would appreciate it.

------------------
Realm Master: "I'm cockasian"
Soterion Studios

Mene-Mene

Member

Posts: 1398
From: Fort Wayne, IN, USA
Registered: 10-23-2006
fixed. Status?

------------------
MM out-
Thought travels much faster than sound, it is better to think something twice, and say it once, than to think something once, and have to say it twice.
"Frogs and Fauns! The tournament!" - Professor Winneynoodle/HanClinto

buddboy

Member

Posts: 2220
From: New Albany, Indiana, U.S.
Registered: 10-08-2004
um, when I run it all I get is a black screen.

my profile is bluebottle cuz I used bluebottle back in '04 when I signed up.

------------------
that post was really cool ^
|
[|=D) <---|| me

Mene-Mene

Member

Posts: 1398
From: Fort Wayne, IN, USA
Registered: 10-23-2006
Did you wait a few seconds?

------------------
MM out-
Thought travels much faster than sound, it is better to think something twice, and say it once, than to think something once, and have to say it twice.
"Frogs and Fauns! The tournament!" - Professor Winneynoodle/HanClinto

buddboy

Member

Posts: 2220
From: New Albany, Indiana, U.S.
Registered: 10-08-2004
wha?

re-running..

okay now what? how do I move around and such?
------------------
that post was really cool ^ <IMG SRC="http://s49.photobucket.com/albums/f272/mitchelldude/swordbanner.png[/IMG]
[IMG]http://i49.photobucket.com/albums/f272/mitchelldude/liberalismjoke.jpg">
|
[|=D) <---|| me

[This message has been edited by buddboy (edited December 30, 2006).]

Mene-Mene

Member

Posts: 1398
From: Fort Wayne, IN, USA
Registered: 10-23-2006
Thats the problem. Its supposed to automatically move. Its supposed to be 2 different AIs against each other. Right now I was in testing the idea stage and only have 1 initial command. Move forward.

------------------
MM out-
Thought travels much faster than sound, it is better to think something twice, and say it once, than to think something once, and have to say it twice.
"Frogs and Fauns! The tournament!" - Professor Winneynoodle/HanClinto

buddboy

Member

Posts: 2220
From: New Albany, Indiana, U.S.
Registered: 10-08-2004
oh so you need help trying to get it to move forward?

hmm... you're calling AI which makes it so you attack. you're not calling the thing that sets your player's current action to Move Forward. so it never sets your current action to Move Forward.

------------------
that post was really cool ^ <IMG SRC="http://s49.photobucket.com/albums/f272/mitchelldude/swordbanner.png[/IMG]
[IMG]http://i49.photobucket.com/albums/f272/mitchelldude/liberalismjoke.jpg">
|
[|=D) <---|| me

[This message has been edited by buddboy (edited December 30, 2006).]

Mene-Mene

Member

Posts: 1398
From: Fort Wayne, IN, USA
Registered: 10-23-2006
Well, its supposed to be moving, but it doesn't. I don't know why. I'm thinking that maybe the strings don't match up and I need to do something like

If Action = 1 then

Move Forward

If Action = 2 then

Fire Laser

Rather than trying to do

If Action = "Move Forward"

Move Forward
exct....

------------------
MM out-
Thought travels much faster than sound, it is better to think something twice, and say it once, than to think something once, and have to say it twice.
"Frogs and Fauns! The tournament!" - Professor Winneynoodle/HanClinto

buddboy

Member

Posts: 2220
From: New Albany, Indiana, U.S.
Registered: 10-08-2004
well, see. you're telling it to move forward if the player's AI is attack. but the player's AI is never set to attack

okay, I changed that... but it's still not working.

try doing it your way and see if it works. also make sure you set the AI$ field in both player and enemy to "Attack".

------------------
that post was really cool ^
|
[|=D) <---|| me

Mene-Mene

Member

Posts: 1398
From: Fort Wayne, IN, USA
Registered: 10-23-2006
Code edited, and switched to new method, unfortunetly, still not working. I also added a new function.

BTW, I think the blank screen problem has to do with some sort of refreshing thing. Like flip isn't working. To solve, just minimize.

Edit: More testing, something seems to make me think that it isn't going through the loop more than once, or at all, or all of it.
------------------
MM out-
Thought travels much faster than sound, it is better to think something twice, and say it once, than to think something once, and have to say it twice.
"Frogs and Fauns! The tournament!" - Professor Winneynoodle/HanClinto

[This message has been edited by Mene-Mene (edited December 30, 2006).]

buddboy

Member

Posts: 2220
From: New Albany, Indiana, U.S.
Registered: 10-08-2004
yeah me too.

where are you getting the frame variable from?

[edit]in the debugger it just shows frame as being zero constantly.[/edit]

also I'm noting that it's saying that Enemy.ship and Player.ship are null.

------------------
that post was really cool ^ <IMG SRC="http://s49.photobucket.com/albums/f272/mitchelldude/swordbanner.png[/IMG]
[IMG]http://i49.photobucket.com/albums/f272/mitchelldude/liberalismjoke.jpg">
|
[|=D) <---|| me

[This message has been edited by buddboy (edited December 30, 2006).]

[This message has been edited by buddboy (edited December 30, 2006).]

Mene-Mene

Member

Posts: 1398
From: Fort Wayne, IN, USA
Registered: 10-23-2006
What frame variable?

How are you getting this info? I'm not getting it.

The display isn't changing is what I mean by frame.

------------------
MM out-
Thought travels much faster than sound, it is better to think something twice, and say it once, than to think something once, and have to say it twice.
"Frogs and Fauns! The tournament!" - Professor Winneynoodle/HanClinto

[This message has been edited by Mene-Mene (edited December 30, 2006).]

buddboy

Member

Posts: 2220
From: New Albany, Indiana, U.S.
Registered: 10-08-2004

If frame < 0 ;If frame is below 0

frame = 15 ;Move it to the highest frame

ElseIf frame >= 15 ;If its above the highest frame

frame = 0 ;Move it to 0

right at the beginning of the While loop.

when you run a program the Debug window pops up and it shows you the status of your Local, Global, and Const variables. frame is a local var.

------------------
that post was really cool ^
|
[|=D) <---|| me

Mene-Mene

Member

Posts: 1398
From: Fort Wayne, IN, USA
Registered: 10-23-2006
Oh, I see whats wrong there, "Frame" doesn't exist. Player(/Enemy)\ImgFrame does. Code fixed.

------------------
MM out-
Thought travels much faster than sound, it is better to think something twice, and say it once, than to think something once, and have to say it twice.
"Frogs and Fauns! The tournament!" - Professor Winneynoodle/HanClinto

buddboy

Member

Posts: 2220
From: New Albany, Indiana, U.S.
Registered: 10-08-2004
does it work now? or did it not affect anything?

------------------
that post was really cool ^
|
[|=D) <---|| me

Mene-Mene

Member

Posts: 1398
From: Fort Wayne, IN, USA
Registered: 10-23-2006
Didn't affect anything yet. However once rotating comes into play it would have been a problem.

If you don't do anything by 8:48, I'm going to play Alpha Centauri.

------------------
MM out-
Thought travels much faster than sound, it is better to think something twice, and say it once, than to think something once, and have to say it twice.
"Frogs and Fauns! The tournament!" - Professor Winneynoodle/HanClinto

[This message has been edited by Mene-Mene (edited December 30, 2006).]

Mene-Mene

Member

Posts: 1398
From: Fort Wayne, IN, USA
Registered: 10-23-2006
Through some more testing I've discovered it move only one time through, and not all the way through. It stops moving through the code here:


For a = 0 To Player\CurrentAction ;Start a loop which cycles through as many times as we have orders

If Player\Actions$[a] = 1 ;If the order is to move forward

Move(Player\Facing,"Player",2) ;Move forward using this function
Player\ActionsLeft[a] = Player\ActionsLeft[a] - 1 ;It doesn't need to be filled 1 less time

EndIf ;End of if statement

If Player\ActionsLeft[a] =< 0 ;If the order has expired

For b = 1 To (Player\CurrentAction - a) ;Repeat up through all the orders

;Refill all the slots upwards
Player\Actions$[a + (b-1)] = Player\Actions$[cur + b]
Player\ActionsLeft[a + (b - 1)] = Player\Actions$[cur + b]

Next ;End loop

a = a - 1 ;Go back one order to check

EndIf ;End if statement

Next ;End loop

------------------
MM out-
Thought travels much faster than sound, it is better to think something twice, and say it once, than to think something once, and have to say it twice.
"Frogs and Fauns! The tournament!" - Professor Winneynoodle/HanClinto

buddboy

Member

Posts: 2220
From: New Albany, Indiana, U.S.
Registered: 10-08-2004
yeah I noticed it move once.

------------------
that post was really cool ^
|
[|=D) <---|| me

Mene-Mene

Member

Posts: 1398
From: Fort Wayne, IN, USA
Registered: 10-23-2006
So that means that its getting stuck. somewhere in the Act() loop. It moves once, and then goes crazy. Together I think I've gotten farther than I ever could have alone. Later, maybe I'll let people on CCN make their own AIs. That would be fun seeing ArchAngel AI vs. Buddboy AI. It wouldn't be button mashing but preparation.

------------------
MM out-
Thought travels much faster than sound, it is better to think something twice, and say it once, than to think something once, and have to say it twice.
"Frogs and Fauns! The tournament!" - Professor Winneynoodle/HanClinto

buddboy

Member

Posts: 2220
From: New Albany, Indiana, U.S.
Registered: 10-08-2004
Oh I would so win.

haha!

Arch would be all scheming and tacticalizing, and I'd just run at him screaming 'THORAX THE IMPALER BOWS TO NO MAN!!'.

(if you've seen Rainbow Six Co-op Theater you know what I'm talking about).

-------------------

ok. yeah, it must be stopping somewhere in the loop.

now, we could try putting print commands to see where it's stopping. I'll do that.

------------------
that post was really cool ^ <IMG SRC="http://s49.photobucket.com/albums/f272/mitchelldude/swordbanner.png[/IMG]
[IMG]http://i49.photobucket.com/albums/f272/mitchelldude/liberalismjoke.jpg">
|
[|=D) <---|| me

[This message has been edited by buddboy (edited January 01, 2007).]

buddboy

Member

Posts: 2220
From: New Albany, Indiana, U.S.
Registered: 10-08-2004
I put in print commands to see where it's stopping.

It's not running the If statement that sees if Player\Actions$[a] = 1.

------------------
that post was really cool ^ <IMG SRC="http://s49.photobucket.com/albums/f272/mitchelldude/swordbanner.png[/IMG]
[IMG]http://i49.photobucket.com/albums/f272/mitchelldude/liberalismjoke.jpg">
|
[|=D) <---|| me

[This message has been edited by buddboy (edited January 01, 2007).]

Lazarus

Member

Posts: 1668
From: USA
Registered: 06-06-2006
quote:
Originally posted by Mene-Mene:
Didn't affect anything yet. However once rotating comes into play it would have been a problem.

If you don't do anything by 8:48, I'm going to play Alpha Centauri.


I sure hope he didn't do anything by 8:48.

Ahh... Alpha Centauri...

Mene-Mene

Member

Posts: 1398
From: Fort Wayne, IN, USA
Registered: 10-23-2006
Never did do Alpha Centauri. TY for the help BuddBoy, I'll look into that when I have time.

------------------
MM out-
Thought travels much faster than sound, it is better to think something twice, and say it once, than to think something once, and have to say it twice.
"Frogs and Fauns! The tournament!" - Professor Winneynoodle/HanClinto

pword
Junior Member

Posts: 5
From: New Albany, IN
Registered: 01-03-2007
okey. not gonna be able to help you anymore, not for a couple days anyways. school starts up tomorra.
Lazarus

Member

Posts: 1668
From: USA
Registered: 06-06-2006
I thought Buddboy was the one helping him.
pword
Junior Member

Posts: 5
From: New Albany, IN
Registered: 01-03-2007
I is buddboy. just waiting till my password gets fixed.
Mene-Mene

Member

Posts: 1398
From: Fort Wayne, IN, USA
Registered: 10-23-2006
I fixed a bug in AttackAI(), screen not yet updated.

------------------
MM out-
Thought travels much faster than sound, it is better to think something twice, and say it once, than to think something once, and have to say it twice.
"Frogs and Fauns! The tournament!" - Professor Winneynoodle/HanClinto

Mene-Mene

Member

Posts: 1398
From: Fort Wayne, IN, USA
Registered: 10-23-2006
Loops now, doesn't move for some reason. Code updated.

------------------
MM out-
Thought travels much faster than sound, it is better to think something twice, and say it once, than to think something once, and have to say it twice.
"Frogs and Fauns! The tournament!" - Professor Winneynoodle/HanClinto

Mene-Mene

Member

Posts: 1398
From: Fort Wayne, IN, USA
Registered: 10-23-2006
Anyone help?

------------------
MM out-
Thought travels much faster than sound, it is better to think something twice, and say it once, than to think something once, and have to say it twice.
"Frogs and Fauns! The tournament!" - Professor Winneynoodle/HanClinto

samw3

Member

Posts: 542
From: Toccoa, GA, USA
Registered: 08-15-2006
I don't know if your version of basic is picky about this, but I noticed in your move function references to movex% as well as movex (without the percent) These may be interpreted as two different variables in your type.

All in all, that's some nice code. Well documented, and a good engine driven algorithm. Good Job!

------------------
Sam Washburn

Mene-Mene

Member

Posts: 1398
From: Fort Wayne, IN, USA
Registered: 10-23-2006
Thanks for the compliments, I had the wrong symbol for 1, and for 2, it was inconsistent in the symbols, In actuality, you partially discovered it. I relooked at my symbols and siscovered this.


Function Move(facing,thing,direction) ;Function move, which allows it to move in the direction which is in the front most of the ship

Local movex#
Local movey#

If thing = "Player" Then ;If its the player

fixed that, and now it works. Here's the updated code above. Thank You. Now working on Laser.


------------------
MM out-
Thought travels much faster than sound, it is better to think something twice, and say it once, than to think something once, and have to say it twice.
"Frogs and Fauns! The tournament!" - Professor Winneynoodle/HanClinto

[This message has been edited by Mene-Mene (edited January 18, 2007).]