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.


Topics - Cybermonkey

Pages: [1] 2 3 ... 6
1
Offtopic / The Computer Magazine Archives
« on: 09. October 2016, 17:03:45 »
Could be of interest for some of us (especially those C64 and Sinclair magazines  ;)):
https://archive.org/details/computermagazines

2
Other Languages / Procedural Word Generation
« on: 16. July 2016, 17:52:50 »
I don't know for sure if we had that topic already but anyway, it's rather interesting. I found this JavaScript code on GitHub: https://github.com/hunterloftis/playfuljs-demos/blob/gh-pages/terrain/index.html
Only 130 lines of code for a nice result. Maybe someone port this to his favourite BASIC ...
I thought about that topic because they will release No Man's Sky soon. Really impressive what they've done. Almost everything (even the soundtrack) is generated procedurally... and as a result there will be 18,446,744,073,709,551,616 planets to explore. AFAIK the game consists "only" of 600,000 lines of code.

3
Community news and announcements / Release of RC Basic
« on: 06. April 2016, 17:48:41 »
I quote this from the allbasic forum:

Quote
I know I haven't been online in a while but I have been busy improving RC Basic.  I have fixed alot of bugs and added new features as well as finally finishing the android port.  I have also changed the website to a wordpress site that is way more appealing than the ugliness that was the old orange and brown site.  RC Basic is available for download at www.rcbasic.com

4
Code and examples / Randomize Overlaid Circles
« on: 28. February 2016, 19:44:42 »
I ported one of the examples from Stephen's page (http://shawweb.myzen.co.uk/stephen/sdlbasic.htm) to AllegroBASIC:

Code: [Select]
import "keycodes.bas"

screen (800,600,"Randomize Overlaid Circles")
srnd (val(right(time,2)))
TEXTSIZE (2)
SIDE=15
do
cls
  FOR I=1  TO SCREENWIDTH
    FOR J=1 TO SCREENHEIGHT
      X=I*SIDE/600
      Y=J*SIDE/600
      C=FIX(X*X+Y*Y)
      D=C/2
      IF D-FIX(D)<0.11 THEN
        PSET (I+1,J+1)
      ENDIF
     NEXT
     IF WINDOWCLOSED=TRUE THEN END
     REDRAW
NEXT
INK (0,0,0)
fillrectangle (0,0,screenwidth,40)
INK (255,255,255)
DRAWTEXT (0,0,"ESC to end, R for random new one, S to zoom back")
DRAWTEXT (0,20, "to start, any other to zoom out.")
SYNC
  SIDE=SIDE*1.15
  INKEY
  SRND (TICKCOUNT)
IF KEYSTATE (KEY_R) THEN
   SIDE=FIX(RND*160)+1
   ENDIF
IF KEYSTATE (KEY_S) THEN
  SIDE=15
 ENDIF
 INK (255,255,255)
until (keystate (KEY_ESC)=true) or (windowclosed=true)
END

5
Offtopic / ReactOS 0.4 was released
« on: 18. February 2016, 17:41:34 »
Quote
Nearly ten years ago the ReactOS Project released version 0.3.0. Today we are proud to announce the formal release of version 0.4.0. A great deal of work has gone into making this release happen and as we look back it is remarkable to consider how far the project has come since that release a decade ago. This release is both a celebration of and a testament to everything that the ReactOS team and community has achieved together.
https://reactos.org/

6
This might be intersting, since all books cover the BASIC programming language which of course was the most used programming language in the 80s.
Here's the link, maybe we can port some listings to our new BASICs. I'll have a look if I can port anything to AllegroBASIC.
http://www.raspberrypi-spy.co.uk/2016/02/usborne-releases-1980s-coding-books-as-free-pdfs/

7
Community news and announcements / AllegroBASIC
« on: 17. January 2016, 19:22:26 »




