123
-=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- (c) WidthPadding Industries 1987 0|641|0 -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=-
Socoder -> Blitz -> BlitzAmiga - Quite a Learning Curve

Page : 1 Prev 2
Next
Fri, 22 Apr 2022, 05:32
Jayenkai


Note 1 : Took me pissing ages to figure out how to do bit-shifting.

Note 2 : It's on page 13 of the manual, Jay. If you actually read things front to back instead of skipping to the juicy bits, you might've learned that on day one.

-=-=-
''Load, Next List!''
Fri, 22 Apr 2022, 05:44
cyangames
Nice stuff Jay

Wishing I was back home right now to continue some 8-bit wonderfulness!

-=-=-
Web / Game Dev, occasionally finishes off coding games also!
Fri, 22 Apr 2022, 06:25
Pakz
I discovered something called Binary Calculus and Boolean Algebra yesterday. Maybe that will help me with that bit shifting maddness
Fri, 22 Apr 2022, 06:26
Jayenkai
Bitshifting's easy, just multiplying and dividing, really, except doing it by 1/2/4/8/16/32/64/...
The problem is trying to figure out what cryptic command Mark's created, to let me do it

-=-=-
''Load, Next List!''
Fri, 22 Apr 2022, 08:18
Jayenkai
Today's gone rather well. Got rid of that nasty bit of slowdown (using the bitshifting instead of dividing) and also added a giant flaming ball that occasionally spouts from the lava below.
Giant rods of flames weren't entirely suitable, given the limited number of sprites.
.. And in fact, two or more giant flame balls is also apparently not all that suitable, either...
So.. One..
It'll do..
Meh...

-=-=-
''Load, Next List!''
Fri, 22 Apr 2022, 08:20
cyangames
Yay for optimisation!
Sun, 01 May 2022, 05:26
Jayenkai
Top Tip : Don't use "JumpMed 0" to jump to the beginning of a MED music file.
Instead, use JumpMed 1, because the Med's patterns are 1 based, not 0 based.

This is one of those "Works fine in an emulator, crashes on the real thing" bugs.

-=-=-
''Load, Next List!''
Sun, 01 May 2022, 16:38
Dabz
Note one...

<<

>>

Here is a tale from BlitzCoder years of old, a coder, Vic-E-Babes, did a tutorial, and bitshifting was the basis of said tutorial... And he go roasted for it... For those in the know though, his technics were a pre-emptitive of how you should code for mobile, especially when mobile gaming was establishing itself... I never let go of his tutorials and in most cases, anything I do code, whatever the language, I still use to this day!

Bit shifting is a massive part of my coding style, I << to the left and SHR to the right... Sometimes, I shift'em all!

I wont lie, Vic's tutorials unlocked my mind in terms of logic when it come to platform games, and other genres, and I've had so much fun over the years with it... So much so, I owe the man a beer.

Dabz

-=-=-
Intel Core i5 6400 2.7GHz, NVIDIA GeForce GTX 1070 (8GB), 8Gig DDR4 RAM, 256GB SSD, 1TB HDD, Windows 10 64bit
Sun, 01 May 2022, 16:52
Jayenkai
Yeah, like I said, the biggest issue was trying to figure out what exactly the bitshift command actually was!!
ASL/ASR/LSL/LSR
Not the most immediate of commands, and no amount of trawling the Index of the manual helped me!!!
That's more or less how I've been learning Amiga Blitz. Open the manual, flick to the back, search for something vaguely relevant to what I want, then head to that page!
Here, it just did NOT leap out at me!!

Over on the Ami and other slower systems, being able to divide with bitshifts is absolutely paramount. The slowdown you can get from just a single divide in your main loop is staggering!
.. I mean, it's not really. We learned this shit years ago.. But having to go a few days without figuring out the bitshifts was quite the experience

-=-=-
''Load, Next List!''
Mon, 02 May 2022, 05:30
Pakz
When I had a Amiga I ordered a 68000 assembler book. I memorized al the mnemonics.

Asl - arithmetic shift left
Asr - arithmetic shift right
Lsl - logical shift left
Lsr - logical shift right

