English Amiga Board


Go Back   English Amiga Board > Other Projects > project.Amiga Game Factory

 
 
Thread Tools
Old 10 November 2021, 15:26   #1441
Mixel
Registered User
 
Mixel's Avatar
 
Join Date: Jun 2020
Location: Leeds, UK
Posts: 770
Quote:
Originally Posted by UltraNarwhal View Post
I experimented with something like this months ago, I think I spawned it on the player and in the objects spawn I set its position to camera_x +128 and camera_y -96 (half your Yresolution).
Whut?! How is that so hilariously obvious in retrospect. Wtf. I manipulate camera_x and y a bunch in codeblocks already but somehow hadn’t thought to just read those coordinates for something else. This is going to be invaluable, lol. Thanks Ultranarwhal!

You can even put a timer on it so it follows the screen, goddamnit. That’d work for any floating ui element anywhere on the screen and I’ve been too dumb to realise the whole time. Argh! Haha.
Mixel is offline  
Old 10 November 2021, 22:42   #1442
acidbottle
Registered User
 
acidbottle's Avatar
 
Join Date: Jul 2018
Location: Scotland
Posts: 834
I had, upon checking my own code:

move actor to player_x +128: player_y -50

By changing to camera_x +128 it has solved the issue. Thank you again for that, was so damn obvious really.

I dont know why or if it should spawn with camera_y but it didnt so left it at player_y ..
acidbottle is offline  
Old 11 November 2021, 01:09   #1443
earok
Registered User
 
Join Date: Dec 2013
Location: Auckland
Posts: 3,543
Check in:

- Optimisation: Ported more of Scorpion's virtual machine from Blitz to ASM. This is an ongoing process, with the eventual goal of porting parts of Scorpion hard coded in Blitz into the standard library.

- New feature: You can set the default VAR1-VAR5 and TAG values for each actor in the actor window. This will potentially reduce the need to create OnSpawn codeblocks that only set those values (requested by NEESO)

- Further than that, if you type a string in the VAR1-VAR5 or TAG box, it'll create a value you can use in codeblocks.

For example, if you were doing a Pokemon style game and you had a bunch of water Pokemon, you could set VAR1 as "Water". And then in codeblocks:


if actor_var1 == water
//do stuff only for water pokemon
endif
earok is offline  
Old 11 November 2021, 09:09   #1444
Mixel
Registered User
 
Mixel's Avatar
 
Join Date: Jun 2020
Location: Leeds, UK
Posts: 770
Ahh the Var 1-5 in actor screen is a great idea, TY! (and to Neeso).. And giving them string name is going to greatly simplify stuff. Massive time saver! I've never really understood what Tag is for..

CMO doesn't run with this latest experimental build though, it just gives an ominous black screen.
Mixel is offline  
Old 11 November 2021, 09:42   #1445
earok
Registered User
 
Join Date: Dec 2013
Location: Auckland
Posts: 3,543
ouch, I'll take a look once I've slept. I assume it's all checked in?

TAG is really just a sixth "VAR", but it's sort of meant for categorising different actors that have the same category - they're inspired by the concept in Unity. https://docs.unity3d.com/Manual/Tags.html

(and I'll probably make it so there's a "foreach of tag X" where you can do a foreach on all actors that have the same value in tag)
earok is offline  
Old 11 November 2021, 10:15   #1446
Mixel
Registered User
 
Mixel's Avatar
 
Join Date: Jun 2020
Location: Leeds, UK
Posts: 770
Quote:
Originally Posted by earok View Post
ouch, I'll take a look once I've slept. I assume it's all checked in?

TAG is really just a sixth "VAR", but it's sort of meant for categorising different actors that have the same category - they're inspired by the concept in Unity. https://docs.unity3d.com/Manual/Tags.html

(and I'll probably make it so there's a "foreach of tag X" where you can do a foreach on all actors that have the same value in tag)
No rush I have so many other bits of the game to work on. Just checked it in again.

