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




spinal

Mode 7 failure?

3rd December 2021

[code]
Graphics 900,768,0,2
Global texImage = LoadImage(''F:\\Pokitto\\FemtoIDE\\projects\\BoxPusher\\raw\\floor.bmp'') ; 64x64 tile
shiftAmount = 16
Dim myTile(64*64,3)
SetBuffer ImageBuffer(texImage)
; Grab all of the pixels from the tile image f*snip*


spinal

Mode 7 failure?

3rd December 2021

I know this code crashes, but I don't know why...
[code]
Graphics 1250,768,0,2
Global texImage = LoadImage(''F:\\Pokitto\\FemtoIDE\\projects\\BoxPusher\\raw\\floor.bmp'') ; 64x64 tile
SetBuffer FrontBuffer()
x_ = 0.0
y_ = 0.0
scaleX = 32.0
sc*snip*


spinal

gui confusion

8th April 2021

Current conundrum....
Switching from 'add new colours to palette' to 'use a fixed palette'
[code]
Local closestMatch:Int = 0
Local colourDistance:Int = 256+256+256 ' out of range
Local r1:Int = ((rgb565 Shr 11) & 31) '1*snip*


spinal

SpinalWatch

8th March 2021

Introducing...
[code]
_________ __ __ __ __ .__
/ _____/ _____________/ |_/ \\ / \\_/ |_ ____ | |__
\\_____ \\ / \\_ __ \\ __\\ \\/\\/ /\\ __\\/ ___\\| | \\
/ \\ Y Y \\ | \\/| | \\ *snip*


spinal

SpinalWatch

8th March 2021

Python! - Everyone uses python these days, and there are existing examples of transferring data to an arduino...!!!
Nope.
Installed Python, installed pyserial library...
[code]
Traceback (most recent call last):
File ''F:\\arduino-digital-picture*snip*


spinal

SpinalWatch

6th March 2021

This is using the inbuilt serial. So it's not even a Bluetooth problem yet 😞
It's a shame as I managed to save some random junk pixels on the flash chip, which I can load back, but can't grab enough data from the serial port to correct *snip*


spinal

Image rotation?

19th February 2021

I've got most of it figured I think...
Any degree,
[code]
Graphics 640,480,0,2
Graphics 320,240,0,3
SetBuffer BackBuffer()
pic = CreateImage(120,12)
SetBuffer ImageBuffer(pic)
Color 255,0,0
Rect 0,0,120,12,1
Color 0,0,255
Text 0,0,''ABCD*snip*


spinal

gui confusion

5th February 2021

about 5 seconds after I posted I gave that a try, that's the problem with switching languages, you forget things like
[code]
for(int y=0; y<tileSize; y++)
[/code]
is not the same as
[code]
for local y:int=0 to tileSize
[/code]
I've done *snip*


spinal

gui confusion

5th February 2021

Oh, this one is fun!
[code]
Const tileSize:Int = 8
Local tempArray:Int[(tileSize+1)*(tileSize+1)] ' make bigger than i need just in case
Local tempArrayFlip:Int[tempArray.Length][/code]
[code]
For Local y:Int = 0 To tileSize
For Local x:Int =*snip*


spinal

gui confusion

29th January 2021

Getting there!, the code is a mess though.
(Image.png)
[code]
'
' 8888ba.88ba a88888b. dP dP
' 88 `8b `8b *snip*


spinal

gui confusion

28th January 2021

Full code, in case I'm doing something correct somewhere :-P
The idea at this stage, is load a scenery image, then load a background layer, click the transparent colour button, followed by a click on the image somewhere and that colour should become t*snip*


spinal

gui confusion

28th January 2021

I'm attempting to pick a colour from a loaded image.
Surely the following should work? -- nope...
[code]SuperStrict
Graphics 640,480
Local screenpixmap:TPixmap = CreatePixmap(1,1,PF_RGBA8888)
SetColor 255,0,128
DrawRect 0,0,20,20
Flip
While Not*snip*


spinal

gui confusion

28th January 2021

hmmm, this returns -16777216 :-(
[code]
Function GetPixel:Int(pixelX:Int, pixelY:Int)
Local screenpixmap:TPixmap = CreatePixmap(1,1,PF_RGBA8888)
screenpixmap = GrabPixmap(pixelX, pixelY,1,1)
Return ReadPixel(screenpixmap,0,0)
End Function
[/code*snip*


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*

Newer Posts More - Older Posts