I never figured out how to code in assembler. I would not know what most commands do anyway. I only did a bit of hacking of sourcecode.
Mon, 02 May 2022, 05:41
Jayenkai
Maybe some day I'll learn Assembly..

.. Today is not that day!

-=-=-
''Load, Next List!''
Wed, 22 Jun 2022, 19:37
Jayenkai
Oh, man, RetroRaider-Amiga definitely wasn't a good idea..

I'm really not sure how Blitz-Amiga is wanting me to set up the bitmaps for backgrounds.
I essentially have two bitmaps for the background.
(ShowF Bitmap,x,y and ShowB Bitmap,x,y)

A blank Foreground bitmap onto which I draw walls and gems and things, and a pre-rendered Background bitmap which contains the trees, or the caverns, or the bricks, or other RetroRaider'y scenes.
The task is pretty simple, and "should" just be a case of layering those atop each other, but no matter what method I try to do this in, I end up getting stuck with output like this..



or this..



or this...



The issue is down to Blitz-Amiga using two different sets of colours for each "layer", even though they use the exact same palette.
And I'm not really sure what sets of colours they're using!!
I thought I had it, there, for a while, but. Nope. It was even worse!!

At one point I DID manage to get this...



However, that's only one single layer.
If I tried to make the game using that methodology, I'd have to get the drawing and clearing of objects to a bitmap working. That is, draw a wall on the bitmap, then in the instant you walk to the next "room", instantly redraw the original bitmap and draw a fresh set of objects in the room.
I can't get Blitz to work that quickly!!

No, I'm struggling way too much with this, and I don't think it's getting anywhere.
I certainly couldn't solve this issue in the next few days, and then code the entire rest of the game to work alongside it, before the end of the month.

Bah, humbug.
Pulling out whatever little amount of hair I have left, hasn't been helping.

Game Fale.

I think I should probably aim for something simpler, in future!

-=-=-
''Load, Next List!''
Wed, 22 Jun 2022, 21:04
Pakz
I would not know where to start looking for examples for blitz. Amiga archives?

I'm glad there's many docs and examples for Javascript. But of course. Ipad does not have webaudio support. No fun with procedural sounds.
Thu, 23 Jun 2022, 01:04
AndyH
Never used blitz on amiga so not going to be much help, but are these commands manipulating bit planes ?

-=-=-
Andy H
8-bit games at www.hewco.uk
Cartoons at awful.ovine.net
Ovine at ovine.net
Thu, 23 Jun 2022, 03:01
Jayenkai
Yes, it's something to do with the planes, and my head just isn't quite managing to do it right!!
I'll come back to this game at a later date, once I can fathom it all!!

-=-=-
''Load, Next List!''
Thu, 23 Jun 2022, 04:11
AndyH
Ah OK. Please excuse me if I'm telling you what you already know

It's been 25 years so my memory is fuzzy, but this how it works:

You can choose to have between 1 and I think 5 bit planes fir your display.

Each bitplane is just a hires type image, say 320x200 where bits in each byte mean a pixel on or off. So 8 pixels for the first byte, another 8 pixels for the second byte.

If you only have one bit plane for your display that will enable you to select a colour from the palette entries 0 and 1.

If you set a second bitplane, the display will use the combination of both bitplanes to make it possible to reference four colours from your palette entries 0, 1, 2 and 3.

The way it does this is it takes the first byte from both planes and uses the bits from each plane to make 8 two bit numbers. Ie. Bit 0 from plane 0 and bit 0 from plane 1, giving you possible options such as:

0,0 = palette colour 0
0,1 = palette colour 1
1,0 = palette colour 2
1,1 = palette colour 3

And repeat for bits 0 through 7 of each byte on the two planes.

Add more bitplanes and the number of combinations increases to 5 planes allowing values from 0 to 31, ie 32 colours.

Now if you are writing to plane 0 for background and plane 1 for trees for example, you can work out what palette number will be associated to these two combinations if you only have a bg pixel or a tree pixel in the same location:

Tree plane, bg plane, palette
0, 1 = palette colour 1
1, 0, = palette colour 2

But if you have a bg and a tree pixel at the same location, you get another colour:

1, 1, = palette colour 3

Just binary right.

One trick you can do is set palette colours to get the end result:

