Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Widget101

Pages: [1] 2
1
Announcements / Re: Manic Miner GLB
« on: 2021-Aug-08 »
Thanks All for the comments,

Quote
Its a game im newer actuelly have played the original and has very annoying beeper music and all. Even its might have a history behind it.

Yes spacefractal, you're right! It's apparently the first time a Spectrum game used in-game music and wasn't thought possible until this. The processor has to constantly switch between the game updates and music updates to make it work - hence the stuttering and bitty tune. I like your AY version! I love it on Jet Set Willy as well, where it plays 'If I was A Rich Man".  :)

2
Announcements / Manic Miner GLB
« on: 2021-Aug-05 »
Hi All,

I've finished my GLB version of Manic Miner, linked below.(I say finished, it's probably a raw beta in real terms!)

Hadn't really intended to write it in the first place, it just grew from an article on crumbling platforms in Wireframe magazine. I've never coded a platformer before and it looked interesting.



I've attached a zip with the playable .exe and all the media but also put a copy of the GBAS file in the media folder if anyone is interested in looking through the code, pulling it apart, reusing, updating, correcting, laughing at it, etc.  ;)  (note its not refactored, so isn't efficient or streamlined!!)

Works for me without noticeable bugs but its not been extensively play-tested. Hope it works for you.

There's a readme in the folder which give a bit more detail, if you're interested.

Cheers,

Steve.

3
Thanks for the reply Qedo,

I was thinking about BOXCOLL but didn't think I'd be able to check its collision with a sprite or anim.

I think I've sorted it! Keep using the box sprite for the collision, but not actually drawing it to the screen seems to work!




4
Hi,

I've drafted out a retro platformer (basically manic miner) and have an animated player but I'm finding that the pixel perfect collision is causing problems when my character walks off a wall. As he gets to the end of the wall he falls down as expected. However, as his arm extends back beyond his feet, the arm collides with the wall and the character sticks.

If I place a rectangular box under the sprite and use that for the collision then I don't get this problem as the edges of the collision check are always uniform (i.e. nothing sticking out past the edge to catch the wall).

Is there a way to replace the pixel perfect collision with a bounding collision instead? Or to make my rectangular box invisible so that it can't be seen but still detects collision.

Hopefully I've explained this clearly!! :S

Many thanks,

Steve.

5
GLBasic - en / Re: 3D and GLB
« on: 2020-Oct-17 »
I'd definitely be interested in some 3d tutorials. It's the old retro style 3d that interests me most so basic graphics and shading is no problem providing the speed is there.

One of the projects on my list is to remake the old Zarch / Virus game that David Braben wrote for the Archimedes. I'd made a start on this in DarkBasic before I moved across to GLBasic. Plan has always been able to see if I could get it up and running in GLB.


[/youtube]

6
Thank you!

That is much better - doesn't need to separately worry about the length of the text.

Code: (glbasic) [Select]
c$="A random line of text!"
WRITELINE 1,c$ //to write the text line to the file
READLINE 1,c$ //to read the text from the file back into the variable

Many thanks.

7
Hi,

I'm trying to understand the best way to save and load data for my current game project which so far has just over 15600 variables in vars, dims and string$.

I think I'm ok with dims and the standard variables but am after a bit of advice for strings.

I've gone through the GLBasic help example but for some reason this comments out the key bit I'm after (// READSTR 1, x2$, LEN(xx$)).

I've managed to get it to work by saving the length of the string into the save file before saving the actual $tring as I can't otherwise see how it knows how long it has to be if its not already loaded it. I'm wondering if this is the best way to do it or whether there is a better solution. With this way every string in the save file is going to need its length saved before it so it can load the length into a variable then use that variable in the READSTR command to set the length for the text to follow it.

My simplified test code is below:
Code: (glbasic) [Select]
SETSCREEN 1024, 768, 1
SETFONT 0

//Set up some random variables
GLOBAL test$
GLOBAL var1
GLOBAL var2
GLOBAL var3
GLOBAL b$
GLOBAL var4
GLOBAL test[]
DIM test[5]

//populate the variables
test$ = "savefile.txt"
var1=57
var2=103
var3=999
b$="This Text String Could Be Any Length!!!!"
var4=345
test[0]=501;test[1]=602;test[2]=703;test[3]=804;test[4]=905

//create the save file
OPENFILE(1, test$, FALSE) //false=write mode
WRITEIEEE 1,var1
WRITEIEEE 1,var2
WRITEIEEE 1,var3
WRITEIEEE 1,LEN (b$) //saving the $tring length - is this required??
WRITESTR  1,b$
WRITEIEEE 1,var4
FOR f=0 TO 4; WRITEIEEE 1,test[f]; NEXT
CLOSEFILE 1

//Clear variables
var1=0
var2=0
var3=0
b$=""
var4=0
FOR f=0 TO 4; test[f]=0;NEXT

//See if they reload
//open the save file and populate the variables from it
LOCAL textlength
OPENFILE(1, test$, TRUE) //true=read mode
READIEEE 1, var1
READIEEE 1, var2
READIEEE 1, var3
READIEEE 1,textlength //load the length of the following text string
READSTR 1,b$,textlength //load the text string
READIEEE 1, var4
FOR f=0 TO 4; READIEEE 1,test[f]; NEXT
CLOSEFILE 1

//print the loaded variables to the screen
PRINT var1,0,0
PRINT var2,0,20
PRINT var3,0,40
PRINT b$,0,80
PRINT var4,0,120
FOR f=0 TO 4; PRINT test[f],0,140+f*20; NEXT

SHOWSCREEN

MOUSEWAIT


Any help would be appreciated.  :)

