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 - Ampli

Pages: [1]
1
Purebasic / PB Twister
« on: August 19, 2019 »
Hello, I want to share my first code here with you. Nothing special but a huge step for me in coding.

Code: [Select]
; Written by Mikael 'Ampli' Johansson 2019
; Purebasic 5.71
; Enjoy it as I do =)

InitSprite()
InitKeyboard()

OpenWindow(1, 0,0,800,600,"DBF - Twister", #PB_Window_ScreenCentered)
OpenWindowedScreen(WindowID(1),0,0,800,600,0,0,0)
SetFrameRate(30)

Global M_PI.f = 3.1415

Repeat
  ExamineKeyboard()
  event = WindowEvent()
  ClearScreen(RGB(55,155,185))
 
  StartDrawing(ScreenOutput())
    For x = 0 To 799 Step 2
      aa.f  + 0.00015
      s.f = Sin (aa+x / 150) * 120
     
      amp.f = (Cos(x / 8000  ) * s/165)
     
      y1.f = 300 + Cos((aa + amp)                   ) * 157
      y2.f = 300 + Cos((aa + amp) + M_PI / 2        ) * 157
      y3.f = 300 + Cos((aa + amp) + M_PI            ) * 157
      y4.f = 300 + Cos((aa + amp) + M_PI + M_PI / 2 ) * 157
     
      If y1 < y2
        Line(x, y1+s, 1, y2 - y1, RGB(  127+s,   0,  127+s))
        Line(x, y1+s, 9, y2 - y1 , RGB(  255,   255,  255))
       EndIf
       If y2 < y3
         Line(x, y2+s, 1, y3 - y2, RGB(  127-s,   127-s,  0))
         Line(x, y2+s, 9, y3 - y2 , RGB(  255,  255,  255))
       EndIf
       If y3 < y4
         Line(x, y3+s, 1, y4 - y3, RGB(  127+s,   0,  100))
         Line(x, y3+s, 9, y4 - y3 , RGB(  255,   255,  255))
       EndIf
       If y4 < y1
         Line(x, y4+s, 1, y1 - y4, RGB(  0,   127+s,  75))
         Line(x, y4+s, 9, y1 - y4 , RGB(  255,   255,  255))
       EndIf
    Next
  StopDrawing()
 
 
  Delay(1) : FlipBuffers()
 
Until event = #PB_Event_CloseWindow Or KeyboardPushed(#PB_Key_Escape)
End

2
Projects / New XM
« on: August 17, 2019 »
Hello, I having fun with Milkytracker again.
I don't know what to do with it so I post it here for you to hear.
More can be done to it but more songs have be started  :bfuck2:

/Ampli

3
Thanks alot, I will look into it and see if I can get it to work.

4
Sorry for posting in this old Thread, Is it possible somehow to convert this 4klang usage to PureBasic Linux?

5
General chat / new tune from me.
« on: December 23, 2016 »
Hello all, I am working with Milkytracker again after many years. This tune sounds like my other Ampli tunes but who cares I like it anyway and it is fun to make them.

6
General chat / Re: Website Issues!
« on: July 06, 2014 »
welldone, Ampli says Hej Kompis.

7
Purebasic / Re: Wrapper for Jim's TinySIDLib
« on: September 16, 2010 »
Thanks alot jim.

8
Purebasic / Re: Wrapper for Jim's TinySIDLib
« on: September 16, 2010 »
This link dosen't work anymore. Does anyone have this wrapper to share?

9
GFX & sound / Re: Request for C64 music (SID)
« on: October 09, 2009 »
You GOT MAIL!

i can try to make something.


/Ampli

10
General coding questions / Re: MusicLine Question!
« on: December 13, 2008 »
just to play musicline songs under windows aint hard, i use xmplay for that and it works great. i was looking for a replayer to use for games/intros, i love that tracker and just wanted to track more tunes with it on my amiga 1200. if xmplay had a replayer for it it cant be impossible i think. we already have great SID replayers now.

Thanks for the answers.. :cheers:

11
General coding questions / Re: MusicLine Question!
« on: December 12, 2008 »
MusicLine editor, the tracker on amiga, i wanted to make tunes again with it on the real machine, but i also want to be able to use the tunes in own coded stuff on PC. any ideas howto? =)

12
General coding questions / MusicLine Question!
« on: December 12, 2008 »
Do any of you know a routine to play MusicLine songs from amiga on pc? ive been searching but failed to find any.

13
C / C++ /C# / Re: Linux
« on: November 19, 2008 »
i have kdevelop installed. dont know how to use it yet tho.

14
C / C++ /C# / Re: Linux
« on: November 19, 2008 »
Thanks for the tips. i will look at it now... i havent found any useful info for ubuntu about it. its much easier to find info for windows.hehe but i will try to survive on linux for a while.



15
C / C++ /C# / Linux
« on: November 19, 2008 »
Hi i just started to learn some c++ on linux. can someone give me some tips where i can find some info about linux API or something that shows how i can make a messagebox and open a window and such on linux. i tryed some on windows and it worked well but im more like a Ubuntu nerd for now. =)

16
Challenges & Competitions / Re: [2 BUTTON] Rollertube
« on: February 16, 2008 »
hehe, but it wont restart after Death. need to press escape to exit..and the gameover parts repeats playing..

17
Challenges & Competitions / Re: [2 BUTTON] Rollertube
« on: February 16, 2008 »
The gameplay is to slow.  :-*

18
I can win with an AREXX code. no problemas  :diablo:

19
General chat / Re: The Welcoming Comittee
« on: December 16, 2006 »
Thank you!

Pages: [1]