Search found 111 matches

by ocean77
Tue Jul 11, 2023 4:18 pm
Forum: Newbie questions
Topic: Confused About Tables
Replies: 11
Views: 3291

Re: Confused About Tables

I think I understand. I can certainly see the outline of how powerful arrays might be and can think of several uses although I'm far from proficient enough to put it into practice.
Forgive my ignorance, guys. Your help is much appreciated. :)
by ocean77
Mon Jul 10, 2023 1:22 am
Forum: Newbie questions
Topic: Confused About Tables
Replies: 11
Views: 3291

Re: Confused About Tables

Check out this simple Hello World script: @DISPLAY{WIDTH = 960, HEIGHT = 540, MODE = "WINDOWED", TITLE = "Title", COLOR = #BLACK} SetFont(#SANS, 45) SetFontStyle(#ANTIALIAS) SetFontColor(#WHITE) _data = {30, 60, "One", 100, 250, "Two", 270, 400, "Three&qu...
by ocean77
Fri Jul 07, 2023 10:13 pm
Forum: Newbie questions
Topic: Confused About Tables
Replies: 11
Views: 3291

Re: Confused About Tables

No more constants but the readibility is improved and you can process all the colors iterating the palette table, for example if you need to darken all the colors or you can also load/save the entire table from/to files :) Oh... So, the problem was the constant part? I was just somehow under the im...
by ocean77
Sun Jun 25, 2023 9:30 pm
Forum: Newbie questions
Topic: Confused About Tables
Replies: 11
Views: 3291

Re: Confused About Tables

I've probably misunderstood the concept... again. Oh, well...
:roll:
by ocean77
Sun Jun 25, 2023 2:15 am
Forum: Newbie questions
Topic: Confused About Tables
Replies: 11
Views: 3291

Confused About Tables

In an exercise on how to work with arrays/ tables I thought I'd be able to store these constants: Const #TEXT_COL = $000020 Const #DECO_COL = $F08000 Const #PAPER_COL = $F0F0F0 Const #OPTS_LOCOL = $0050A0 Const #OPTS_HICOL = $D02020 More conveniently in a table like this: Dim Const #PALETTE = {$0000...
by ocean77
Sun Jun 11, 2023 1:04 am
Forum: Tutorials
Topic: Block- Man Script
Replies: 16
Views: 8404

Re: Block- Man Script

That doesn't work as intended. If I reorganize them as follows: if Collision(#BRUSH, 1, BM_XPos, BM_YPos, 2, BL_Xpos, BL_Ypos ) = True and BM_Xpos =< BL_Xpos BM_XPos, BM_YPos = BL_XPos - 16, BM_YPos ; Handle collision with left side of obstacle DebugPrint("Hit The Left Side") elseif Collis...
by ocean77
Fri Jun 09, 2023 12:23 am
Forum: Tutorials
Topic: Block- Man Script
Replies: 16
Views: 8404

Re: Block- Man Script

As far as I can tell each of the conditions do what they are supposed to, I just can't get them all to be considered. Just two at a time. I tested this by commenting out first the top two and then the bottom two.
by ocean77
Thu Jun 08, 2023 7:53 pm
Forum: Tutorials
Topic: Block- Man Script
Replies: 16
Views: 8404

Re: Block- Man Script

So, I am trying to add some elements to this script. Namely adding a obstacle in the form of a 32x32 pixel square. I am using the following code: if Collision(#BRUSH, 1, BM_XPos, BM_YPos, 2, BL_Xpos, BL_Ypos ) = True and BM_Xpos =< BL_Xpos BM_XPos, BM_YPos = BL_XPos - 16, BM_YPos ; Handle collision ...
by ocean77
Wed Dec 14, 2022 3:34 pm
Forum: Tutorials
Topic: Block- Man Script
Replies: 16
Views: 8404

Re: Block- Man Script

Flinx wrote: Wed Dec 14, 2022 12:36 pm To the second issue:
You have to use the speed as a vector and split it into x- and y-parts. This is quite simple here, because the box moves only in an angle of 45°, so the horizontal and vertical parts are equal. I made a quick hack with your code:
Brilliant! Thanks! :)
by ocean77
Sun Dec 11, 2022 1:11 pm
Forum: Tutorials
Topic: Block- Man Script
Replies: 16
Views: 8404

Re: Block- Man Script

No worries.
Think I got it... So even though it defaults to 'True', saying: Flip(True) is better for readability(?)