Ahh I see, tags sound potentially useful, especially if you do the foreach thing.

When it was running yesterday.. "Start_School" codeblock kicks me out to dos with Error Opcode: 0 too, but i cant see anything obvious in it that would be a problem.

Last edited by Mixel; 11 November 2021 at 15:06.
Mixel is offline  
Old 11 November 2021, 13:01   #1447
UltraNarwhal
Registered User
 
UltraNarwhal's Avatar
 
Join Date: Apr 2019
Location: UK
Posts: 300
Smile

New variable feature is great and will mean I can clean out loads of repetition

I also only get a blank screen on this build btw.
UltraNarwhal is offline  
Old 11 November 2021, 14:45   #1448
Lemming880
Registered User
 
Join Date: Nov 2014
Location: Netherlands
Posts: 260
-Not sure if this is fixed but music plays from the start even if it's already loaded.

-When I set a (horizontal) moving platform on recycle: respawn, and walk away from it so it leaves the screen, then walk back to it, it's gone. Only when I walk away a bit further, it respawns.

-I noticed that running the game from scorpion is slower than from adf.

@Mixel, I used your invisible actor method and I now have animated waterfalls that don't lag! Easier than I thought but also a bit tricky. I didn't have three colors free in the first 16 colors. So I used three colors from row 2 and had to change the project from 16 to 32 colors. But it doesn't seem to affect performance or anything. Since I already use row 2 for boss sprites, I have to reset the colors to default before the boss fight begins or else the boss would flash like an x-mas tree.

And I also wished for fading music. I just never mentioned it.

Last edited by Lemming880; 11 November 2021 at 14:52.
Lemming880 is offline  
Old 11 November 2021, 18:24   #1449
earok
Registered User
 
Join Date: Dec 2013
Location: Auckland
Posts: 3,543
Daily check in:

- Black screen bug should be fixed. It seems I forgot to include the updated game.exe, whoops.

- Tweaked "recycling" settings so that Scorpion won't recycle unless the actor is further away from the screen than currently. Hopefully will resolve issue reported by Lemming880 re: moving platform (I think Mixel also might have had some of these bugs some time back with his moving platform snails?).

If it doesn't fix it, I may need to adjust further.

