Board Logo
« Hi Rod »

Welcome Guest. Please Login or Register.
Nov 20th, 2017, 10:25pm


Conforums Terms of Service | Membership Rules | Home | Search | Recent Posts | Notification | Format Your Message | Installation FAQ


« Previous Topic | Next Topic »
Pages: 1  Notify Send Topic Print
 thread  Author  Topic: Hi Rod  (Read 762 times)
bplus
Senior Member
ImageImageImageImageImage


member is offline

Avatar




PM

Gender: Male
Posts: 1213
xx Hi Rod
« Thread started on: Jul 24th, 2017, 2:32pm »

Hi Rod

Did you ever finish your skiing project?

Append: Just thought it would be a cool subject for this time of year smiley
« Last Edit: Jul 24th, 2017, 11:37pm by bplus » User IP Logged

B+
Rod
Administrator
ImageImageImageImageImage


member is offline

Avatar

Graphics = Goosebumps!


PM

Gender: Male
Posts: 3129
xx Re: Hi Rod
« Reply #1 on: Jul 25th, 2017, 01:38am »

The full 3D maths is a bit of a challenge, I should have kept it simpler. I will dust off the project and see where I got it to. Simpler 2D downhill scroller might get more attention.
User IP Logged

Facundo
Board Moderator


member is offline

Avatar




PM

Gender: Male
Posts: 1301
xx Re: Hi Rod
« Reply #2 on: Jul 26th, 2017, 10:36am »

I really like these kind of games which uses a "fake" 3D environment. Not using trigonometry. I was coding something using this technique. Now that J2B is coming that makes me want to code a game using the new features too.
User IP Logged

cundo aka MSlayer
Rod
Administrator
ImageImageImageImageImage


member is offline

Avatar

Graphics = Goosebumps!


PM

Gender: Male
Posts: 3129
xx Re: Hi Rod
« Reply #3 on: Jul 26th, 2017, 3:00pm »

Yep I agree, 2D beats the heck out of 3D. I remember playing ZXSpectrum downhill and being enthralled.

My own project uses the blitter so is Liberty specific.


Perhaps we post some sprites and see what members can make of the sprite engine?
« Last Edit: Jul 26th, 2017, 3:09pm by Rod » User IP Logged

Facundo
Board Moderator


member is offline

Avatar




PM

Gender: Male
Posts: 1301
xx Re: Hi Rod
« Reply #4 on: Jul 26th, 2017, 5:57pm »

Well, I started playing games with a NES. There were these racing cars games that made use of several techniques to acquire the fake 3d I like.
Now, browsing through the Android store, 2D sprites are still present in many popular games.
I really would like to see new games made in JB. Who is there that has something to share? A few sprites, a background, maybe some sound effects, and JB Code of course
User IP Logged

cundo aka MSlayer
Rod
Administrator
ImageImageImageImageImage


member is offline

Avatar

Graphics = Goosebumps!


PM

Gender: Male
Posts: 3129
xx Ski Sprites
« Reply #5 on: Jul 28th, 2017, 06:09am »

OK, see if we can get any beginners on board, old timers can dust off their sprite skills too.

This is a link to a few sprite resources that will let you put a simple downhill ski game together. Lets see what you can do.


http://gamebin.webs.com/Liberty/Ski.zip
« Last Edit: Jul 28th, 2017, 06:10am by Rod » User IP Logged

bplus
Senior Member
ImageImageImageImageImage


member is offline

Avatar




PM

Gender: Male
Posts: 1213
xx Re: Hi Rod
« Reply #6 on: Jul 28th, 2017, 09:52am »

Thanks, sometimes when I see pictures I get ideas for something.

Ha! I'm not sure I have much to dust off! smiley
User IP Logged

B+
Rod
Administrator
ImageImageImageImageImage


member is offline

Avatar

Graphics = Goosebumps!


PM

Gender: Male
Posts: 3129
xx Re: Hi Rod
« Reply #7 on: Jul 31st, 2017, 06:29am »

Anyone making any progress? I have the skier moving reasonable well and a little scenery but still has bugs and I have not thought through what the game play will actually be.



