News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu
avatar_jjaranda13

8BP

Started by jjaranda13, 10:07, 27 September 16

Previous topic - Next topic

TheElectricMonk and 1 Guest are viewing this topic.

jjaranda13


TFM

Great work done!  :)
TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

jjaranda13

#2
hi 8bp friends


new game "nibiru" available at https://github.com/jjaranda13/8BP made in BASIC, using 8BP v26b


info at http://8bitsdepoder.blogspot.com.es/

video at https://github.com/jjaranda13/8BP

ervin

That's very, very impressive.
The scrolling in nibiru is excellent, considering that the whole screen(!) is being used.


VincentGR

This is just amazing!

Morri

Well done @jjaranda13 , looking good!
I am starting to get the game making bug again and have a few ideas and would love to use 8bp to do it.

Request: The sprite flip ability you have in your to do list would be very useful  :D
Keeping it Kiwi since 1977

Javy Fernandez

The 8BP library is amazing!

Dizrythmia

I was playing Parodius on the PC Engine yesterday, & this is easily comparable!

jjaranda13

#8
new available game: mini-pong ( a simple version of classic "pong")
it is quite simple, and suitable as introduction for begginers in 8BP.  The BASIC program is very short and understandable
i have the intention ti create some "short games" for help others to make their own games

AMSDOS

This could be quite handy for anyone coding with CPC BASIC 3. Have you tried anything out between your library and CPC BASIC 3? It should produce some interesting results.  :D
* Using the old Amstrad Languages :D   * with the Firmware :P
* I also like to problem solve code in BASIC :)   * And type-in Type-Ins! :D

Home Computing Weekly Programs
Popular Computing Weekly Programs
Your Computer Programs
Updated Other Program Links on Profile Page (Update April 16/15 phew!)
Programs for Turbo Pascal 3

cpcuser


Ccz80 ++ is more and faster with the sprite and the other bases.


Greeting

AMSDOS

Quote from: cpcuser on 23:01, 23 December 16
Ccz80 ++ is more and faster with the sprite and the other bases.


Greeting

Which is why I think CPC BASIC 3 combined with 8BP will produce an interesting result
* Using the old Amstrad Languages :D   * with the Firmware :P
* I also like to problem solve code in BASIC :)   * And type-in Type-Ins! :D

Home Computing Weekly Programs
Popular Computing Weekly Programs
Your Computer Programs
Updated Other Program Links on Profile Page (Update April 16/15 phew!)
Programs for Turbo Pascal 3

jjaranda13

It could be interesting to take a basic program which uses 8BP and compile it using BASIC3. I will test it

jjaranda13

#13
.

jjaranda13

#14
new available game: mini-invaders ( a simple version of classic "space invaders").it is quite simple, and suitable as introduction for begginers in 8BP.  The BASIC program is very short and understandable for beginners


https://www.youtube.com/watch?v=6OcB_hjuYiU

sigh

#15
Very impressive examples. Especially "Nibiru".

I reckon that with the stars in the background, could it work by using palette swaps to make it smoother?
andycadley suggested this idea for the scrolling of the white lines on my football game.

It's bascially having 2 pixels - 1 white and the other black next to each other, then swapping the colours around while you scroll it. It gives a very smooth feeling of scrolling.

jjaranda13

#16
Quote from: sigh on 16:47, 02 January 17
Very impressive examples. Especially "Nibiru".

I reckon that with the stars in the background, could it work by using palette swaps to make it smoother?
andycadley suggested this idea for the scrolling of the white lines on my football game.

It's bascially having 2 pixels - 1 white and the other black next to each other, then swapping the colours around while you scroll it. It gives a very smooth feeling of scrolling.


Hi Sigh


Thanks,  It is possible to create animation effects using inks. In fact 8BP provides the command |RINK to create "rotation ink" animation effects, such as the road effect or the scroll of bricks effect which is shown in  this video: 
https://youtu.be/LYkxSuNfYeI   (check at second 1:05)

The same "trick" can be used for scroll of stars. However, in "Nibiru" and "mini-invaders", the stars effect is created using the command |STARS, which can provide up to 40 stars in movement at different planes of speed. For example in "Anunnaki" the initial screen uses |STARS command to create a depth effect (video at
https://www.youtube.com/watch?v=8x2g_t4-lCU)

jjaranda13

i have tested CPC BASIC Compiler using 8BP
concretely, i have compiled mini-invaders
my conclusions:
- around 50% faster
- difficult to debug (it is machine code)
- no 100% compatible with locomotive basic
- useful for programmers which want more speed or hide their code



https://www.youtube.com/watch?v=0ifIjdjgkEc




SRS

Does it compile with FaBaCom, too ?

People could develop and test/debug with normal 8BP/Basic and deliver the final work compiled.

jjaranda13

#19
Quote from: SRS on 22:01, 03 January 17
Does it compile with FaBaCom, too ?

People could develop and test/debug with normal 8BP/Basic and deliver the final work compiled.


Yes, the problem with fabacom is the RAM usage. A BASIC game that consumes 10KB, after compiling with fabacom takes 20KB. In fact, CPC Basic compiler takes also certain overload. I have compiler nibiru (17KB) and the compiled version takes 22KB (5KB extra).


I believe that although fabacom and CPC BASIC compiler are good friends....they have advantages and disadvantages (extra RAM usage, not 100% compatibility...) and for the moment i prefer locomotive BASIC, because the speed with 8BP is enough for most games.


When there is needed an extra speed...we can :
- eliminate all REM instructions from logic <-- always it is a good practice !
- replace RSX commands by CALL XXXX  <--- less understandable code but faster!


These two recommendations provide an extra speed, and only if you need more speed , the compilation is justified, because takes more RAM and have compatibility problems. For example, in mini-invaders, the sound command doesnt work properly in the compiled version





AMSDOS

Quote from: jjaranda13 on 14:44, 03 January 17
i have tested CPC BASIC Compiler using 8BP
concretely, i have compiled mini-invaders
my conclusions:
- around 50% faster
- difficult to debug (it is machine code)
- no 100% compatible with locomotive basic
- useful for programmers which want more speed or hide their code


Yeah unfortunately after suggesting CPC BASIC 3, I recalled there being some differences with Locomotive BASIC and CPC BASIC 3. Subtracting of numbers and making sure they don't become negative is one of the main differences. CPC BASIC 3 the default type is Integer or Byte (I cannot remember which) & decimal numbers operate through a series of RSXs. INT becomes invalid and MOD is used instead. I think the trick to subtracting was to add instead, so depending on what subtracting by, you can add &FFFF decrementing those amounts.
* Using the old Amstrad Languages :D   * with the Firmware :P
* I also like to problem solve code in BASIC :)   * And type-in Type-Ins! :D

