Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Havard

Pages: [1] 2
1
GLBasic - en / Re: Help for a beginner
« on: 2009-Aug-08 »
Hi PJ - had noticed that you had defected too!  Will check them out.

2
GLBasic - en / Re: Help for a beginner
« on: 2009-Aug-08 »
Nope - all the graphics come from an old Zx spectrum game and were recoloured by a guy called Dean Swain (who is the biggest fan of the game ever). He created the sprites in the hope that someone would write the game and he was let down at least 3 times (including by me).  They were used in target 2006  and here I am having another go!!!  Links for your information are:

http://www.havsoft.co.uk/Target%20Renegade.htm - my website page for old version
http://www.target2008.com/target-2006/ -  Target Renegade 2006/08

and play original online here:

http://www.zxspectrum.net/ - look under 1988

Hope this is clear?

3
You're not the only one to point this out to me..

http://www.glbasic.com/forum/index.php?topic=3267.0

I muddle through...

4
GLBasic - en / Re: Help for a beginner
« on: 2009-Aug-07 »
Will add the option for window or fullscreen just for you!

5
GLBasic - en / Re: Help for a beginner
« on: 2009-Aug-07 »
It works!!!  I have attached zip for anyone interested.  What I have done is assumed due to the timing issues the punch key will be picked up and the routine to run the punch will take place.  So - before the punch happens I check for a left/right key press and set the state accordingly and it works!  I may need to fiddle a little more to get just the feel I want but it works.  Hopefully I can now add the rest of the moves...

[attachment deleted by admin]

6
GLBasic - en / Re: Please help a begginer
« on: 2009-Aug-07 »
Next best thing to a manual.

7
Feedback / Re: Gernot have you seem this...
« on: 2009-Aug-07 »
You could sell yours for $14.99 then...

8
Are you saying what I think you are saying about my coding... :whistle:

9
Ah - but which is quicker?

10
GLBasic - en / Re: Help for a beginner
« on: 2009-Aug-07 »
Thanks guys - lots of helpful advice.  Thanks for the reformat of the code Futurecow - I know what you mean!  Ian - I have used your code and it seems to work a treat.  Lastly on to the problem, adding the delay doesn't make a difference but I can get the kick to work if I add a check within the punch loop - so now you can punch and back kick both ways.  Still needs more work to work the way I want.  I think that cowie (can I call you cowie) has hit the nail on the head about timing.  I might have to get a bit more sophisiticated with my key checks but I'm not that clever...

11
Feedback / Gernot have you seem this...
« on: 2009-Aug-06 »
http://www.shootemupcreator.com/

Just stumbled upon this - no demo or demos to download though....

I'm sure yours is better. =D

12
GLBasic - en / Re: Help for a beginner
« on: 2009-Aug-06 »
I have just found out how to attach a zip!  Ignore my stupidity..

[attachment deleted by admin]

13
GLBasic - en / Re: Help for a beginner
« on: 2009-Aug-06 »
Thanks for your kind words and support!  Is there any easy way of attaching a zip or do I need to link to it via my website?

As I said earlier, this is an old remake that I am revisitng - it basically got put on hold due to the birth of my son (2 year s ago) and a loss of interest.  Now that I ma finally getting some time back in my life and not being completely knackered the whole time, I want to get this done.  In the mean time I have changed my computer and my old blitz stuff wasn't compiling plus blitz can be a bit unstable at times.  I sensed that GLbasic is quite similar and the opportunity to build for different systems is really attractive - plus I hope to use it at school with the computer club!

14
IDE/Syntax / Folding of Functions in the IDE
« on: 2009-Aug-06 »
Can you or would it be possible to make it so you can fold functions in the IDE - just giving the title of the funciton.  ONce you have a working function it could then be compressed - this makes your code much easier to read.  Have used this before in another basic IDe and it was really helpful as I find following code can be really hard as it grows.

15
GLBasic - en / Re: Help for a beginner
« on: 2009-Aug-06 »
Here is the code without jumps but still not working -help!!!!!!!!!!!!!!

Code: GLBasic [Select]
// --------------------------------- //
// Project: TR Remix
// Start: Monday, July 27, 2009
// IDE Version: 6.164

SETSCREEN 640,480,TRUE

//LOADFONT "fonts/zx32colour.png",1
//LOADFONT "fonts/zx16colour.png",1

//load graphics
LOADSPRITE "backgrounds/level01.png",0
LOADSPRITE "backgrounds/bottombar2.png",1

//player1
LOADANIM "graphics/p1.png",100,32,42 //walking
LOADSPRITE "graphics/shadow1.png",101 //shadow
LOADANIM "graphics/p1hit.png",102,56,15 //p1 hit to floor
LOADANIM "graphics/p1flyingkick.png",103,40,46 //flying kick
LOADANIM "graphics/p1punch.png",104,40,45 //p1punch
LOADANIM "graphics/p1floorpunch.png",105,28,30 //p1 floor punch
LOADANIM "graphics/p1knee.png",106,32,42 //p1 knee
LOADANIM "graphics/p1bk.png",107,40,45 //p1 back kick
LOADSPRITE "graphics/head.png",99




