-=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- (c) WidthPadding Industries 1987 0|310|0 -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=-




spinal

Scrolling tiles

29th October 2024

I meant codewise like this...
[code]
Function newDialog$()

oldDialog$ = current_dialog$

isSafe = False

While isSafe = False

dialog_line = Rand(2) ; waight the negative a little


If dialog_line <=1 Then ; Negative
wh*snip*


spinal

File/Folder browsing in Blitz3D...

22nd May 2024

I used this for a basis for something I'm working on, so before I start adding all sorts of crap to it, I'll post the minor changes I made.
[code]
Global HEIGHT = 768
Global WIDTH = 1024
Graphics(WIDTH, HEIGHT, 0, 2)
AppTitle ''Designer&qu*snip*


spinal

Scrolling tiles

4th May 2024

I dont suppose anyone can see why this is missing the last word in the string?
[code]
Global word_count = 0
Global dialog_word = 0
Global string_pos
Global dialog_tx = 0
Global dialog_ty = 0
Global dialog_stx = 0
Global dialog_sty = 0
Function dia*snip*


spinal

Scrolling tiles

8th March 2024

Because my method involves upscaling by hand, using writepixelfast turns out to be slower (more loops), so my method is good enough for my use case.
[code]
Function grabBackground(x, y)
pauseSprite = CreateImage (160*pixelScale, 128*pixelScale)
MaskI*snip*


spinal

Scrolling tiles

2nd March 2024

Came back to it later.... I was thinking about it all wrong.
[code]
Function renderLevel()
Local scrollX = (player\\x + (TILESIZE/2)) - ((SCREENWIDTH/SCREENSCALE)/2)
Local scrollY = (player\\y + (TILESIZE/2)) - ((SCREENHEIGHT/SCREENSCALE)/2)
Local XT*snip*


spinal

Scrolling tiles

29th February 2024

It's been a little while since I tried this and I seem to have it all backwards. I can't get my brain to go in the right direction.
2024/09/Game_01_fail (.zip)
I think its mostly the render function that's wrong, but it might be more. I'm*snip*


spinal

ball physics?

19th December 2023

Been trying to get chatgpt to convert this (Linkage) to blitz3d...
[code]
Graphics3D 800, 600, 32, 2
Const W = GraphicsWidth()
Const H = GraphicsHeight()
Global numBalls = 30
Global gravX = 0
Global gravY = -0.1
Type Ball
Field x
Field y
*snip*


spinal

N64 Controller Project...

8th September 2023

Modded the code a little for potential speed ups, only by removing function calls to abs().
[code]
#define xPin A2 // select the input pin for the potentiometer
#define yPin A1 // select the input pin for the potentiometer
#define XA 6
#define*snip*


spinal

N64 Controller Project...

8th September 2023

OK, I dug out the arduino code, but I didn't comment it very well so I have gone and forgot that the hell the offset value does...
I'm tempted to think its the difference between the full stick value and the 'correct' full stick value...
*snip*


spinal

SpinalWatch

27th August 2023

OK, got that working as far as I can tell. Now to re-arduino the code.
(Image.png)
[code]
Graphics 320,240,0,2
Global gScale = 1
Global WIDTH = 144
Global font02 = LoadAnimImage(''font.png'', 11, 15, 0, 96)
Dim fWidth(96)
For t = 0 To 95 *snip*


spinal

SpinalWatch

26th August 2023

OK, got the blitz version up to the same problem. I switched to blitz because uploading code to the arduino, then sending myself an sms message is a slow process, wheras hitting F5 is nice and fast.
What I WANT to happen, is that if a single word is too w*snip*


spinal

SpinalWatch

26th August 2023

Here is an attempt in blitz, it nearly works...
font.png
(Image.png)
[code]
Graphics 320,240,0,2
Global WIDTH = 144
Global font02 = LoadAnimImage(''font.png'', 11, 15, 0, 96)
Dim fWidth(96)
For t = 0 To 95
Read fWidth(t)
Next
Rect 0,0*snip*


