English Amiga Board


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

 
 
Thread Tools
Old 14 August 2021, 23:38   #1181
Clydos
aka (Cpt)JohnArcher
 
Join Date: May 2018
Location: Dresden / Germany
Posts: 193
Quote:
Originally Posted by earok View Post
@clydos - I checked, latest experimental build does have support for variable in yield eg

set foo = 100
yield for foo frames

Worked. You got experimental from here? https://github.com/earok/scorpion-editor-experimental
Sorry, you are right. I expected to see "Expresion:" and a variable selector somwhere next to "Frames" similar to "setvariable" in the UI so I suspected, it wouldn't work in the experimental version. Thanks for the heads up!

I may noticed a bug - or I am using it wrong. I wanted to get a random number (e.g. between 0 (or 1) and 25) in the startup codeblock. I thought the "rolldice" command is my friend here. When I set the Dice Sides to 25 with every startup of the game I get the same number instead of a different one.
Interestingly, with version 2021.5.2 the number is 12 while with the latest experimental version you published some hours ago it is 13. But still, with every startup the value never changes.
Sometimes the values changes if I just duplicate the rolldice line so the dice is rolled a second time directly after the first one.

BUT this all applies to the startup codeblock. When I roll the dice in e.g. in an attack codeblock I seem to get random numbers.
Clydos is offline  
Old 14 August 2021, 23:44   #1182
Clydos
aka (Cpt)JohnArcher
 
Join Date: May 2018
Location: Dresden / Germany
Posts: 193
Quote:
Originally Posted by UltraNarwhal View Post
Panels, add an element and set the font and variable to use. For text set the panel talkpad font and select the area used, in a codeblock update the text with print dialogue (panel position).
Ah, thank you, UltraNarwhal, I got it working basically. I had a hard time how the dimension of the panel graphic has to be - I ended using the "ui.png" from the "flighyfox" demo for now.
I wonder what would be possible to display a text in the middle of a screen? Having a transparent panel (not sure how to set the transparent color anyway) which has the same dimension like the the visble playfield? And I don't even now how this dimensions would be (same applies to the top panel) ...

@earok: Would it be possible to implement to have a panel talkpad using a varibale as its text source (next to static text) as well, similar to the Elements?

BTW, do you prefer feature requests and (alleged) bug reports here or directly at the github repo?
Clydos is offline  
Old 15 August 2021, 00:54   #1183
Mixel
Registered User
 
Mixel's Avatar
 
Join Date: Jun 2020
Location: Leeds, UK
Posts: 770
I forgot to say Clydos: hi it’s neat to see it’s you! I wouldn’t have guessed otherwise. You can’t overlay panels like that, the middle one replaces the viewport and the top and bottom ones go above and below it.. You can’t use transparency in panels because they’re all their own unique slices of screen with potentially their own palettes etc. (I think I’m right about this stuff, haha)

The dimensions for the panel.. you set it to be a full screen width (320) and whatever height you want.. then you use however much of the horizontal space as you feel like works with your game.. (I toyed with having mine spread out past the game screen’s sides but decided against it)
Mixel is offline  
Old 15 August 2021, 01:05   #1184
Clydos
aka (Cpt)JohnArcher
 
Join Date: May 2018
Location: Dresden / Germany
Posts: 193
Quote:
Originally Posted by Mixel View Post
edit: The "can not yeild after gosub" - I might have done it a million times, not sure.. It crashes out on my intro scroller now, and you basically coded that part, if I'm remembering right. (introcamstart, Introcamdown and funct_introwait) I have a feeling a whole bunch of CMOhn might kick me out of the game now. I'll check through level by level and see what happens.
Hey Mixel, I had the same problem with the "yield loop" in the experimental version after you helped me how this could work. I don't know how your code looks and whether it is that simple to fix like it was in my simple loop but I changed my code from this

Click image for larger version

Name:	Scorpion_Editor_-_2021.5.2_1JZREBguqx.png
Views:	85
Size:	13.0 KB
ID:	72887

to this

Click image for larger version

