BASIC

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

Pages: 1 [2] 3 4 ... 12
16
Off Topic / MAZE for the DTSS BASIC
« on: 2017-May-05 »
Here the news and code:
http://www.vintageisthenewold.com/the-maze-a-program-for-the-dtss-basic-simulator/#comment-5756

I gave a quick shot on trying to convert it to GLBasic with the idea of advance it a bit just for fun.
Bad move, the code is a bit complex for me so I gave up on this little giggle as it would take too long and specially because I already have another project on that line.

But if anyone would like to try, here is the original listing:
Code: GLBasic [Select]
10 LET N1=30
20 GOSUB 4100
30 GOSUB 6200
40 GOSUB 6600
110 GOSUB 1000
120 REM ASSIGN LOCKS AND KEYS
130 GOSUB 1300
139 REM TO DUMP MAZE ON SCREEN: FOR DEBUGGING AND CHEATING ONLY.
140 REM GOSUB 6000
150 REM START AT NODE 1
160 LET X=1
170 REM GET NEXT NODE
180 GOSUB 4200
190 IF X<>0 THEN 220
200 PRINT “MAZE DISSOLVED, THANK YOU FOR PLAYING”
210 STOP
220 IF X=N1 THEN 230
225 GOTO 180
230 PRINT***************************
240 PRINT “CONGRATULATIONS, YOU ARE OUT OF THE MAZE!
250 STOP
1000 LET I1 = 2
1005 FOR I0=1 TO N1
1010 LET I3=1
1020 IF I0>1 THEN 1050
1030 LET N2 = INT(RND(0)*2)+2
1040 GOTO 1060
1050 LET N2 = INT(RND(0)*3)+1
1060 IF I1+N2-1 <=N1 THEN 1080
1070 LET N2=0
1080 GOSUB 4000
1090 IF I2 = 0 THEN 1120
1100 LET M(I0,I3) = I2
1110 LET I3 = I3 + 1
1120 IF I1 > N1 THEN 1180
1130 FOR J = 1 TO N2
1140 LET M(I0,I3) = I1
1150 LET I1 = I1 + 1
1160 LET I3 = I3 + 1
1170 NEXT J
1180 GOSUB 5000
1200 NEXT I0
1210 RETURN
1300 FOR L0= 1 TO 3
1310 LET K0 = INT(RND(0)*28) + 2
1320 IF M(K0,5)<>0 THEN 1310
1329 REM FOLLOWING CODE INHIBITS LOCKING END NODES
1330 REM FOR L1=1 TO 4
1340 REM IF M(K0,L1)=0 THEN 1360
1350 REM LET K1=K1+1
1360 REM NEXT L1
1370 REM IF K1=1 THEN 1310
1380 LET M(K0,5) = INT(RND(0)*98)+1
1390 NEXT L0
1400 FOR L0=1 TO 30
1410 IF M(L0,5)=0 THEN 1540
1420 LET K0 = INT(RND(0)*29) + 1
1425 IF K0=L0 THEN 1420
1430 IF M(K0,6)<>0 THEN 1420
1440 LET K3=K0
1450 LET K2=0
1460 LET K2=K2+1
1470 IF K2>4 THEN 1530
1480 IF M(K3,K2)=0 THEN 1460
1490 IF M(K3,K2)>K3 THEN 1460
1500 IF M(K3,K2)=L0 THEN 1420
1510 LET K3=M(K3,K2)
1520 GOTO 1450
1530 LET M(K0,6) = L0*100 + M(L0,5)
1540 NEXT L0
1550 RETURN
4000 LET I2=0
4010 FOR L0= 1 TO I0-1
4020 FOR L1=1 TO 4
4030 IF M(L0,L1)=I0 THEN 4070
4040 NEXT L1
4050 NEXT L0
4060 GOTO 4080
4070 LET I2=L0
4075 REM PRINT I2
4080 RETURN
4100 DIM M(30,6)
4110 FOR A0=1 TO N1
4120 FOR A1=1 TO 6
4130 LET M(A0,A1) = 0
4140 NEXT A1
4150 NEXT A0
4160 RETURN
4200 PRINT*******************************************
4205 PRINT “YOU ARE IN A ROOM LABELED “;X
4210 PRINT
4212 IF M(X,6)=0 THEN 4220
4216 PRINT “THERE IS A KEY HERE CRYPTICALLY LABELED *;INT(M(X,6)/100);**;
4217 PRINT M(X,6)-INT(M(X,6)/100)*100;*
4218 PRINT
4220 PRINT “ENTER A NUMBER DEPENDING ON WHERE YOU WANT TO GO:
4230 PRINT
4235 PRINT0    HYPER JUMP”
4240 LET A1 = 0
4250 FOR A0=1 TO 4
4260 IF M(X,A0)=0 THEN 4290
4270 LET A1 = A1 + 1
4280 PRINT A1;”CORRIDOR “;A1
4290 NEXT A0
4300 PRINT5    EXIT”
4310 PRINT
4315 REM PRINT”A1 IS “;A1
4320 PRINTSELECT A NUMBER”;
4330 INPUT X0
4335 IF X0<>5 THEN 4340
4337 LET X=0
4338 RETURN
4340 IF X0<=A1 THEN 4350
4345 GOTO 4360
4350 IF X0>=0 THEN 4380
4360 PRINT “BAD CHOICE”
4370 GOTO 4310
4380 IF X0>0 THEN 4410
4385 LET X1 = X
4390 LET X = INT(RND(0)*29 + 1)
4395 IF M(X,5)<>0 THEN 4390
4397 IF X = X1 THEN 4390
4400 RETURN
4410 LET A1=1
4420 FOR A0=1 TO 4
4430 IF M(X,A0)=0 THEN 4470
4440 IF X0<>A1 THEN 4460
4450 GOSUB 5100
4460 LET A1=A1+1
4470 NEXT A0
4480 RETURN
5000 FOR M0= 4 TO 1 STEP -1
5010 LET M1=INT(RND(0)*M0+1)
5020 LET M2 = M(I0,M1)
5030 LET M(I0,M1)=M(I0,M0)
5040 LET M(I0,M0)=M2
5045 NEXT M0
5050 RETURN
5100 IF M(M(X,A0),5)<>0 THEN 5130
5110 LET X = M(X,A0)
5120 RETURN
5130 PRINT “ROOM”;M(X,A0);”IS LOCKED, WHAT IS THE KEY (NUMBERS ONLY);
5140 INPUT K0
5150 IF K0=M(M(X,A0),5) THEN 5110
5160 PRINT “WRONG KEY
5170 RETURN
6000 FOR K= 1 TO N1
6010 PRINT K;M(K,1);M(K,2);M(K,3);M(K,4);M(K,5);M(K,6)
6020 NEXT K
6030 RETURN
6200 PRINT ”        ***                **          **           **
6210 PRINT ”        **                  **          **           **        ”
6220 PRINT ”       **         *          **          **           **       ”
6230 PRINT ”      **         ***          **         ***           **      ”
6240 PRINT ”     **         ** **                   ** **           ***    ”
6250 PRINT ”    **         **   **                 ***  **           **    ”
6260 PRINT ”   **         **     **               ***    **           ***  ”
6270 PRINT ”  **          *       *               **      **           ***
6280 PRINT**         **         **            **        **           ***
6290 PRINT**         **           **          ***         **           **
6300 PRINT*         **WELCOME TO THE*        ** **                    **
6310 PRINT ”         **                       **                       **  ”
6320 PRINT ”        ** ****   ****     ****  ***********  ********    **   ”
6330 PRINT ”       ** *****  *****    ***** ** *****************   **    ”
6340 PRINT ”      **  **;**  ****’   ‘*******      ****  ***        **     ”
6350 PRINT ”     **   **;** ** **    **:****      ****   ***       **      ”
6360 PRINT ”    **   ***I*+** ***   *** ***      ****   I******** **       ”
6370 PRINT ”   **    ** **.** **   ***  ***    ****     ******** **        ”
6380 PRINT ”  ***   ‘** *****;**   ********   ****      ***     **         ”
6390 PRINT ”  **    *** **** ***  *********  ****      ‘****   **’         ”
6400 PRINT**     *** ***  **I ********** ********** *********           ”
6410 PRINT**      **  ***** ****   *** *********  ********.         **
6420 PRINT*                              2015 SALVADOR GARCIA         **
6430 PRINT ”           **            **        ***                     **  ”
6440 PRINT ”          **              **      **                      **   ”
6450 PRINT ”         **                **    **                      **    ”
6460 PRINT ”        **                  **  **                      **     ”
6470 PRINT ”       **          **        ****  ENTER AND ABANDON ALL HOPE  ”
6480 PRINT ”      **          **          **          **          **       ”
6490 RETURN
6600 PRINTSELECT A RANDOM SEED NUMBER 11000;
6610 INPUT I0
6620 IF I0>0 THEN 6630
6624 GOTO 6640
6630 IF I0<=1000 THEN 6660
6640 PRINT “BAD CHOICE”
6650 GOTO 6600
6660 FOR I= 1 TO I0
6670 LET I1 = RND(0)
6680 NEXT I
6690 RETURN
8000 END