spinal

SpinalWatch

26th August 2023

This is just getting longer and longer, and still not right.
[code]
void print(int x, int y, const char* text) {
int x1 = x;
int fHeight = 0;
int nextSpace = 0;
uint8_t numChars = strlen(text);
const char* wordStart = text; // Pointer to *snip*


spinal

SpinalWatch

19th August 2023

It's weird, I would manually force the buffer and the copy to be different, but then it would only decide that where I'd put the text was different and the background wouldn't be.
I was calling clearSceeenBuffer() in my setup, so I'd expec*snip*


spinal

SpinalWatch

18th August 2023

OK, Started from scratch, First I got the BLE code working and connecting, no problems yet.
Then I added all of the power saving code, one item at a time and still working (power at 1.9mA).
Left it running for a while, no crashing, sent multiple notifica*snip*


spinal

SpinalWatch

15th August 2023

[code]
inline void drawPixel(int x, int y, uint8_t color){
if(x<0 || y<0 || x>=WIDTH || y>=HEIGHT) return;
uint16_t x8 = x>>3;
if(color > 1){
color = GreyPattern[(x&1)+2*(y&1)];
}
if (color){
sBuff[x8 *snip*


spinal

SpinalWatch

12th August 2023

OK, after leaving it running a while, removing an y code that 'does anything' with the received messages, so my function now looks like this...
[code]
void getMessages(){
bleSerial.poll();
while (bleSerial.availableLines() > 0) {
ch*snip*


spinal

SpinalWatch

12th August 2023

Didn't help, this time it crashed after maybe 12 hours?
Added a RAM counter...
[code]
// quick function to find free memory, it's slow though
long unsigned int freeMem = 0;
long unsigned int availableMemory() {
int size = 128*1024; // We ha*snip*


spinal

SpinalWatch

26th July 2023

Turns out it needs a full stop at the end...
[code]
{t:''info'', msg:'Hello World'}.
[/code]
There doesn't seem to be much I'd need to tell the app, but it looks like dismissing notifications or calls will be possible.


spinal

SpinalWatch

26th July 2023

AHA!!
[code]
GadgetBridge said: GB({t:''notify'',id:1690381942,src:''Messages'',title:''Me'',subject:'''',body:''This is a test.'',sender:''''})
GadgetBridge said: GB({t:''notify-'',id:1690381942*snip*


spinal

SpinalWatch

26th July 2023

OK, first attempt to get somewhere...
[code]
BLEBoolCharacteristic myBool(''2A19'', BLERead | BLEWrite | BLENotify);
BLEBooleanCharacteristic myBoolean(''2A19'', BLERead | BLEWrite | BLENotify);
BLECharCharacteristic myChar(''2A19&q*snip*


spinal

Font list

24th July 2023

OK, I tried a little something to verify the font before adding to the list. Simply attempt to load it, apparently if the font system fails to load for whatever reason or returns 0.
However, some fonts seem to not load, but don't return 0, it does say*snip*


spinal

Font list

24th July 2023

I'm doing a font maker to go with my watch project, but having a couple of issues. I'm trying to get a list of all fonts installed on my computer. I do this by reading the registry and creating a text file with a list of fonts. Then I go through th*snip*


spinal

SpinalWatch

16th July 2023

[code]
_____ ____ ____ _ __ __ ______ __ __ __
/ ___/| \\| \\ | | | |__| || | / ]| | |
( \\_ | o ) || | | | | || | / / | | |
\\__ || _/| | || |___ | | | ||_| |_|/ / | |
/ \\ ||*snip*


spinal

SpinalWatch

5th July 2023

The problem I have, is that it's something I've done hundreds of times, but just can't see whats wrong.
[edit] Oh, hang on.....
[code] if(t == menuItem) indent=16; [/code]
Yup, I'm an idiot.

More - Older Posts