- Compiler throws error when variable "none" is being set to a value (Mixel's reported issue about the different startup codeblock)

====

@Lemming880 I can't think of a reason why ADF would be faster than loading from Scorpion. I'd need to see a comparison of WinUAE configs (if you boot from Scorpion, it should be fine just to save the WinUAE config to desktop)

Re: Music playing from start when already loaded, I don't quite follow - music can only be started and stopped, it can't be paused/resumed (though musicpos can be used to skip to a certain position).

====

I've had some more thoughts about TAG and I keep changing my mind about it.

The thing is, VAR1-VAR5 are designed for things like health, ammo etc, things that you'd generally want to keep on an actor even if you change the type of it. So changing actor1 to actor2 doesn't assume that you want to reset the health level of the actor.

TAG is meant to be used for categorising, but like with VAR it doesn't change automatically when you change the actor type.

I've thought about making TAG immutable in the sense that, if actor1 is tagged as "car" and actor2 is tagged as "plane", and you change actor1 to actor2 (without creating a new actor), it sets the TAG as "plane" without resetting any of the VAR values.

But it's not strictly needed in the sense that you can change TAG in codeblock anyway, and it makes it a little less flexible if you wanted to use TAG for a value like health.

Any thoughts?
earok is offline  
Old 11 November 2021, 19:35   #1450
Mixel
Registered User
 
Mixel's Avatar
 
Join Date: Jun 2020
Location: Leeds, UK
Posts: 770
Quote:
Originally Posted by earok View Post
- Black screen bug should be fixed. It seems I forgot to include the updated game.exe, whoops.
Fixed, thankyou!

Quote:
- Tweaked "recycling" settings so that Scorpion won't recycle unless the actor is further away from the screen than currently. Hopefully will resolve issue reported by Lemming880 re: moving platform (I think Mixel also might have had some of these bugs some time back with his moving platform snails?).

If it doesn't fix it, I may need to adjust further.
Sorry to say, the snails still do the same thing. I can make them disappear pretty easily by going on/off the screen with them on. (seems to be easier when i do it do their left for some reason but maybe that's just a coincidence?)


Quote:
- Compiler throws error when variable "none" is being set to a value (Mixel's reported issue about the different startup codeblock)
Thankyou! .. I wonder how the heck i ended up putting that there in the first place, it wasn't part of anything, lol.

Quote:
(TAG stuff) Any thoughts?
I have no preference for how they work, immutable sounds neat but considering i've been oblivious to their useage until today I'm not a good judge.

Last edited by Mixel; 11 November 2021 at 20:32.
Mixel is offline  
Old 11 November 2021, 19:46   #1451
Lemming880
Registered User
 
Join Date: Nov 2014
Location: Netherlands
Posts: 260
Re: platform. Thanks for the quick response. Unfortunately it's still disappearing.

Re: music. When a song is loaded, and the same song is told to play again, it starts playing from the beginning. Previously the music just kept playing. Like in my menu, I made a button to load an info screen, then when going back to the main menu, startup is loaded (containing the same playmusic x) and the music plays from the beginning again. I could make separate code blocks to prevent this. But even the explanation text for playmusic says: "Load the song x, if it isn't already loaded." Well it is already loaded and still it loads again.

Re: adf. I will look at the winuae configs.

Last edited by Lemming880; 11 November 2021 at 20:43.
Lemming880 is offline  
Old 11 November 2021, 21:01   #1452
UltraNarwhal
Registered User
 
UltraNarwhal's Avatar
 
Join Date: Apr 2019
Location: UK
Posts: 300
Appears to be a bug with animation name checking not working.

I have terrain/enemies that when hit with a projectile check it's named sword then do damage/destroy, in latest experimental build the sword now does nothing.
UltraNarwhal is offline  
Old 11 November 2021, 23:17   #1453
earok
Registered User
 
Join Date: Dec 2013
Location: Auckland
Posts: 3,543
Hmm.. I'll need to get a demo of the platform issue where the bug can be replicated immediately after starting the game (since I may need to restart dozens of times while testing/debugging etc). I thought what I did had fixed it but it may be more complicated than I thought.


I'll come back and look at the animation checking issue (I know exactly the cause of it but it's complicated to fix)
earok is offline  
Old 12 November 2021, 00:11   #1454
Mixel
Registered User
 
Mixel's Avatar
 
Join Date: Jun 2020
Location: Leeds, UK
Posts: 770
To help figure out the moving platforms -

I've uploaded two snail test builds where you can walk to the right and get it to happen immediately to a snail.. but it's not.. 100% easy?

In Build 1 - You walk to the right, once snail is on screen you walk left until you imagine him being off the screen (so 50px out of view or something) then walk right and sometimes he's not there.

I also made a build where a "non appearing" snail is at the right of the screen as soon as you start, I uploaded that as Snail Test 2.. IDK which of these two is more useful. The snail doesnt appear at all unless you approach it from the right in that one. (though i could swear it has appeared from the left at least once, but can't replicate it, lol!)
Mixel is offline  
Old 12 November 2021, 00:18   #1455
earok
Registered User
 
Join Date: Dec 2013
Location: Auckland
Posts: 3,543
Thanks @Mixel, I'll check it out

@Lemming880, apologies, forgot to respond - load means load from disk, music already loaded won't reload from disk but will restart whenever you use the play music command.

I think this should work if you want to play music but don't want to restart it:

if music != mysong
playmusic mysong
endif
earok is offline  
Old 12 November 2021, 00:59   #1456
UltraNarwhal
Registered User
 
UltraNarwhal's Avatar
 
Join Date: Apr 2019
Location: UK
Posts: 300
Quote:
Originally Posted by earok View Post
I'll come back and look at the animation checking issue (I know exactly the cause of it but it's complicated to fix)
Just thought I'd mention it in case anyone else uses it a lot. I only used it for sword, but have switched to use a tag instead
UltraNarwhal is offline  
Old 12 November 2021, 01:01   #1457
saimon69
J.M.D - Bedroom Musician
 
Join Date: Apr 2014
Location: los angeles,ca
Posts: 3,558
Quote:
Originally Posted by earok View Post
Thanks @Mixel, I'll check it out

@Lemming880, apologies, forgot to respond - load means load from disk, music already loaded won't reload from disk but will restart whenever you use the play music command.

I think this should work if you want to play music but don't want to restart it:

if music != mysong
playmusic mysong
endif
OMG have a Macromedia director reminescence:
Code:
onEnterFrame
 go to the frame
end
saimon69 is offline  
Old 12 November 2021, 14:46   #1458
Lemming880
Registered User
 
Join Date: Nov 2014
Location: Netherlands
Posts: 260
Re: music. Ah right, so the music now restarts and previously it didn't (before 2021.6.1).

Re: adf. I've looked at the winuae configs but they are the same. And after testing again I don't see differences in speed anymore. That might have to do with that I recently changed the moving platforms from recycle: never to respawn. I had them on never because of the disappearing problem. But that slowed the game down. But the version with 'recycle: never' seemed to run better from adf. But now that it's back on respawn, there is no noticeable lag in both adf or from scorpion. After reading some reports about jerky scrolling I thought I was on to something. But now I start to think I'm just seeing things. The good news, my game runs smoother than I thought.

Last edited by Lemming880; 12 November 2021 at 15:17.
Lemming880 is offline  
Old 12 November 2021, 17:34   #1459
earok
Registered User
 
Join Date: Dec 2013
Location: Auckland
Posts: 3,543
@lemming880 I did change a few things to do with music, in particular making it so that music isn't unnecessarily reloaded from disk (that had been a problem in games with only one mod file because hitting stop would pointlessly unload the music file). I think this is why the play function works differently than previous releases.

----

Experimental update for the day:

- Using Actor_Animation in conditions should now be fixed.

- Actor_Tag changes to match the new actor after using SetType - since it was designed to categorise groups of similar actors together, I figured having that value match the type of actor was the best way to approach it.

- Recycling has been changed in a couple of different ways:

* Previously, there was a "time out" period of a second or so where an actor well outside of the screen is still active before being recycled - there isn't anymore, but the actor has to be a little further from the screen than before.
* In the case of "Respawn" recycle specifically, it won't recycle unless the area it would recycle to is ALSO off the screen.


It's a little hard to explain that, but with the snail demo:

If you're following it from the left, and you let it leave from the right, one of two things will happen:

- If the part where the snail starts from is still onscreen, the snail will keep moving right and *not* recycle
- If the part where the snail starts from is offscreen, the snail will recycle back at that location.

That does mean it's possible for the snail to teleport to the left side of the player - if the player is standing well to the right of the place the snail starts from, and the snail goes offscreen and is recycled by continuing to move right.
earok is offline  
Old 12 November 2021, 18:09   #1460
saimon69
J.M.D - Bedroom Musician
 
Join Date: Apr 2014
Location: los angeles,ca
Posts: 3,558
Is the 'F00 crashes everything' bug still in the music player?
saimon69 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
2D Platformer Engine carrion Coders. Blitz Basic 27 06 June 2019 14:35
New Chaos Engine!! arpz Retrogaming General Discussion 75 31 August 2013 22:20
F/S Warp engine 32 mb tabuhuso MarketPlace 0 24 February 2012 15:13
PC Engine CD TodaysForgotten Retrogaming General Discussion 47 13 May 2009 23:57
Scorpion (100% working) andreas request.Old Rare Games 13 01 August 2003 08:48

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 02:56.

Top

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