Home Computing Weekly Programs
Popular Computing Weekly Programs
Your Computer Programs
Updated Other Program Links on Profile Page (Update April 16/15 phew!)
Programs for Turbo Pascal 3

AMSDOS

Quote from: SRS on 22:01, 03 January 17
Does it compile with FaBaCom, too ?

People could develop and test/debug with normal 8BP/Basic and deliver the final work compiled.

Sadly yes, once you start using the CPC Compilers space becomes a concern, which was why I raised it's use with CPC BASIC 3. I'm unsure if it's still being developed to make it more compatible with Locomotive BASIC, but that may have some setbacks in terms of the Assembly code generated. Some people have said here that the code produced from the CPC BASIC 3 is quite difficult to optimize.
* Using the old Amstrad Languages :D   * with the Firmware :P
* I also like to problem solve code in BASIC :)   * And type-in Type-Ins! :D

Home Computing Weekly Programs
Popular Computing Weekly Programs
Your Computer Programs
Updated Other Program Links on Profile Page (Update April 16/15 phew!)
Programs for Turbo Pascal 3

AMSDOS

Quote from: jjaranda13 on 22:28, 03 January 17

Yes, the problem with fabacom is the RAM usage. A BASIC game that consumes 10KB, after compiling with fabacom takes 20KB. In fact, CPC Basic compiler takes also certain overload. I have compiler nibiru (17KB) and the compiled version takes 22KB (5KB extra).


Unsure if you're referring to the generated .ASM file or the final BINary program. A compiled program will always be larger than its Interpreted counterpart as a fully compiled program must be present for execution, the Interpreted counterpart is tokenized which can condense the size of the program, but what's interesting in your case is RSXs aren't tokenized.

QuoteWhen there is needed an extra speed...we can :
- eliminate all REM instructions from logic <-- always is a good practice !
- change RSX commands by CALL XXXX  <--- less understandable code but faster!


Unlike RSXs, using CALL will be tokenized and from BASIC what you can do is setup some variables and assign some addresses to them for those routines, the RSX could be removed to create some more space and it may even improve the performance of your BASIC programs. So if you assign meaningful names like stars%=&xxxx and so on and just use CALL stars%, it should be clear enough to everyone.


QuoteThese two recommendations provide an extra speed, and only if you need more speed , the compilation is justified, because takes more RAM and have compatibility problems. For example, in mini-invaders, the sound command doesnt work properly in the compiled version


Yes unfortunately the SOUND command in Locomotive BASIC (both versions) is actually in a different order from anywhere else. I don't know the reason why, so if you're using it in Assembly or another Compiled Language (CPC BASIC 3/Fabacom possibly or Hisoft Pascal), it looks like this:



Channel Status Byte,
Volume Envelope,
Tone Envelope,
Tone Period (1),
Tone Period (2),
Noise Period,
Volume,
Duration of Sound (1),
Duration of Sound (2)



So that would throw anyone off if you're used to the BASIC SOUND command, which looks like this:



channel status,
tone period,
duration,
volume,
volume envelope,
tone envelope,
noise period
* Using the old Amstrad Languages :D   * with the Firmware :P
* I also like to problem solve code in BASIC :)   * And type-in Type-Ins! :D

Home Computing Weekly Programs
Popular Computing Weekly Programs
Your Computer Programs
Updated Other Program Links on Profile Page (Update April 16/15 phew!)
Programs for Turbo Pascal 3

andycadley

At a guess, BASIC is ordering them in a logical order with optional parts following in a mostly descending order of priority. The firmware, however, is probably leaking an internal ordering which is based around the order the CPU needs information in order to execute the command. Third party languages, like Pascal, are then exposing that ordering directly to ease the process of mapping parameters onto the firmware call.

sigh

I am so impressed by this program.

The ink rotation in your brick example - I'm really interested to see what that would look like if it was compiled, as the differences in speed in your last demonstration was insane! :D . That 50 % increase made an incredible visual difference.

Powered by SMFPacks Menu Editor Mod