17
Off Topic / Code music
« on: 2017-May-04 »
Here a very nice music creator.
It does so with text, pretty interesting.
http://hiromorozumi.com/beepcomp/index.html

18
Off Topic / Gods remake
« on: 2017-Apr-08 »
By Crom...this is unbelievable... :puke:
It gets really hard to make any constructive criticism.

http://www.indieretronews.com/2017/04/gods-remastered-bitmap-brothers-classic.html#more

19
Off Topic / GLB with portable c64?
« on: 2017-Apr-01 »
After some years of hard work, today I finally compiled GLBasic source code to run on a portable C64.
Without SLD and its limitations, it was tough to make everything happens.
There is no 3d and net commands support though, but everything else runs quite fine considering.
I will upload the code changes to Gernot later today. :good:

20
Off Topic / trs-80 color computer video
« on: 2017-Jan-24 »
I know some people won´t bother the facebuk wall.
But heck...this is superbly impressive! :o
https://www.facebook.com/ed.snider.927/videos/1853848161561534/

21
GLBasic - en / Help on a simple paint tool
« on: 2017-Jan-11 »
Hello chaps, I was thinking about coding a very simple pixel paint tool.
Problem here is that I don´t want to draw colors but want to draw from a fixed pattern.

I will try to explain:

-The canvas is always 256x192.
-The "colors" are actually 256x192 fixed images.
-When I draw with these colors, I want to "reveal" them over my buffer.