Code:
nomainwin

    loadbmp "s1", "ski1.bmp"  'slowing
    loadbmp "s2", "ski2.bmp"  'normal
    loadbmp "s3", "ski3.bmp"  'fast
    loadbmp "s4", "ski4.bmp"  'right
    loadbmp "s5", "ski5.bmp"  'rightfull
    loadbmp "s6", "ski6.bmp"  'left
    loadbmp "s7", "ski7.bmp"  'left full
    loadbmp "tree", "tree.bmp"
    loadbmp "sman", "sman.bmp"
    loadbmp "bak", "bak.bmp"

    'open a window and graphicbox
    WindowHeight = 600
    WindowWidth = 800
    graphicbox #w.g, 0, 0, 800, 600
    open "Ski" for window_nf as #w
    #w "trapclose [quit]"


    #w.g "down ; background bak";
    #w.g "addsprite sman sman"
    dim t(5,3)' x,y,d
    for t=1 to 5
        #w.g "addsprite t";t;" tree"
        if rnd(0)>.5 then
            t(t,1)=440
            t(t,2)=330+int(rnd(0)*50)
            t(t,3)=1
        else
            t(t,1)=330
            t(t,2)=330+int(rnd(0)*50)
            t(t,3)=-1
        end if
        #w.g "spritescale t";t;" ";1
        #w.g "spritexy t";t;" ";t(t,1);" ";t(t,2)
        #w.g "spritevisible t";str$(t);" off"
    next

    #w.g "addsprite ski s1 s2 s3 s4 s5 s6 s7"
    #w.g "spritescale ski 200"

    'set the starting coordinates and movement
    x = 380
    xmov=0
    y = 400
    ymov=-1
    speed=0


    'start the keyboard checking event
    #w.g "when characterInput [keyboardinterrupt]"
    #w.g "setfocus"

    ' now start the timer to repeatedly call the drawing loop
    timer 56, [drawingloop]

    'now sit and wait for the first event to trigger
    wait

    [drawingloop]
    'this loop gets called every 56ms by the timer event

    'move the skier
    x=x+xmov*speed*2
    'if we hit the barrier turn
    if x<50 then x=50 : xmov=0 : #w.g "spriteimage ski s5"
    if x>650 then x=650 : xmov=0 : #w.g "spriteimage ski s7"

    'undulate the skier with a little randomness
    n=n+(speed*10*rnd(0)) mod 360
    yh=(5*sin(n/57.29577951))
    #w.g " spritexy ski ";x;" ";y+yh

    'move the tree
    for t=1 to 5
        dist=t(t,2)-329
        t(t,2)=t(t,2)+dist*speed/100
        t(t,1)=t(t,1)+dist*speed*t(t,3)
        #w.g "spritescale t";t;" ";dist*20
        #w.g "spritexy t";t;" ";t(t,1);" ";t(t,2)
        if t(t,1)>750 then t(t,1)=330 :t(t,2)=330 : t(t,3)=-1 :#w.g "spritevisible t";t;" on"
        if t(t,1)<0 then t(t,1)=440 :t(t,2)=330 : t(t,3)=1 :#w.g "spritevisible t";t;" on"
    next

    'now redraw the sprites
    #w.g "drawsprites"
    wait


    [keyboardinterrupt]
    'this loop gets called every time a key is pressed
    'set the movement depending on key pressed
    key$=Inkey$
    select case key$
        case "4"    'left
            xmov=xmov-(xmov>-6)
         case "6"    'right
            xmov=xmov+(xmov<6)
        case "8"    'speed up
            ymov=ymov+(ymov<1)
            speed = speed +(speed<10)
        case "2"    'slow down
            ymov=ymov-(ymov>-1)
            speed = speed -(speed>0)
        case "5"    'neutral
            ymov=0
    end select
    if xmov<=-2 then #w.g "spriteimage ski s7"
    if xmov=-1 then #w.g "spriteimage ski s6"
    if xmov=0 then
        if ymov =-1 then #w.g "spriteimage ski s2"
        if ymov = 0 then #w.g "spriteimage ski s1"
        if ymov = 1 then #w.g "spriteimage ski s3"
    end if
    if xmov= 1 then #w.g "spriteimage ski s4"
    if xmov>= 2 then #w.g "spriteimage ski s5"
    wait


    [quit]
    timer 0
    close #w

 
User IP Logged

bplus
Senior Member
ImageImageImageImageImage


member is offline

Avatar




PM

Gender: Male
Posts: 1213
xx Re: Hi Rod
« Reply #8 on: Jul 31st, 2017, 11:20am »

Nice, this gets things moving like my imagination.

I missed the test.bas file (EDIT, not text.bas) in first download because my editor is set to look for .txt files, dang, didn't think of that.

hmm... maybe the skier could be chased by an evil snow man.

I noticed the skier always stays on track.

hmm... maybe the skier might loose by slipping off track and maybe the snowman can smash into a sudden tree in the middle of the lane that the skier had just dodged...

hmm...
« Last Edit: Jul 31st, 2017, 6:02pm by bplus » User IP Logged

B+
Facundo
Board Moderator


member is offline

Avatar




PM

Gender: Male
Posts: 1301
xx Re: Hi Rod
« Reply #9 on: Aug 5th, 2017, 5:27pm »

What if instead of snowmen I put some green monsters there to dodge them ? muahaha !!

Has anyone played "Into the Dead", I'm playing it and it's great. I have it on my phone. I think it's available for iPhone too. Very similar to this old classic idea of things moving towards the player. The result: you feel you are moving forward.
User IP Logged

cundo aka MSlayer
Pages: 1  Notify Send Topic Print
« Previous Topic | Next Topic »

Conforums Terms of Service | Membership Rules | Home | Search | Recent Posts | Notification | Format Your Message | Installation FAQ

Donate $6.99 for 50,000 Ad-Free Pageviews!

| |

This forum powered for FREE by Conforums ©
Sign up for your own Free Message Board today!
Terms of Service | Privacy Policy | Conforums Support | Parental Controls