This little project of mine is evolving constantly. It is a simple BASIC not necessarily meant for game programming. There are, however, built-in functions for graphics primitives and loading and displaying bitmaps, loading and playing sound files and mouse and keyboard input.
AllegroBASIC uses the extremely powerful MY-BASIC interpreter provided by Wang Renxin. The source code can be found here: https://github.com/paladin-t/my_basic
An introduction PDF is also available there: https://github.com/paladin-t/my_basic/blob/master/MY-BASIC%20Quick%20Reference.pdf
Unfortunately Allegro 4 isn't developed any further and Allegro 5 doesn't fit in my programming scheme. At the moment I am porting AllegroBASIC to SDL2 which will be then named RETROBASIC. There will be the same limitations, to avoid numerous dependencies:
  • Only bitmap (bmp) files can be used as image files, so no gifs, pngs or jpgs!
  • Only wave files can be used as sound, so not mp3 or ogg or any other format!
  • There will be no fancy game engine things like particles, bitmap font routines etc. Code it yourself in BASIC!  ;)

Now what looks like a typical AllegroBASIC program:
Code: [Select]
' mousetest
KEY_ESC          = 59
screen (640,480,"Mousetest")
hidemouse
sound = loadsound ("scores.wav")
do
cls

drawtext (100,100,"MouseX: "+str(mouseX))
drawtext (100,112,"MouseY: "+str(mouseY))
drawtext (100,124,"MouseButton: "+str(mousebutton))
drawtext (100,136,"MouseWheel: "+str(mousewheel))
if mousebutton = 1 then
showmouse
playsound (sound, 128, 128, false)
endif
if mousebutton = 2 then
hidemouse
stopsound (sound)
endif
sync
until keystate (KEY_ESC) = true
end

8
Games / Match3 Game
« on: 04. January 2016, 19:37:51 »
Although not finished, yet, I'd like to show you my new project. (Just a screenshot for now ...  ::))
Anyway, the game mechanics are working, I will add a timer, some fields which must be destroyed, maybe some power-ups and of course a starting screen and a (local) highscore table. Uh, sound is total missing for now, this will be of course part of the finished game.
BTW, it's coded in Lua this time.

9
Examples / Analog (with integrated digital) clock
« on: 01. January 2016, 18:33:54 »
This was already posted on the old forum but since that is gone ... I just added a digital display to the analog clock.
Feel free to port this to your preferred language.
Code: [Select]
-- analog clock
-- converted to PulsarLua by Cybermonkey
require "scancodes"

win = openwindow ("Analog Clock",-1,-1,350,350)
setactivewindow (win)
setframetimer (60)
page = 0
xcenter = windowwidth()/2
ycenter = windowheight()/2

backcolor  (0,90,82,255)
textsize (2)
texttype (2)

repeat
cls()
key = getkey()

color (0,0,0,255)

fillcircle (xcenter, ycenter, 150)

color  (50,255,50,255)

for i=1, 11 do
if (i~=3) and (i~=6) and (i~=9) then
fillcircle (round(math.cos((i * 30) * math.pi / 180 - math.pi / 2) * 140 + xcenter), round(math.sin((i * 30) * math.pi / 180 - math.pi / 2) * 140 + ycenter), 3)
end
end

color  (255,0,0,255)

drawtext ("9",xcenter - 145, ycenter - 5)
drawtext ("3",xcenter + 135, ycenter - 5)
drawtext ("12",xcenter - 15, ycenter - 145)
drawtext ("6",xcenter - 5, ycenter + 130)

color (0,255,0,255)
drawtext (time(),xcenter-60 , ycenter -70)