Name:	Scorpion_Editor_-_2021.5.3_fZElxzm6SE.png
Views:	80
Size:	12.9 KB
ID:	72888

Maybe this helps!?

Last edited by Clydos; 15 August 2021 at 01:51.
Clydos is offline  
Old 15 August 2021, 01:10   #1185
Clydos
aka (Cpt)JohnArcher
 
Join Date: May 2018
Location: Dresden / Germany
Posts: 193
Quote:
Originally Posted by Mixel View Post
I forgot to say Clydos: hi it’s neat to see it’s you! I wouldn’t have guessed otherwise. You can’t overlay panels like that, the middle one replaces the viewport and the top and bottom ones go above and below it.. You can’t use transparency in panels because they’re all their own unique slices of screen with potentially their own palettes etc. (I think I’m right about this stuff, haha)
Alright, thanks a lot for that information! So, I still wonder how I could display text (like a countdown) in the the middle of a screen. I may could use graphics but a more dynamic approach like you would need in adventures would make sense, I think. :-) I wonder if CMO has texts in the "middle" of the screen!?

Quote:
Originally Posted by Mixel View Post
The dimensions for the panel.. you set it to be a full screen width (320) and whatever height you want.. then you use however much of the horizontal space as you feel like works with your game.. (I toyed with having mine spread out past the game screen’s sides but decided against it)
Got you, thanks! I will try that out.
Clydos is offline  
Old 15 August 2021, 01:14   #1186
earok
Registered User
 
Join Date: Dec 2013
Location: Auckland
Posts: 3,547
Emergency check in:

