Login
Forum Help



Post Your Message
="hidden" name="cat" value="Games">
Username: (Login)

Topic:
Message:
 


Previous Messages
Posted By

RoePipi
on 2017-02-15
15:20:48
 Re: BASIC Balloon Breaker

This game seems interesting, I'll surely check it out for new knowledges of BASIC! Thanks happy

Posted By

SVS
on 2017-02-14
07:29:37
 Re: BASIC Balloon Breaker

With this program:

10 ti$="000000": for i=1 to 90000: if i%>0 then print "ciao"
20 next
30 print ti$

I obtain 7:15, while the same program but with the variable "iz" instead of "i%", the time is 7:13.
IMO the reason of the anomalies you discovered, is that math operations are managed by O.S. always as FP. The integers are converted into FP, then back into integer. In the above program there is no math operation (only comparison), while in RKSoft' one yes (i%=i%+1).

Posted By

Gaia
on 2017-02-14
02:17:50
 Re: BASIC Balloon Breaker

My bad, it was a quick reaction, Csabo is absolutely right on most issues. However, it should be noted that although indeed "I1" vs. "I%" is a more fair comparison due to the parsing but as a real life example we should test against a single character variable since it is not possible using forced integers otherwise, so that is the overhead the whole thing comes with, i.e. it should be faster even with this overhead. Well it turns out it's not happy I just checked the C64 in VICE with separate 4 liners and I obtained this:
6169 (float)
6583 (int)
Well, now I recall I used to have learned this trick on the TRS-80 (HT1080Z for the Hungarian folks) where it did speed things up a lot, but that's an entirely different implementation of Microsoft's BASIC.

Posted By

Csabo
on 2017-02-13
09:44:58
 Re: BASIC Balloon Breaker

I pointed this out to Gaia in a PM, I didn't think it's worth cluttering the forum with it... But since you brought it up happy

First complaint: posting this huge screenshot is bad form, takes up too much space and can't be copy/pasted from.

Second: That's only half the reason (GOTO 60 is slower than GOTO 20 due to the number of lines before it), and you're still wrong. Your example suffers from a similar problem. As it is, the 2nd loop consistently takes about ~6180. However, if you run the two tests as two completely separate 3-line programs (as it should be), it consistently takes about ~6080. So you're unfairly adding about 100 to the speed. (I suspect it's because I% happens to be the 2nd variable that has been allocated, so it takes longer to find it, but don't quote me on that. My point still stands regardless of the cause.)

And finally, the other half of the problem is that the interpreter takes longer to parse the "I%" variable name than "I", since it's a whole byte longer. A more fair comparison would be "I1" vs. "I%", so both variable names are two characters/bytes.

The results are still the same in the end, the "%" variable is slower, but by less than both of your examples. Which is kinda weird, I also assumed that the integer variable would be faster, but not in this case.

Posted By

RKSoft
on 2017-02-13
09:23:30
 Re: BASIC Balloon Breaker

@Gaia
var with % ist definitive slower than without the %. And your example is not exact because you use goto statement and the 2.part of your code needs more time for that goto wink. Here is my example:



Posted By

MMS
on 2017-02-12
17:54:04
 Re: BASIC Balloon Breaker

Yeah, thanks Gaia for the test, it was smarter then me, I tried to compare the final copy routine speed on screen by checking the drawing performance with my bare eyes. (hehe)
Anyhow, your finding fits to my personal experience.

Maybe we should open a myth-buster topic? happy
(next to this % issue is the DRAW routine behaviour in multicolor mode, but it could be more a bug then a myth)

There could be a part in programming section: how you can speed up your program?
(the first thing comes into my mind, are the BASIC compilers, bigger but faster)

Posted By

RKSoft
on 2017-02-12
10:05:29
 Re: BASIC Balloon Breaker

I don't think that var% is faster than var.

I noticed that the IF...THEN statement is very slow in Commodore BASIC, that is why i'm using on()gosub statements. I tested different solutions for the computer AI the last 2 month and the current one is the fastest, strange. I don't know where i can optimize the code because i writing BASIC programms in Notepad++ and copy&paste to VICE. Okay, i know VICE can handle uppercase to CBM petscii but only the SHIFTed. Maybe, i can optimize the tilesets where are using uppercase instead of chr$.

And, i'm thinking about a different charset in hires like ZX Spectrum, also no multicolor. The sprites(!) looks nicier than in multicolor because they aren't so stretched. What do you think?

Posted By

Gaia
on 2017-02-12
06:04:12
 Re: BASIC Balloon Breaker

Actually, you could be right... just tried this and the %-one was slower

10 TI$="000000"
20 I=I+1
30 IFI<10000THEN20
40 PRINTTI
50 TI$="000000"
60 J%=J%+1
70 IFJ%<10000THEN60
80 PRINTTI

READY.
RUN
6484
7277


Posted By

MMS
on 2017-02-12
05:36:51
 Re: BASIC Balloon Breaker

partially OT
I recently tried this speed-up in a project, but still the FOR routine with % integers + POKEs into memory was slower, than the original DRAW routine. Strange... (so I was not really impressed by the speed of POKEs+PEEKs when combined with FOR)

Posted By

Gaia
on 2017-02-12
05:20:52
 Re: BASIC Balloon Breaker

Really nice BASIC game, perhaps not an overstatement, that one of the nicest and fastest paced. The speed is impressive from a BASIC game but I think you could still optimize it a bit if you used forced integer arithmetic wherever possible, e.g. not using T = T + 50 but rather T%=T%+50. The BASIC interpreter can better optimize the execution this way (I seem to have some benchmarks in a magazine as well but I can't find it right now).

Posted By

MMS
on 2017-02-12
04:24:16
 Re: BASIC Balloon Breaker

It is really, really fast for a BASIC program, congratulations!

Posted By

Litwr
on 2017-02-12
01:03:24
 Re: BASIC Balloon Breaker

Nice colors! happy

Posted By

RKSoft
on 2017-02-11
17:50:34
 Re: BASIC Balloon Breaker

Finally a first public beta for you. Please load the program with the parameters ,8,1 else it will be corrupt. I put a preloader, the charset and the BASIC program into one file. The start of the BASIC memory will be $2000.

Play with cursor keys and C= to jump. There is no titlescreen or an end, so after passing level 5 it will occurs an error. If someone can speed up the code please let me know. Currently, i working on a level editor for making tilebased levels.

There's no new features in this beta since the last video. But i speed up the code a little bit and changed some things in the charset (ex:arcade font).

Download: Balloon Breaker Beta 3

Posted By

Mad
on 2016-10-22
22:37:45
 Re: BASIC Balloon Breaker

Looks, awesome already. The scrolling down of the levels look somehow very "assemblerish". However, I think the video has no hearable sfx. And again: Great achievement for it beeing purely basic. Nice work!

Posted By

RKSoft
on 2016-10-21
17:34:18
 Re: BASIC Balloon Breaker

So, the work on the game loop is final and i can show you a short preview of my hard work (the last 1 1/2 week). It has sfx at balloon breaking and bonus count after you success a room. Now, i will add the new rooms, a complete rework titlescreen and some bonus rooms.



Posted By

Csabo
on 2016-10-18
17:12:26
 Re: BASIC Balloon Breaker

Cool, good first attempt happy The entire KB needs more work, I'm just not sure how to motivate people to do it.

My suggestions would be to break the individual topics into individual entries. For example, you've added stuff about simulating keystrokes, but this was already in the KB, covered in great detail and with examples: How To Simulate Keystrokes.

Also, check the forum for Defining a custom charset from BASIC. There's an old topic which has some very cool code. Yours doesn't copy the whole charset, only a quarter of it.

Posted By

RKSoft
on 2016-10-18
10:55:32
 Re: BASIC Balloon Breaker

Done, i hope i done it correct. Otherwise, please fix it. I added more to that site. I hope it helps. ^^

http://plus4world.powweb.com/plus4encyclopedia/500250

Posted By

gerliczer
on 2016-10-17
11:18:50
 Re: BASIC Balloon Breaker

You may add these POKEs to the Plus/4 Encyclopedia yourself. And the proper terminology is reverse not inverse. Even the keyboards have RVS ON/OFF as silk-screen printed labels.

Posted By

RKSoft
on 2016-10-17
09:23:14
 Re: BASIC Balloon Breaker

Mega thx, so i saved the following pokes into my TXT file (Tipps & Tricks for C264) ^^:

poke65287,peek(65287)and64or0:rem ...Auto-Invers on, Multicolor off, big border
poke65287,peek(65287)and64or8:rem ...Auto-Invers on, Multicolor off, normal border
poke65287,peek(65287)and64or16:rem ...Auto-Invers on, Multicolor on, big border
poke65287,peek(65287)and64or24:rem ...Auto-Invers on, Multicolor on, normal border
poke65287,peek(65287)and64or128:rem ...Auto-Invers off, Multicolor off, big border
poke65287,peek(65287)and64or136:rem ...Auto-Invers off, Multicolor off, normal border
poke65287,peek(65287)and64or144:rem ...Auto-Invers off, Multicolor on, big border
poke65287,peek(65287)and64or152:rem ...Auto-Invers off, Multicolor on, normal border

And now, it works fine happy. Maybe, you can add these POKEs to Plus4World for other BASIC programmers?

Posted By

Csabo
on 2016-10-16
21:48:19
 Re: BASIC Balloon Breaker

Sure. So, it's basically as I said above: the only bit you want to avoid changing is $40. This you can keep with the AND operator.

POKE 65287, PEEK(65287) AND 64 OR #

This is the single POKE you need. It will "save" the $40/64 bit, and let you OR any value. For multicolor ($10) + 256 chars ($80) + normal horizontal scroll value ($08), so that's $98, 152 in decimal.

Posted By

RKSoft
on 2016-10-16
21:11:01
 Re: BASIC Balloon Breaker

Thx, but i need the other modes too.
My BASIC game runs in multicolor mode and i need all 256 chars. How is the poke?

poke65287,16:poke65287,peek(65287)or128 or poke65287,24:poke65287,peek(65287)or128
won't work.

Posted By

Csabo
on 2016-10-16
17:48:38
 Re: BASIC Balloon Breaker

Ah, that's exactly what I said ($80 bit of $FF07 = 128/65287 in decimal). I just didn't understand you were asking how to do that in BASIC.

Aaaand... here we go again, this is my one big pet peeve happy Your POKEs actually make your game PAL only! $40 on that TED register is the PAL/NTSC bit. POKEing into that memory location and overwriting bit $40 is just wrong - do not do that under any circumstances please wink

"Standard value + 128"... Well, kinda, more like "current-value OR 128". Here's what do you want to from BASIC:
POKE65287,PEEK(65287)OR128

Thanks happy

Posted By

RKSoft
on 2016-10-16
17:28:34
 Re: BASIC Balloon Breaker

@Csabo
I mean the use of all 256 chars in one screen, no auto invers, sorry for that misunderstanding.

It works now with the little help of Hexworxs@Forum64!

poke65287,0:rem ...Auto-Invers on, Multicolor off, big border
poke65287,8:rem ...Auto-Invers on, Multicolor off, normal border
poke65287,16:rem ...Auto-Invers on, Multicolor on, big border
poke65287,24:rem ...Auto-Invers on, Multicolor on, normal border
poke65287,128:rem ...Auto-Invers off, Multicolor off, big border
poke65287,136:rem ...Auto-Invers off, Multicolor off, normal border
poke65287,144:rem ...Auto-Invers off, Multicolor on, big border
poke65287,152:rem ...Auto-Invers off, Multicolor on, normal border

Also, the standard value + 128! ^^ Simple, but effective.

Posted By

Csabo
on 2016-10-14
22:06:18
 Re: BASIC Balloon Breaker

By default, you cannot do that. The $80 bit of $FF07 controls this: either you have characters 0-127 and then their inverted counterparts, or all 0-255 characters.

You probably don't need every single character inverted though, so you can probably just use the 256 character mode, and have the inverted characters drawn as they are.

(Or... you could use raster interrupts and such to get around this, but that's not possible from pure BASIC.)

Posted By

RKSoft
on 2016-10-14
18:40:16
 Re: BASIC Balloon Breaker

Beta testing will be nice. I released a first beta at 2016-08-21, see above. So, the game will be ready, yes.
A release date, i don't know because i work very hard at the main loop to improve and to speed up. I know, i could not make an arcade game in BASIC with speed of machine code but i try to give my best to get the best result for a BASIC game.

I let you know when i work on the last routines. Then i know when i can release a rollup for beta testing.

Added:
Btw, do anybody know how can i use a charset with 256 (0-255) per screen (also include the invers)?

Posted By

Csabo
on 2016-10-14
11:27:40
 Re: BASIC Balloon Breaker

Thanks for the progress report, it looks really cool!

Questions:
- Any idea when it will be released?
- Will you do a round of beta testing/feedback? (I highly recommend this!)

Posted By

RKSoft
on 2016-10-12
10:42:08
 Re: BASIC Balloon Breaker

@Mad
It is in BASIC wink and there isn't double buffering. For the double buffering effect, i set the new pos and then clear the old one.

Update 12.10.2016 - News about Balloon Breaker
After some time, i continue my work on this game. So:

- charset reworked - no overlapping graphics!
- added new tiles (floors and spikes) - see screenshot
- the main game loop is only 13 rows! - i think it is fast for a BASIC game
- added multiplicator for bonus
- internal timer for time bonus
- currently, the game is fit to 20 rooms!
- all in one single file include title - except charset!
- win and death animation

New tiles:


Screenshot about no-overlapping-graphics:



Posted By

Mad
on 2016-08-21
16:45:29
 Re: BASIC Balloon Breaker

Great! I don't know how it is in Basic but sound adds a lot to a game.. Btw, do you use double buffering for the grafix? I don't see any flickering... Nice work!

Posted By

RKSoft
on 2016-08-21
13:30:10
 Re: BASIC Balloon Breaker

@Ati
Yes, but i think about compiling

@George
thx happy
i can put an insert coin so you must press 1 for 1 coin *joke wink

@rest
thx for your comments. this motivate me

@topic
So, i worked on BB these week and this is the result:

- our hero can jump, run, fall, collect balloons and killed by computer
- how longer you press fire our hero jumps
- changed the charset again to fix problems with my 16x16 tileset
- i removed the 2UP mode
- the first room/level is hardcoded to test the game (the levels will be load from disk as SEQ files)

I think about to merge the title code with the game code into one big BASIC program.




Added:
So, here is the first beta of my game. Control the hero with Joystick in port 1!

Info:
The programm quits when you collect all balloons or killed by the enemy!

Get Balloon Breaker beta 1



Posted By

Ati
on 2016-08-13
06:36:05
 Re: BASIC Balloon Breaker

Do you develop it in full basic? Nice colors are on title screen!

Posted By

George
on 2016-08-12
14:05:41
 Re: BASIC Balloon Breaker

very nice title screen. Like an arcade machine. The only thing l miss is the "Insert coin" linehappy

Posted By

MMS
on 2016-08-12
13:19:01
 Re: BASIC Balloon Breaker

Looks really fantastic with the clouds! Like.

Posted By

Csabo
on 2016-08-12
10:48:31
 Re: BASIC Balloon Breaker

That does look nice, and yeah, now the high score is readable.

Posted By

Mad
on 2016-08-12
10:04:45
 Re: BASIC Balloon Breaker

It looks even better with the clouds! Real nice title screen!

Posted By

RKSoft
on 2016-08-11
20:14:23
 Re: BASIC Balloon Breaker

Finally, the title screen should be finish at this moment. A little menu will come if you press SPACE or fire to choose 1 or 2 player, controls (keyboard or joystick) and loading custom levels (later).

Now, i added some clouds in corner and 2 balloons. the balloons moves vertical and change their brightness. It runs fast for BASIC happy

@KiCHY
done, it looks good and not too bright, it think



Posted By

KiCHY
on 2016-08-11
12:55:27
 Re: BASIC Balloon Breaker

Make the 5 hiscore entries darker.
How does it look like if you do similar to:
color1,4,0:print"HISCORE"
color1,4,1:print"HISCORE"
color1,4,2:print"HISCORE"
color1,4,3:print"HISCORE"
color1,4,4:print"HISCORE"
?

or, if 5th entry is too bright, you can stay at 4 hiscore entries only.

Posted By

RKSoft
on 2016-08-11
11:04:56
 Re: BASIC Balloon Breaker

Thx for your replies. I think i will use the light blue background. Maybe, i will add clouds to the background.

@Spectro
And yes, i will add 2 balloons to the title screen which moves up and down.

@carrion
Yes, the BASIC is powerful (but slow). Take a look at my Frutty Man conversion for Commodore VIC20, 64, 16/116, Plus4 and 128. ;)

@KiCHY
Which colors prefer you for the hiscores?

@topic
Now, i played a little bit with the ingame screen layout. I hope you like it.



Posted By

Spektro
on 2016-08-11
06:09:55
 Re: BASIC Balloon Breaker

You have a nice looking game there already RKSoft happy

I vote for the left title screen (blue background).

Would it be possible to add rising balloons on the title screen? Balloons would appear randomly at the bottom of the screen, rising up until they pop or disappear at the top of the screen.

Posted By

Epy
on 2016-08-11
03:28:40
 Re: BASIC Balloon Breaker

It looks great, I really like it. I vote for left title screen.

Posted By

carrion
on 2016-08-11
02:42:03
 Re: BASIC Balloon Breaker

I agree with Kichy on the colors.

And btw...
Are you really doing it with BASIC? Is C+4 Basic capable of these things? Wow. didn't know that.
Good luck with finishing the game. It's looking kool already.

Posted By

KiCHY
on 2016-08-11
01:43:45
 Re: BASIC Balloon Breaker

I prefer a non-black background here, but that color (or the high scores colors) needs a tweak.

Posted By

Mad
on 2016-08-10
16:18:18
 Re: BASIC Balloon Breaker

That looks awesome!!

Posted By

Csabo
on 2016-08-10
15:01:32
 Re: BASIC Balloon Breaker

That looks pretty good, I like both of them. The high score is more readable on the black background though.

Litwr, what cross-compiler do you mean?

Posted By

George
on 2016-08-10
12:43:48
 Re: BASIC Balloon Breaker

Very nice title screen!
I like the black screen (right)

Posted By

RKSoft
on 2016-08-10
12:02:26
 Re: BASIC Balloon Breaker

@KiCHY
I think i will compiled it with Austro or something. But, the 3. is an interesting point. First, i will make the game in BASIC and take a trip to compiler. ^^

@Litwr
The game is in development, so i only own the sourcecode but the game isn't playable because its in alpha wink

update 2016-08-10:
Now, the titlescreen is at a point that i can show you what i have done ^^



Which screen (diff. background color) is better, left or right?

Posted By

Litwr
on 2016-08-08
04:50:15
 Re: BASIC Balloon Breaker

Are there source code available? I am ready to try it with a cross-compiler. It produces the very fast codes but its codes are big in size.

Posted By

KiCHY
on 2016-08-08
02:30:28
 Re: BASIC Balloon Breaker

Cool screenshots! I like the cute graphics happy

Converting to assembler:
1. Use a basic compiler the speed it up. Pro: easiest solution, compilation takes a short time only. Contra: hard to predict the final speed, needs a lot of trials to finalize.
2. Rewrite it in assembler. Pro: produces the fastest result. Con: takes the longest time.
3. Use our machine code routines with basic POKEs + SYS command. The sprite drawing, collision detection, etc. can become machine code and your basic code utilizes them.

Posted By

MMS
on 2016-08-07
19:43:39
 Re: BASIC Balloon Breaker

Hi,

1) Looks fantastic. You can count on me on the high-score list when it is finsishedwink

2) did you try compilers? Some of them provides huge improvement in speed on BAISC programs.
Austrospeed is definitely worth a try
For Plus Comp I made the translation, but never tried out personally. I think (bsed on the documentation).,that Plus comp it better prepared to the special Plus/4 commands (GFX, Sounf), than Austrospeed.

Posted By

RKSoft
on 2016-08-07
19:32:57
 Re: BASIC Balloon Breaker

Maybe, anybody can convert it to assembler when the game is finish and/or can make music for? This would be great.

I think about a multiloader for loading levels and different charsets. What do you think? A single file game will have to limitation in levels.

@George
A title screen, i will make it definitly but with another charset.


Update (translated with Google, so sorry for the translation):
Preview # 3 and # 4 as a foretaste. The Preview # 4 already shows 2 different opponents, once a bird and 2 turtles. The bird will definitely come into play. Whether the turtles also come in or whether all are 2 types simultaneously, decides in the course of programming. Since the BASIC of Commodore is not the fastest, there are now 2 different ways:

  1. only one type of enemy is the screen and the type changes depending on the level
  2. all both are present, however, the opponents move then 3 times slower

 
Left: preview #3 ---- Right: preview #4

Posted By

George
on 2016-08-07
16:46:06
 Re: BASIC Balloon Breaker

really nice graphics! Idea for improvement : Make a nice title screen.

Posted By

Csabo
on 2016-08-07
14:31:03
 Re: BASIC Balloon Breaker

I agree with KiCHY, updates would be appreciated. BTW, as soon as I saw the pics (before reading your description), I immediately thought of "Bombjack" happy

Posted By

Luca
on 2016-08-07
12:50:44
 Re: BASIC Balloon Breaker

Ooh lovely charsprites! :o

Posted By

KiCHY
on 2016-08-07
12:39:29
 Re: BASIC Balloon Breaker

Nice! Yeah, we want regular updates happy I like reading about how a game evolves.

Posted By

RKSoft
on 2016-08-07
12:14:36
 BASIC Balloon Breaker

I working on a new game called BASIC Balloon Breaker. It is a simple Bomb Jack clone that you must break all balloons on screen. An enemey will be following your char. The 2 screenshots shows the early preview of that game. If you want i can post news about that game here at this topic.

Do you have some improvement? Please let me know!

Preview 1


Preview 2



Copyright © Plus/4 World Team, 2001-2024. Support Plus/4 World on Patreon