0,0 = black (no pixels)
0,1 = brown (bg)
1,0 = Green (tree)
1,1 = Green (tree to take precedence)

This limits you to three colours only but you can draw independently on each plane without caring what is on the others.

You can scale this up to more planes, with reduced colours but it takes planning. I guess this is where you are?

The alternative is you must write the correct bytes or bits to all planes to ensure you get the palette colour entry you want.

So if your tree uses brown palette 1 for the trunk and green palette 2 for the leaves, you must ensure 0,1 or 1,0 is written to the corresponding planes. A 1,1 is a different pixel colour so you don't want to let that happen unless you are meaning to set the pixel that colour.


Hope that helps if you had any gaps in what you already knew.

-=-=-
Andy H
8-bit games at www.hewco.uk
Cartoons at awful.ovine.net
Ovine at ovine.net
Thu, 23 Jun 2022, 04:24
Jayenkai
The most frustrating part of doing this is constantly having to piss about with the pixels and the palette, to try all the alternatives in trying to get it to work.
I understand how it "should" work, but .. bloody hell!!

I could really do with an Amiga tool to do this with. I need to hunt the archives and see what might work with my setup.
Currently I'm switching over to Windows, using PaintShop Pro 7, editing the palette in a text editor, loading in the new palette, save, copy back to Amiga, load into image editor there and re-save to reduce the palette..

.. It's a right sodding rigmarole, and it's making it SO much harder to test these things out.

-=-=-
''Load, Next List!''
Thu, 23 Jun 2022, 05:14
AndyH
I remember it being hard work. We're spoiled today 😃

At least you're not having to work on the Amstrad bitmap. Mode 2 is great, but what the hell were they smoking when designing mode 0 and 1 lol.

-=-=-
Andy H
8-bit games at www.hewco.uk
Cartoons at awful.ovine.net
Ovine at ovine.net
Thu, 23 Jun 2022, 05:18
AndyH
I used to use a tool on the Amiga that was great for working on the bitplanes, but I can't remember what it was called. It was freeware and a bit rough but gave you control of everything.

Also used dpaint and an indexed palette obviously, so it was easy to manage. Harder to draw, but easy to manage.

-=-=-
Andy H
8-bit games at www.hewco.uk
Cartoons at awful.ovine.net
Ovine at ovine.net
Thu, 23 Jun 2022, 05:22
Jayenkai
Yeah, I definitely need to trawl through what tools are available. DPaint is all I have currently installed on the Amiga, and .. as great as DPaint is.. We've come a long way, since!

PaintShop Pro can do palettes, and with the .iff support it's "almost" perfect.
But you can't shuffle the palette without having to export it to a text file, manually edit it, then load it back in.
Less than ideal, really.

But, either way, expanding my Amiga toolbox would probably save a lot of hassle.

-=-=-
''Load, Next List!''
Sat, 16 Jul 2022, 03:25
Jayenkai
Hmm...
It's been a while since I last switched the Amiga on.
I think the disappointing RetroRaider event might've put me off it.
I'm now struggling to think of anything I CAN do in BlitzAmiga, and .. It's just not happening.
I might have to abandon my whole Monthly Amiga Game thing.
:/

-=-=-
''Load, Next List!''
Sat, 16 Jul 2022, 23:08
Pakz
Yesterday I was watching a Amiga stream on twitch. There was a add for a itch amiga blitz basic game jam.

The stream itself was rather fun. I watched some Moonstone. Lots of pixel blood
Sun, 17 Jul 2022, 01:34
AndyH
Have you thought about going assembler or Turbo Rascal for more power, or is it something else that has put you off?

-=-=-
Andy H
8-bit games at www.hewco.uk
Cartoons at awful.ovine.net
Ovine at ovine.net
Sun, 17 Jul 2022, 01:46
Jayenkai
I think it's more a case of being disheartened by the inability to do a relatively simple thing!!
I'll probably retry it later, but .. for now, my mind's not in the right place.

As for the AmiBlitzJam. Yeah, I did say I would attempt it.
Maybe I should.
Lazy Jay! Tut tut..

-=-=-
''Load, Next List!''
Page : 1 Prev 2
Next