- New "INLINE CODEBLOCK" function that's functionally very similar to gosub, but won't have yield errors. What it does "under the hood" is basically copy+paste one code block into the middle of another one. (Note that if you do a manual "return" command in an inlined codeblock, it'll return to the game rather than the codeblock that it was called from. BUT I might be able to do a fix for that too)

- Duckstroma bug explains why I had it so that changing an actor's type resets fire button state. I've checked in what's hopefully a fix for that.
earok is offline  
Old 15 August 2021, 02:15   #1187
Mixel
Registered User
 
Mixel's Avatar
 
Join Date: Jun 2020
Location: Leeds, UK
Posts: 770
Quote:
Originally Posted by Clydos View Post
Hey Mixel, I had the same problem with loop after you helped me how this could work. I don't know how your code looks and whether it is that simple to fix like it was in my simple loop but I change my code from this (screenshot 1) to this (screenshot 2):

Maybe this helps!?
Thanks.. No, mine was orders of magnitude more confusing than that, hehe. (things nested within things nested within other things, with a gosub near the top of the stack. I was feeling particularly potato-brained trying to work out a way around it but Earok to the rescue!

Quote:
Originally Posted by earok View Post
Emergency check in:

- New "INLINE CODEBLOCK" function that's functionally very similar to gosub, but won't have yield errors. What it does "under the hood" is basically copy+paste one code block into the middle of another one. (Note that if you do a manual "return" command in an inlined codeblock, it'll return to the game rather than the codeblock that it was called from. BUT I might be able to do a fix for that too)
That seemed to fix the dying crash immediately, I swapped out my gosub in the francislogic loop with an inlinecodeblock.. Thanks so much for such a quick fix.

Doing the same also fixed the "box down the pipe" scroll in the sewer boss level.

I'm trying to figure out how to pause the intro scroller at different stages now without yields in gosubs, but this is super promising. As far as I can tell this is the only wonky thing left.

Edit: hmm I think I just worked out a nice lateral thinking way to script the intro that’ll improve it slightly in the process.

Quote:
Originally Posted by Clydos View Post
Alright, thanks a lot for that information! So, I still wonder how I could display text (like a countdown) in the the middle of a screen. I may could use graphics but a more dynamic approach like you would need in adventures would make sense, I think. :-) I wonder if CMO has texts in the "middle" of the screen!?
CMO doesn’t have text in the middle of the screen as such, the closest thing I have is the countdown before the motorbike level starts, and the “proceed, yes/no” selector on the world map.. both of these are just actors though so don’t really count.

I also have font tiles in Tiled (as used in the credits level, shop signs, etc).. I guess you *could* in certain circumstances make a font out of Blocks and write with them on screen.. would use up quite a lot of block slots and would be attached to level geometry, but it would have transparency and could be made to do interesting stuff with some scripting! (Chunky 16px letters though, haha!)

Last edited by Mixel; 15 August 2021 at 04:52.
Mixel is offline  
Old 15 August 2021, 08:50   #1188
acidbottle
Registered User
 
acidbottle's Avatar
 
Join Date: Jul 2018
Location: Scotland
Posts: 843
Yes, for writing on screen I use actual bobs! Maybe not as efficient but works. For more complex sentences and writing blocks would be a far better idea!

Talking of fonts, is this functioning correctly? Will not allow me to add new fonts (either png or convert from ttf) but can rename my own as the default and they display.
acidbottle is offline  
Old 15 August 2021, 10:11   #1189
Mixel
Registered User
 
Mixel's Avatar
 
Join Date: Jun 2020
Location: Leeds, UK
Posts: 770
Could it be the weird naming scheme? I have two game fonts in my CMOhn directory and many, many numberfonts.. My fonts are converted from TTFs and the numberfonts usually just made in aseprite by drawing over the template. (Well, when they’re actually fonts at least! Most of my Numberfonts are for panel graphics, portraits etc)

In my project root folder I have:
CMOv.font.png (main dialog font)
Cmotiny.font.png (Currently unused. Used previously on map screen dialogue)

Side note: https://fontstruct.com/ is amazing for creating bitmap fonts, i make all my Amiga fonts as TTFs in it!

I haven’t added a new font in a while though so maybe it’s a new bug I’ve not seen.

Last edited by Mixel; 15 August 2021 at 14:40.
Mixel is offline  
Old 15 August 2021, 16:56   #1190
UltraNarwhal
Registered User
 
UltraNarwhal's Avatar
 
Join Date: Apr 2019
Location: UK
Posts: 303
Quote:
Originally Posted by earok View Post

- Duckstroma bug explains why I had it so that changing an actor's type resets fire button state. I've checked in what's hopefully a fix for that.
Fixed. Noticed Quit command seems to be missing from commands/key press, I had to make a codeblock with quit in it..
UltraNarwhal is offline  
Old 15 August 2021, 18:42   #1191
Mixel
Registered User
 
Mixel's Avatar
 
Join Date: Jun 2020
Location: Leeds, UK
Posts: 770
After some head-scratching and remodelling, everything seeeems to be working well with the new systems.. (to scroll down on intro, credits etc now I use an invisible, slowly falling player actor with ramp blocks that get deleted at certain intervals, which feels really funny but actually opens up some interesting possibilities.)

I cant remember if I ever mentioned this bug.. But why do parallax backdrops scroll slightly whenever a dialogue box is triggered? Example: https://imgur.com/uLRxPKH - I think it's always done this.. I just keep forgetting.

Last edited by Mixel; 15 August 2021 at 18:49.
Mixel is offline  
Old 16 August 2021, 05:44   #1192
earok
Registered User
 
Join Date: Dec 2013
Location: Auckland
Posts: 3,547
Minor check in, some z-order fixes (z-order wasn't being corrected when changing types, that should be fixed now). Should still be possible to change z-order with code blocks using actor_z

Apologies about the Quit thing, I was doing a tidy up of standard library and got rid of quit because I thought it was no longer needed - I totally forgot it was needed for key presses.


Re: scrolling parallax during talkpad, I may need to investigate
earok is offline  
Old 17 August 2021, 00:08   #1193
earok
Registered User
 
Join Date: Dec 2013
Location: Auckland
Posts: 3,547
Experimental update. None of this is well tested:

- Quit is back in the standard library.

- Parallax shouldn't nudge to the right when toggling talkpad (it may still move if you've got movement set in the idle column)

- New "While" option under conditional. It's used to create loops that are a little more simple than could be done before.

For example, this code

Code:
=== label ===
If condition
(Do actions)
goto label
End condition

Can be simplified as

Code:
While condition
(Do actions)
End condition

Edit - forgot to check in, whoops. Should be there now.
earok is offline  
Old 19 August 2021, 03:40   #1194
earok
Registered User
 
Join Date: Dec 2013
Location: Auckland
Posts: 3,547
Daily check in. There's now an ELSE conditional - ELSE is pretty much a standard part of every language and now it's part of Scorpion too.

Something like this:

Code:
if player_health > 0
   goto show_player_hurt
end condition
if player_health <= 0
   goto show_player_died
end condition
Can be simplified as

Code:
if player_health > 0
   goto show_player_hurt
else
   goto show_player_died
end condition

Note that the bottom one is not only shorter and simpler, but it's slightly faster (since it doesn't need to look up the player's health variable a second time)

Last edited by earok; 19 August 2021 at 03:48.
earok is offline  
Old 19 August 2021, 12:44   #1195
Mixel
Registered User
 
Mixel's Avatar
 
Join Date: Jun 2020
Location: Leeds, UK
Posts: 770
OMG, you’re adding really big things in really short order! This is great!

I think I’ll wait until maybe AND and OR are in before rewriting my codeblocks but it’ll be so much easier to avoid huge pyramids of IFs in future even with just While and Else added.
Mixel is offline  
Old 19 August 2021, 13:32   #1196
Clydos
aka (Cpt)JohnArcher
 
Join Date: May 2018
Location: Dresden / Germany
Posts: 193
Great news, earok! This is very helpful, thanks. I think, a switch-case construct would also be very helpful, along with Mixel's AND and OR wishes.

May I ask whether you could have a look at two of my previous posts?

http://eab.abime.net/showpost.php?p=...postcount=1181
http://eab.abime.net/showpost.php?p=...postcount=1182

Thank you!
Clydos is offline  
Old 19 August 2021, 14:22   #1197
UltraNarwhal
Registered User
 
UltraNarwhal's Avatar
 
Join Date: Apr 2019
Location: UK
Posts: 303
Happy

Quote:
Originally Posted by earok View Post
Daily check in. There's now an ELSE conditional - ELSE is pretty much a standard part of every language and now it's part of Scorpion too.
WHILE and ELSE
UltraNarwhal is offline  
Old 20 August 2021, 01:08   #1198
earok
Registered User
 
Join Date: Dec 2013
Location: Auckland
Posts: 3,547
Cheers guys

@clydos random number being the same in startup every time - the number being the same each time is a function of the state being the same every time (eg, every time you start the emulator it'll take the exact same amount of time to load and reach that codeblock, ergo there's no differences present that could cause a different number to be pulled). With it pulling numbers that are more random during attack, that is to be expected as there would be a random amount of time between the start of the amiga and the first time you press attack.

Not exactly sure what you mean by "panel talkpad using a varibale as its text source (next to static text) as well, similar to the Elements?". If you're asking if talkpads can have number elements, they do already, but there's no way to put text into a variable.
earok is offline  
Old 20 August 2021, 10:20   #1199
earok
Registered User
 
Join Date: Dec 2013
Location: Auckland
Posts: 3,547
New experimental check in - added else if conditional. Example

Code:
roll dice with 6 sides
if dice == 1
  say "you rolled a one"
else if dice == 2
  say "you rolled a two"
else if dice == 3
  say "you rolled a three"
else if dice == 4
  say "you rolled a four"
else if dice == 5
  say "you rolled a five"
else
  say "you rolled a six
end condition

Note that:
* It stops checking as soon as it hits a matching condition (ergo it's faster than a bunch of "ifs" so long as it happens the matching condition is near the top)
* You can end it with an else, which in this case would be a fraction faster than "if dice == 6"
earok is offline  
Old 20 August 2021, 11:00   #1200
malko
Ex nihilo nihil
 
malko's Avatar
 
Join Date: Oct 2017
Location: CH
Posts: 5,002
Oh kind of "case" condition. Great
malko 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 13:57.

Top

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