In my mind, I´d have to GRABSPRITE the size/form of my brush from the "color" image and paste on the buffer.
...and that is what I´m failing to grasp. I also would like to avoid GRABSPRITE, for compatibility reasons and also that my brush may not actually be square.

Does anyone know a way to do this without having to create a havoc with sprite to mem?

In a general way, when I click mouse to draw, I should get my brush positon and check against a "color" image, grab that exact portion with alpha, and paste over my canvas.

22
Off Topic / CPC Pinball Dreams
« on: 2016-Oct-28 »
This is superb!
http://www.indieretronews.com/2016/10/pinball-dreams-preview-fantastic-amiga.html

Does anyone here have the original computer still running?

23
Yesterday there was this event here and I got a table myself to human-test the Tree House game and the LV-426 jam one.
It was quite nice and lots of fun. Of course no one knew about GLBasic so I had to lecture everyone about the best tool there is! :)

People seemed to have greatly enjoyed Tree House´s visuals above anything else game wise. Hopefully that will help turn it into some gold coins.
Young players had some problems getting into it but more related to liking this kind of game or not.
Experienced players got to the bat boss on the 3rd run...heck, I should have kept the game harder. :D just joking, I feel it is well balanced.

The LV426 with its explosions was what the youngsters spent more time with.

Here some pics:

24
Announcements / [GBJam 5] MRU:LV-426
« on: 2016-Oct-02 »
MRU:LV-426 Escape from Hadley´s Hope
https://ericomont.itch.io/mrulv246-hadleys-hope

LATEST EDIT: uploaded final version here too (MRU_LV-final.zip).

Here a follow up on the more complex parts for me to face while coding:

_Creates a random 25 sized MAP containing first and last(7) checkpoints plus 5 distributed checkpoints. Fill the rest of the blocks with plains, slopes or bridges.
_Creates a random 1000 by 10 TRACK based on MAP at a 1x40 ratio.
_Creates a random
_Use a 44 by 10 marker on the TRACK corresponding to the position the game is happening for the real time terrain movement, interaction and transformations (reality bubble).
_Convert between TRACK and normal XY sprite coordinates to check collisions tank/ground, bomb/ground, explosion/ground.
_Explosion is nerfed, it creates a 3 by 3 area around the bomb hit and shots 4 random cells.
_Check  ground/ground gravity and destroy cells accordingly. Cells can only be if there is something under it. Bridges must be connected to a knot at least 3 cells away sideways.
_Bomb/tank collision happens normally similar to box2d.
_At TRACK 1000, it all gets copied till 2000 but flipped, same with 3000. It makes a 75 sized MAP corresponding to a 3000x10 TRACK.
_The 75 MAP are divided into some 15 groups that contains information on how many aliens should randomly appear and shoot. This draws a difficulty line.

The coords between TRACK and normal objects was a bit monstrous to make.
Now I know better. :)
...
Latest map generator beta is appended to this post, control with:
_Arrows to move cursor.
_+shift to scroll terrain.
_z /x/ c to fire guns going from single to wider shot.
_enter to generate new game.
...
Jam Logcat: https://itch.io/jam/gbjam-5/topic/41619/mrulv-426-patrol#post-57131
Jam info: https://itch.io/jam/gbjam-5

25
Off Topic / Forum post from Jim
« on: 2016-Jun-23 »
Entitled Basic Programming on the Tandy TRS-80 MC-10, Jim runs a personal blog with his experiments on basic with such machine.
He recently did a post about our joint adventures on this land and it is a nice read.  :good:

http://jimgerrie.blogspot.com.br/2016/04/some-examples-of-retro-programming.html

26
Long ago I got that, now I´m having it again.
Everytime I compile from the ide I get a windows warning sound.
Everything works fine though.

Does anyone know anything about this?

edit: could it have anything to do with the system sound? I notice as soon as the compiled game runs, the volume keys on keyboard stays unresponsive for about 10 seconds and then it computes.

27
Off Topic / Kitty Hello?!
« on: 2016-Apr-27 »
aaaaand I just could not help myself... :)

28
GLBasic - en / ANDROID back and menu buttons
« on: 2016-Apr-24 »
Probably a dumb question but I can´t find answers to it around (android extras maybe?).
How do I deal back and menu buttons on android phones using v14 latest?

29
Off Topic / New platforms
« on: 2016-Apr-02 »
I know most of you are skeptical about adding more platforms to GLBasic but, since we had access to the source code, I thought why not try to add one of my preferable ones?

Early today I finally managed to output code to the INTELBRAS TS-40 phone, and it is working flawlessly, even 3d.
Tomorrow I´m going to submit changes to Gernot and Spacefractal so we can properly add it to the already great set of supported platforms.

 

30
Off Topic / Pixel sprite generator
« on: 2016-Feb-23 »
Was this posted before?
Tool to auto create some kind of pixel art sprites for games.
https://github.com/zfedoran/pixel-sprite-generator

And here a description of the algorithm, quite nice idea!
http://web.archive.org/web/20080228054410/http://www.davebollinger.com/works/pixelspaceships/

Pages: 1 [2] 3 4 ... 12