English Amiga Board


Go Back   English Amiga Board > Coders > Coders. Language > Coders. AMOS

 
 
Thread Tools
Old 01 July 2016, 12:14   #21
Brick Nash
Prototron
 
Brick Nash's Avatar
 
Join Date: Mar 2015
Location: Glasgow, Scotland
Posts: 411
Quote:
Originally Posted by Mrs Beanbag View Post
DZ controls the speed AND the height! well literally it is the speed the player is moving upwards, if you jump faster you'll go higher, that's basic physics.

i generally stay away from floating point variables because they are very slow without an FPU. fixed point is easy to do, just divide Z by some power of two when you set the bob's position:

Code:
bob 1,X,Y-Z/8,FRM
for instance...
Yep that works too, thanks. I actually found that dividing the Z by 3 and setting the DZ to 18 gives a very nice height to speed ratio.

It doesn't seem to be causing any issues and I have it splitting off and working in sections now with different animations for straight up and up left/right depending on joystick input and their respective flipped versions.

There's a little issue with speed dips and peaks sometimes but I think it's because I'm using timers and a whole load of on/off variables to do the animations.

It works though so I'm happy at that. Plenty of time to chisel away at the extra marble!

Thanks for all the help. Felt like I've learned a lot in the last day!
Brick Nash is offline  
Old 01 July 2016, 12:36   #22
idrougge
Registered User
 
Join Date: Sep 2007
Location: Stockholm
Posts: 4,332
Quote:
Originally Posted by Mrs Beanbag View Post
DZ controls the speed AND the height! well literally it is the speed the player is moving upwards, if you jump faster you'll go higher, that's basic physics.
I would have used some kind of table, but in AMOS, every kind of datatype is quite slow.
idrougge is offline  
Old 01 July 2016, 12:37   #23
Mrs Beanbag
Glastonbridge Software
 
Mrs Beanbag's Avatar
 
Join Date: Jan 2012
Location: Edinburgh/Scotland
Posts: 2,243
btw it's better to divide by powers of two, the compiler will implement them as a simple binary shift which is much faster than a full divide operation. although this is AMOS so it may be a drop in the ocean... so you can scale it up to an appropriate ratio, for instance 18/3 = 1536/256, and 1/3 is approximately 85/256.

Quote:
Originally Posted by idrougge View Post
I would have used some kind of table, but in AMOS, every kind of datatype is quite slow.
simple physics is better than fixed animation sequences, you can have people knock you about mid air or any other combination of events.

Last edited by Mrs Beanbag; 01 July 2016 at 12:47.
Mrs Beanbag is offline  
Old 01 July 2016, 13:15   #24
Brick Nash
Prototron
 
Brick Nash's Avatar
 
Join Date: Mar 2015
Location: Glasgow, Scotland
Posts: 411
Quote:
Originally Posted by Mrs Beanbag View Post
btw it's better to divide by powers of two, the compiler will implement them as a simple binary shift which is much faster than a full divide operation. although this is AMOS so it may be a drop in the ocean... so you can scale it up to an appropriate ratio, for instance 18/3 = 1536/256, and 1/3 is approximately 85/256.
Cool I changed it back to /2 and fiddled with the numbers a bit and there's really bugger all difference to how I set it last so that's cool.
Brick Nash is offline  
Old 03 September 2016, 00:18   #25
volvo_0ne
Registered User
 
Join Date: Mar 2015
Location: Sheffield UK
Posts: 360
I wonder what happened to Brick Nash, I enjoyed his posts & the replies
volvo_0ne is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
New game made with Backbone "Jump Block Jump!" amiman99 News 13 01 October 2015 09:58
"Jump Block Jump!" game, preview edition (made with Backbone) amiman99 Amiga scene 19 08 December 2014 23:20
Pseudo Ops Viruskiller Promax request.Apps 0 28 July 2010 22:21
Pseudo-ops game packs musashi9 request.Old Rare Games 0 04 June 2010 02:36
Looking for pseudo-AI gag program alkis21 request.Apps 3 16 September 2007 03:41

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 07:14.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.33645 seconds with 13 queries