14 August 2021, 23:38 | #1181 | |
aka (Cpt)JohnArcher
Join Date: May 2018
Location: Dresden / Germany
Posts: 193
|
Quote:
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. |
|
14 August 2021, 23:44 | #1182 | |
aka (Cpt)JohnArcher
Join Date: May 2018
Location: Dresden / Germany
Posts: 193
|
Quote:
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? |
|
15 August 2021, 00:54 | #1183 |
Registered User
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) |
15 August 2021, 01:05 | #1184 | |
aka (Cpt)JohnArcher
Join Date: May 2018
Location: Dresden / Germany
Posts: 193
|
Quote:
to this Maybe this helps!? Last edited by Clydos; 15 August 2021 at 01:51. |
|
15 August 2021, 01:10 | #1185 | ||
aka (Cpt)JohnArcher
Join Date: May 2018
Location: Dresden / Germany
Posts: 193
|
Quote:
Quote:
|
||
15 August 2021, 01:14 | #1186 |
Registered User
Join Date: Dec 2013
Location: Auckland
Posts: 3,548
|
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. |
15 August 2021, 02:15 | #1187 | |||
Registered User
Join Date: Jun 2020
Location: Leeds, UK
Posts: 770
|
Quote:
Quote:
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:
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. |
|||
15 August 2021, 08:50 | #1188 |
Registered User
Join Date: Jul 2018
Location: Scotland
Posts: 852
|
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. |
15 August 2021, 10:11 | #1189 |
Registered User
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. |
15 August 2021, 16:56 | #1190 |
Registered User
Join Date: Apr 2019
Location: UK
Posts: 305
|
|
15 August 2021, 18:42 | #1191 |
Registered User
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. |
16 August 2021, 05:44 | #1192 |
Registered User
Join Date: Dec 2013
Location: Auckland
Posts: 3,548
|
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 |
17 August 2021, 00:08 | #1193 |
Registered User
Join Date: Dec 2013
Location: Auckland
Posts: 3,548
|
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. |
19 August 2021, 03:40 | #1194 |
Registered User
Join Date: Dec 2013
Location: Auckland
Posts: 3,548
|
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 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. |
19 August 2021, 12:44 | #1195 |
Registered User
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. |
19 August 2021, 13:32 | #1196 |
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! |
19 August 2021, 14:22 | #1197 |
Registered User
Join Date: Apr 2019
Location: UK
Posts: 305
|
|
20 August 2021, 01:08 | #1198 |
Registered User
Join Date: Dec 2013
Location: Auckland
Posts: 3,548
|
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. |
20 August 2021, 10:20 | #1199 |
Registered User
Join Date: Dec 2013
Location: Auckland
Posts: 3,548
|
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" |
20 August 2021, 11:00 | #1200 |
Ex nihilo nihil
Join Date: Oct 2017
Location: CH
Posts: 5,065
|
Oh kind of "case" condition. Great
|
Currently Active Users Viewing This Thread: 3 (0 members and 3 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 |
|
|