• Welcome to Dark Bit Factory & Gravity.
 

Blitz2D, first program HELP!

Started by billy bob, July 04, 2009

Previous topic - Next topic

0 Members and 0 Guests are viewing this topic.

billy bob

I've been understanding things a lot more and have upgraded the game lots! :D

Although I still have a problem. :(

The smile is able to reach the aliens. And the power is able to be in the alien area. This is a problem because you can cheat by terminating aliens on the top row then go to the top row then you are safe there. I've been editing the code (for months) which makes it so the smile can't go off the edge but I haven't been able to do it. :( Help please? :)

billy bob

It's been two weeks and I still haven't solved it. Can anyone help?

Please?

Rbz

Plz post your latest code for people to take a look.

Anyway I think checking smile and aliens collision may fix this problem.
Or you can lock smile and power to a certain "y" position, ie below your aliens. Well, it all depends on how you want your game work.
Challenge Trophies Won:

billy bob

The smile not being able to reach the area where the aliens are was what I was hoping for. Seeming as you could still cheat. ;)

The game is here though. :)

Rbz

Ok, on the line:
If y < tiw Then y = tiw
change it to:
If y < 240 Then y = 240

This will limit player y position below of aliens positions.

Also you may want to limit power y position, just change this line:
image_y=Rnd(0,585+ImageHeight(img_power))
to
image_y=Rnd(240,585+ImageHeight(img_power))
Challenge Trophies Won:

billy bob


billy bob

I've been trying to create a pause mechanism but it only almost works:



If KeyHit(28) Or KeyHit(156) Then
Goto Pause
EndIf
Goto Resume
.Pause
If KeyHit(1) Then
lives = 0
Goto Resume
EndIf
If KeyHit(28) Or KeyHit(156) Then
FlushKeys
Goto Resume
EndIf
Goto Pause
.Resume



It doesn't work because if you keep it on pause then if there is power then the power goes when resumed and if there isn't power then if you keep it on pause then when resumed the power appears and if the speed = 2 then if you keep it on pause then when resumed the speed = 1.

This is another thing I've been trying to work out for months.

billy bob


Rbz

Insert this code before "Flip" command:


;Pause game
If KeyHit(25) Then ;Press "P" to pause
While Not KeyHit(25)
Text 425,300,"Game Paused",1,1
Flip
Wend
EndIf


When you press "P" it'll enter on infinite loop and a text message will be show to the user, pressing "P" again will exit this loop, hope that help :)

Challenge Trophies Won:

billy bob

Thanks, but, sorry. That wasn't the problem. It doesn't work because if you keep it on pause then if there is power then the power goes when resumed and if there isn't power then if you keep it on pause then when resumed the power appears and if the speed = 2 then if you keep it on pause then when resumed the speed = 1.

Clyde

Anyone's first program is always a real git, unless that is your perfect at everything & how are you doing with this Billy Bob?
Still Putting The IT Into Gravy
If Only I Knew Then What I Know Now.


Challenge Trophies Won: