|
Post by johnno56 on Nov 9, 2020 6:49:36 GMT -6
Quick question. Is everyone able to let me know your screen's max resolution? At the moment, the Trek game, is 1024x768. I would like to try a larger size but I need to know the limits of your screens.
|
|
|
Post by tbird on Nov 9, 2020 7:23:38 GMT -6
My dev machine is 1366x768, my gaming laptop is 1920x1080.
|
|
|
Post by johnno56 on Nov 9, 2020 8:24:56 GMT -6
Cool. Thanks for the info.
|
|
|
Post by n00b on Nov 9, 2020 13:31:39 GMT -6
tbird's solutions are what I would do as well. PrintS, InputS, and ZoneInputS should really only be used for debugging purposes or to experiment. They were features I decided to include because SDLBasic has them but I honestly wouldn't even suggest using them in SDLBasic.
|
|
|
Post by johnno56 on Nov 9, 2020 15:11:07 GMT -6
Ok. Debugging purposes. Cool.
|
|
|
Post by johnno56 on Nov 10, 2020 19:47:41 GMT -6
I have updated the "login" for the game. Previous login link has also been updated.
|
|
|
Post by tbird on Nov 10, 2020 20:14:17 GMT -6
Still cool, but slightly disappointed that it ends so quick lol. It's like yay! I'm signing in to star trek data base T-bird is gonna get his phaser and torpedo on then blip...its gone...fantasy over.
Sorry for the drama, I like the login screen. Can't wait to see whats next.
|
|
|
Post by johnno56 on Nov 11, 2020 6:38:18 GMT -6
"Can't wait to see what's next?" Ha. Me too... lol Been working on a 'frame' for the 'screens'. Not sure if I will stick with the design... But it's a start. I am going to attempt having most stuff on the screen. Three main screens; Command buttons and a spot for maybe a numerical pad for entering co-ords etc. Still trying to figure out how to code it all... I think I will continue in the morning...
|
|
|
Post by n00b on Nov 11, 2020 15:17:35 GMT -6
The log-in screen on this is awesome. I really like the sound effects. I am looking forward to seeing this when its finished.
|
|
|
Post by tbird on Nov 6, 2023 16:32:57 GMT -6
To inspire a super star trek reboot lol, Im bumping this thread I forgot all about this awesome login....and it inspired me to write a simple text scroller, just using variables no canvas offsets.
'Simple Text Scroller DIM theWinMode : theWinMode = WindowMode(1,0,0,0,1) WindowOpen(0, "Text Scroller", WINDOWPOS_CENTERED, WINDOWPOS_CENTERED, 800, 600, theWinMode, 1) CanvasOpen(0, 800, 600, 0, 0, 800, 600, 1)
SetColor(RGB(100, 250, 250)) LoadFont(0, "xirod.ttf", 20)
DIM consoleX : consoleX = 25 DIM consoleY : consoleY = 270 DIM scrollMod : scrollMod = 0
DIM scrollTextPosX : scrollTextPosX = 30 DIM scrollTextPosY[25] DIM text$[25] DIM drawPos : drawPos = 0
For s = 0 To 24 scrollTextPosY[s] = consoleY + s * 25 Next For t = 0 To 24 text$[t] = " " Next
text$[0] = "Photon Torpedo Ready" text$[1] = "Photon Torpedo Fired" text$[2] = "Shields Down To 87%" text$[3] = "Boarding Party Ready" text$[4] = "Shields Down To 80%" text$[5] = "Enemy Shields Down" text$[6] = "Klingons Detected" text$[7] = "Sensors Damaged" text$[8] = "Phasers Recharged" text$[9] = "Phasers Fired" text$[10] = "Engaging Klingons" text$[11] = "Boarding Party Sent"
While WindowExists( 0 ) ClearCanvas() Box(consoleX, consoleY, consoleX + 400, consoleY + 200) For t = 0 To 24 drawPos = scrollTextPosY[t] + scrollMod If drawPos <= 470 - 25 And drawPos >= 270 Then DrawText(text$[t], scrollTextPosX, scrollTextPosY[t] + scrollMod) End If Next If Key(K_UP) Then scrollMod = scrollMod - 0.4 ElseIf Key(K_DOWN) Then scrollMod = scrollMod + 0.4 End If Update() Wend
Attachments:xirod.ttf (67.38 KB)
|
|
|
Post by n00b on Nov 6, 2023 19:04:03 GMT -6
This is cool but its kinda jerky the way the text pop in and out when scrolling. This is definitely something I would do with Canvas Offset.
This is the same demo but using canvas offset. It scrolls a lot smoother.
'Simple Text Scroller DIM theWinMode : theWinMode = WindowMode(1,0,0,0,1) WindowOpen(0, "Text Scroller", WINDOWPOS_CENTERED, WINDOWPOS_CENTERED, 800, 600, theWinMode, 1) CanvasOpen(0, 800, 600, 0, 0, 800, 600, 1) SetColor(RGB(100, 250, 250)) LoadFont(0, "xirod.ttf", 20) DIM consoleX : consoleX = 25 DIM consoleY : consoleY = 270
DIM text$[25]
text$[0] = "Photon Torpedo Ready" text$[1] = "Photon Torpedo Fired" text$[2] = "Shields Down To 87%" text$[3] = "Boarding Party Ready" text$[4] = "Shields Down To 80%" text$[5] = "Enemy Shields Down" text$[6] = "Klingons Detected" text$[7] = "Sensors Damaged" text$[8] = "Phasers Recharged" text$[9] = "Phasers Fired" text$[10] = "Engaging Klingons" text$[11] = "Boarding Party Sent"
CanvasOpen(1, 800, 800, consoleX, consoleY, 400, 200, 1) Canvas(1)
For t = 0 To 11 DrawText(text$[t], 2, t*25) Next
dim offset_y
While WindowExists( 0 ) Canvas(0) ClearCanvas() Rect(consoleX, consoleY, 400, 200)
If Key(K_UP) Then if offset_y > 0 then offset_y = offset_y - 1 end if SetCanvasOffset(1, 0, offset_y) ElseIf Key(K_DOWN) Then if offset_y < (11*25) then offset_y = offset_y + 1 end if SetCanvasOffset(1, 0, offset_y) End If
Update() Wend
|
|
|
Post by tbird on Nov 6, 2023 20:07:15 GMT -6
n00b, I agree that part annoyed me and I knew offsetting the canvas would be the answer, see johnno56 no excuses now the project may continue lol
|
|
|
Post by johnno56 on Nov 7, 2023 2:06:16 GMT -6
Both scrolling examples are a "far cry" from my feeble efforts. Thanks guys! I cannot believe it has been 3 years (almost 4) since creating the "frame". I will do as tbird suggests and post what I have done so far...
|
|