8
Hi there,

I've used Anim8or for 3d. It's free and I found it really easy to pick up and use for basic 3d models and 3d levels. Also has its own forum and community.

https://www.anim8or.com/

 :)

9
Announcements / Re: Red Wizard Island
« on: 2020-Jun-24 »
Working for me now too! :booze:

10
Announcements / Re: Red Wizard Island
« on: 2020-Jun-21 »
I've still got the error after the steam update as well. Still falling through the ground when leaving the boat on level .

11
Announcements / Re: Red Wizard Island
« on: 2020-Jun-09 »
Looks good. Love the vibe and atmosphere. Can tell there's a lot of work gone into it. Well done!

I've got through to Level 3 'Tower Tunnel Jump' but can't progress when I get off the Viking ship. Moving right I fall through the ground and drown.
I found that if I jump when on the ship I can walk along through the air for a while but then fall off after a short while and fall through the floor again. If I walk off the ship and jump its like I'm hitting an invisible ceiling.

Looks like maybe the platform collision is out of sync with the level?

I've posted a short vid below to show you:

Vid removed as it's now fixed. :)

Can't get past this point in the game.

Let me know when you've seen it and I'll delete.

Cheers,

Steve.


12
Announcements / Re: Red Wizard Island
« on: 2020-Jun-09 »
Looks awesome!

Very well done. That's a lot of hard work and dedication.

How much development time do you think you put into it?

I'll check it out on Steam.


13
Hi, generally as You can download GLBasic source (it's >2GB with all stuff) so there are no secrets in any function :-)
GLB is using ISSAC method and 'rand.c' implementation (or whatever it should be called properly) by Bob Jenkins. You can found original code here: https://burtleburtle.net/bob/c/rand.c
It was little modified to work as GLB part, but core is same.

Thanks for that Dreamerman, that's awesome. Wiki reckons of the ISAAC PRNG that 'Only a few other generators of such high quality and speed exist in usage'.

I was looking into methods for procedural generation and quite a few examples of other systems that I found on the 'tinternet using 'inbuilt' rand functions start developing patterns when graphically representing very large numbers of results, and as such coders were manually implementing the Lehmer or other algorithm. I was wondering whether I'd be getting a similar issue with GLB but it looks really solid, no problems, and I guess that's why! :good:

Quote
Designed for speed and security, ISAAC (Indirection, Shift, Accumulate, Add, and Count) generates 32-bit random numbers. On average, cycles are 2^8295 values long, and are guaranteed to be at least 2^40 values long. The results are uniformly distributed, unbiased, and unpredictable unless you know the seed.

[Note: reading this back before posting makes me sound like I know what I'm talking about!!  :P Just to be clear - I really don't, but do find it fascinating!]

14
GLBasic - en / GLB Random Number Algorithm?
« on: 2020-Jun-07 »
Hi there,

Having spent far too long in Elite Dangerous and No Man's Sky I've been playing round with the SEEDRND and RND functions in GLBasic to create a super simple procedural galaxy (well, basically a matrix with repeatable numbers in it to represent stars) and am wondering what algorithm and 'period' GLB uses (if its not a secret!) as its basis??

:)



15
Announcements / Re: The Outhouse
« on: 2020-Mar-26 »
I think this looks really good. I love the style.

Pages: [1] 2