//Set up variables
GLOBAL p1x=100,p1y=60,p1f=0,p1dir=1
GLOBAL p1state=0,punch1=0,b1=0,bd=0,delay=0
GLOBAL right1=0,left1=0,up1=0,down1=0
GLOBAL scroll=0,lives=3

//main loop
WHILE KEY(57)=0

//draw background
        DRAWSPRITE 0,n,0
        DRAWSPRITE 1,0,141
        FOR n=1 TO lives;       DRAWSPRITE 99,n*20,170;         NEXT
        //PRINT "P1",0, 150
//a$=Str(p1score): ss=LEN(a$): a$="":FOR n=0 TO 5-ss: a$=a$+"0":NEXT: a$=a$+Str(p1score)
//jf_text (fntzx16, 25, 150, a$)
//jf_text (fntzx16, 205, 150, "P1")

        keypress()
        drawsprites()
        IF p1state=0 THEN controlp1()
        SHOWSCREEN


WEND



FUNCTION keypress:

right1=0; left1=0; up1=0; down1=0;

IF KEY(205) THEN right1=1
IF KEY(203) THEN left1=1
IF KEY(200) THEN up1=1
IF KEY(208) THEN down1=1


//code to make player release punch key

b1=KEY(29)
IF b1=1 AND bd=0 THEN punch1=1
bd=b1


PRINT "punch="+punch1,100,150
PRINT "right="+right1,100,160
PRINT "left="+left1,100,170
PRINT "up="+up1,100,180
PRINT "p1state="+p1state,100,190
PRINT "p1dir="+p1dir, 20,150
PRINT "bd="+bd, 20,160
PRINT "b1="+b1, 20,170

ENDFUNCTION

FUNCTION controlp1:

//check for back kick
IF punch1 AND right1 AND p1dir=-1
        p1state=2
        p1f=0
        delay=50
ENDIF

IF punch1 AND left1 AND p1dir=1
        p1state=2
        p1f=0
ENDIF

//check for just a punch
IF punch1=1 AND p1state=0
        p1state=1
        p1f=0
ENDIF

IF right1=1
        p1x=p1x+1
        p1dir=1
        p1f=p1f+.3
ENDIF

IF left1=1
        p1x=p1x-1
        p1dir=-1
        p1f=p1f-.3
ENDIF

IF up1=1
        p1y=p1y-1
        p1f=p1f+(p1dir*.3)
ENDIF

IF down1=1
        p1y=p1y+1
        p1f=p1f+(p1dir*.3)
ENDIF

IF p1f>11 THEN p1f=0
IF p1f<0 THEN p1f=10

//limits fo x AND y movement FOR player
IF p1x<8 THEN p1x=8
IF p1x>300 THEN p1x=300
IF p1y>92 THEN p1y=92
IF p1y<42 THEN p1y=42

//scroll screen if all baddies beaten in section
IF p1x>200 AND scroll=1
         p1x=200
         n=n-1
ENDIF

ENDFUNCTION

// 0rder sprites from top to bottoom
FUNCTION drawsprites:
FOR n=42 TO 92



IF p1state=0

        IF p1dir=1 AND p1y=n
         DRAWSPRITE 101,p1x,p1y+35
         DRAWANIM 100,p1f,p1x,p1y
        ENDIF

        IF p1dir=-1 AND p1y=n
         DRAWSPRITE 101,p1x+6,p1y+35
         DRAWANIM 100,p1f+12,p1x,p1y
        ENDIF

ENDIF


//punch
        IF p1state=1 AND p1dir=1 AND p1y=n
         DRAWSPRITE 101,p1x,p1y+35
         DRAWANIM 104,p1f,p1x-6,p1y-3
         p1f=p1f+.1

                IF p1f>3
                        p1state=0
                        p1f=0
                        punch1=0
                ENDIF

        ENDIF

        IF p1state=1 AND p1dir=-1 AND p1y=n
         DRAWSPRITE 101,p1x+6,p1y+35
         DRAWANIM 104,p1f+7,p1x-4,p1y-3
         p1f=p1f+.1

                IF p1f>3
                        p1state=0
                        p1f=0
                        punch1=0
                ENDIF
        ENDIF

//back kick
        IF p1state=2 AND p1dir=1 AND p1y=n
         DRAWSPRITE 101,p1x,p1y+35
         DRAWANIM 107,p1f+2,p1x-12,p1y-3
         p1f=p1f+.1; IF p1f>1 THEN p1f=1
         INC delay, 1

                IF p1f=1 AND delay=50
                        p1state=0
                        p1f=0
                        punch1=0
                        delay=0
                ENDIF

        ENDIF

        IF p1state=2 AND p1dir=-1 AND p1y=n
         DRAWSPRITE 101,p1x+4,p1y+35
         DRAWANIM 107,p1f,p1x+6,p1y-3
         p1f=p1f+.1; IF p1f>2 THEN p1f=2

                IF p1f=2 AND delay=50
                        p1state=0
                        p1f=0
                        punch1=0
                        delay=0
                ENDIF

        ENDIF
NEXT


ENDFUNCTION






 

Pages: [1] 2