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




spinal

gui confusion

26th January 2021

That makes a bit more sense. Now to kick myself up the arse and make it do something!
[code]
SuperStrict
Import MaxGui.Drivers
'main window
Local MyWindow:TGadget
Local wwidth:Int=800
Local wheight:Int=600
Local wx:Int=(ClientWidth(Desktop())-w*snip*


spinal

gui confusion

26th January 2021

I was looking at blitzmax for creating a nice windows application with buttons etc.
I have strung a couple of examples together to see if I can figure out whats going on, and well, i can't.
[code]
Import MaxGui.Drivers
Local window:TGadget
Local c*snip*


spinal

javascript array problem [solved]

22nd July 2020

hmmm, I seem to be generating valid tiles and map, including flipped tiles (probably, not fully tested with my renderer) but I seem to be messing up on my flip array :-(
[code]
<html>
<title>Map reConstructor</title>
<style type=*snip*


spinal

javascript array problem [solved]

17th July 2020

dammit, it's a pointer.
[code]
function checkTile(thisArray){
console.log(''tileArray.length'', tileArray.length);
if(tileArray.length==0){
tileArray[0] = new Array();
for (i = 0; i < thisArray.length; i++) {
tileArray[*snip*


spinal

javascript array problem [solved]

17th July 2020

In fact, changing the checking routine to only the following
[code]
function checkTile(thisArray){
console.log(''tileArray.length'', tileArray.length);
if(tileArray.length==0){
tileArray[0] = new Array();
tileArray[0] = thisArray; *snip*


spinal

javascript array problem [solved]

17th July 2020

Having looked around, I could not find a version of maprecon (you know it, its a tile map creator) with some extra features I want, so I made a start at my own version in javascript.
However, I seem to be having trouble comparing two arrays. The code firs*snip*


spinal

finding font widths?

2nd November 2019

Here's a small bit of code, it takes an image of a character set, pops it into a new single character width image (not really needed) and attempts to find out how wide each character is. Thing is though, it doesn't work.
Weirdly inside the x loop,*snip*


spinal

Sine of Ints

22nd October 2019

Closer, player seems to fall through the ground more, but does fly a bit...
[code]
Graphics 440,352,0,2
Cls
Global numHills = 200
Global hillMin = 40
Global hillMax = 176-40
Dim hillTops(numHills)
Global offsetX = 0;
Global hillWidth = 48*4;
Glob*snip*


spinal

Sine of Ints

21st October 2019

Still doesn't 'jump' off the hills, just falls :-( This is one of those things where I think I know how to do it, but I just don't know how to do it :-(
o Increase player speed by gravity
o Apply gravity to player
o If player hits gro*snip*


spinal

Sine of Ints

20th October 2019

hmmm, not right....
[code]
Graphics 440,352,0,2
Cls
Global numHills = 200
Global hillMin = 40
Global hillMax = 176-40
Dim hillTops(numHills)
Global offsetX = 0;
Global hillWidth = 48*4;
Global fps
Global groundMidPoint = 0.0
Global GRAVITY# = 5*snip*


spinal

Sine of Ints

20th October 2019

hmmmm, this seems a little less accurate on higher angles than I expected. Have I done something wrong do you think?
[code]
Graphics 440,352,0,2
Cls
Global numHills = 200
Global hillMin = 40
Global hillMax = 176-40
Dim hillTops(numHills)
Global off*snip*


spinal

Sine of Ints

18th October 2019

OK, it seems to work, but I can't imagine why it would be son incredibly slow... I'm getting an out of this world 3fps from this.
[code]
Graphics 800,600,0,2
Cls
Global numHills = 200
Global hillMin = 40
Global hillMax = 176-40
Dim hillTops(*snip*


spinal

Sine of Ints

18th October 2019

OK, attempted to pop the code into blitz for speed of testing etc. but for some reason this no work :-(
[code]
Graphics 800,600,0,2
Cls
Global numHills = 200
Global hillMin = 40
Global hillMax = 176-40
Dim hillTops(numHills)
Global offsetX = 0;
Gl*snip*


spinal

Sine of Ints

8th October 2019

OK, that's part 1 done! Many thinks to Jay for that!
Not sure if its the best way to produce a hilly terrain, but it looks OK :-)
[code]
Graphics 800,600,0,2
Cls
Dim cosTable(180)
;output = WriteFile(''cossine.txt'')
For t=0 To 180
y =*snip*


spinal

Sine of Ints

7th October 2019

Almost what I need!
[code]
Graphics 800,600,0,2
Cls
Dim cosTable(180)
;output = WriteFile(''cossine.txt'')
For t=0 To 180
y = 50+50*Cos(180-t)
; Plot t, y
cosTable(t) = y
; a$ = y + '',''
; WriteLine output, a$
Next
;CloseFil*snip*


spinal

Sine of Ints

7th October 2019

My brain has turned to mush.
[code]
Graphics 640,480,0,2
Cls
Dim cosTable(180)
;output = WriteFile(''cossine.txt'')
For t=0 To 180
y = 50+50*Cos(180-t)
Plot t, y
cosTable(t) = y
; a$ = y + '',''
; WriteLine output, a$
Next
;*snip*


spinal

Building a Touchable Keyboard

14th September 2019

Here is a quick example of using the ili9341 TFT that comes with a touch screen on an Arduino -
[code]
____TFT______ _Pro Micro_
[ ] T_IRQ -------- o A2
[ ] T_DO -------- o 14 (MISO)
.---[ ] T_DIN o MOSI
| [ ] T_CS -[1.5*snip*


spinal

Building a Touchable Keyboard

4th September 2019

Fixed, not a case of sensitivity, more a case of working or not working...
Anyway, resetting the SPI bus speed when trying to draw to the screen has fixed the problem...
[code]
void useTouch(){
digitalWrite(TFT_CS, HIGH);
digitalWrite(CS_PIN, LOW)*snip*


spinal

Building a Touchable Keyboard

2nd September 2019

Your kidding, so far today I've managed to get either the screen to work, but once the touch panel starts working the screen no longer works :-(
[code]
____TFT______ _Pro Micro_
[ ] T_IRQ -[1.5k]- o A2
[ ] T_DO -------- o 14 (MISO)
[ ] T_DI*snip*


spinal

Building a Touchable Keyboard

29th August 2019

I'm going to put this here because it took me all week to get it working again for some reason -
[code]
____TFT______ _Pro Micro_
[J1][ ] VCC -------- o VCC
[ ] GND -------- o GND
[ ] CS -[1.8k]- o 10
[ ] RESET -[1.8k]- o VCC
*snip*


spinal

Building a Touchable Keyboard

10th August 2019

OK, I'm half done. It seems there is a minor glitch though. It's detecting both joystick correctly, with each one sending the correct key presses. However, if both joysticks are pressing the same direction/button then it releases both. Can anyone s*snip*


spinal

Building a Touchable Keyboard

10th August 2019

This is the plan, I've just this second built a C64 joystick, I have a master system controller, created 2 joystick ports and I'm about to wire them up.
[code]
J1 J2 Arduino
(U)-----(U)-------18
(D)-----(D)-------19
(L)-----(L)-------20
*snip*


spinal

Creepy Mouse Tracking

20th July 2019

Cheated...
Rather than checking actual direction over distance, just checked if x/y was different and not 0. seems a little better than my older 'is it fast' method.
[code]
$xAxisOld = $xAxis
$xAxis = $curMX - $oldMX
if $xAxis < 0 then $*snip*


spinal

Taking a Longer Path

21st March 2019

I was thinking something along these lines...
[code]
Graphics 320,12,32,2
time1=MilliSecs()
a0=0:a1=0:a2=0:a3=0:a4=0:a5=0:a6=0:a7=0:a8=0:a9=0
fileout=WriteFile(''moves.txt'')
While a9<>3
a0=a0+1
If a0=4 Then a0=0:a1=a1+1
If a1=4 Then*snip*


spinal

Amiga Mouse

19th March 2019

All, but the original 500 mouse looked better and with those flat sides, would be easy to glue things to :-p
The Amiga mouse just passes all of the raw inputs directly to the computer for processing. It's really very similar to the 8-bit world of inpu*snip*

Newer Posts More - Older Posts