second = os.date ("%S")
minute = os.date ("%M")
hour = os.date ("%H")
xsecond = round(math.cos(second * math.pi / 30 - math.pi / 2) * 120 + xcenter)
ysecond = round(math.sin(second * math.pi / 30 - math.pi / 2) * 120 + ycenter)
xminute = round(math.cos(minute * math.pi / 30 - math.pi / 2) * 100 + xcenter)
yminute = round(math.sin(minute * math.pi / 30 - math.pi / 2) * 100 + ycenter)
xhour = round(math.cos((hour * 30 + minute / 2) * math.pi / 180 - math.pi / 2) * 80 + xcenter)
yhour = round(math.sin((hour * 30 + minute / 2) * math.pi / 180 - math.pi / 2) * 80 + ycenter)

color (0,255,0,255)
line (xcenter, ycenter, xsecond, ysecond)
color (0,0,255,255)
line (xcenter, ycenter - 1, xminute, yminute)
line (xcenter - 1, ycenter, xminute, yminute)
color (255,0,0,255)
line (xcenter, ycenter - 1, xhour, yhour)
line (xcenter - 1, ycenter, xhour, yhour)

sync()
until key == SCANCODE_ESCAPE
closewindow (win)
closeapplication()

10
Announcements / Release of PulsarLua 0.6.2
« on: 31. December 2015, 17:40:40 »
The new version of PulsarLua has been uploaded. You can now use the second built-in font. Downloads are available for Windows, Linux32 and Linux64 as usual ont the page
http://pulsar2d.org/
You'll maybe notice the new look of that page, it was made using the Remarkable editor: https://remarkableapp.github.io/
I added the table of contents with Blue Griffon: http://bluegriffon.org/

11
Pulsar2D / Second font
« on: 26. December 2015, 18:58:21 »
Just wanted to let you know that I just implemented a second built-in font which is more Serif like. See yourself the attached screenshot...
It's not uploaded, yet, but soon.
Fonts can be accessed with the texttype function. Here's the code of the shown screenshot:
Code: [Select]
-- Test of built-in fonts ...

win = openwindow ("Fonttest",-1,-1,800,600)
setactivewindow (win)
cls()
color (255,0,0,255)
drawtext ("Sans Serif Default Font",0,0)
texttype (2)
color (255,255,0,255)
drawtext ("Serif Font",0,10)
textsize (2)
color (0,255,0,255)
drawtext ("Serif Font x2 (0123456789)",0,50)
texttype (1)
color (0,255,255,255)
drawtext ("Sans Serif Font x2 (0123456789)",0,100)
redraw()
inkey()
closewindow (win)
closeapplication()


12
Community news and announcements / Already on Google
« on: 24. December 2015, 09:56:02 »
If one searches for "basicprogramming forum" on Google, our forum here can already be found on the fourth entry.

13
Offtopic / MEGA65
« on: 20. December 2015, 12:33:43 »
Since we are a lot of retro users here, check out this site: http://mega65.org/
They anounced for Q1 2016 the Mega65 which is fully compatible with the Commodore 64 and furthermore the Commodore 65 which was never released ...


14
Community news and announcements / A new "hope" ... erm "home" ...
« on: 20. December 2015, 11:13:00 »
Greetings to all of you. A lot of you were members of basicprogramming.org which unfortunately isn't accessable anymore. I wrote to Tom Larson, but I think he doesn't care about it.
I got the following message back from my server:
Quote
Your message could not be delivered for more than 4 hour(s).
It will be retried until it is 5 day(s) old.

Anyway, spread the word, that we can discuss on this new place. If you know any active member who hasn't registered yet, don't hesitate to contact him (or me).
BTW, the "Preview" option works fine on this forum ...  ;)

The forum is now also accessable via: http://basicprogramming.pulsar2d.org

15
Announcements / BP.org seems to be gone
« on: 18. December 2015, 18:09:04 »
Seems like this is the end of basicprogramming.org. The domain has expired.
Here's my idea: if you'll like I can add some boards for all BASIC programmers like on the old forum since most of the active members are already registered here. Unfortunately I do not have any recent backup of that old board... although the domain does not perfectly fit.
The screenshot shows the available boards. Tell me, what of them do we need?

Pages: [1] 2 3 ... 6