Author Topic: Quest for Ladida  (Read 8177 times)

0 Members and 1 Guest are viewing this topic.

Offline Adrian

  • Newbie
  • Posts: 39
    • View Profile
Quest for Ladida
« on: February 16, 2021, 12:59:29 am »
Thanks everyone for your comments on my game!

I've added the following as a result of the comments:
1. Color
2. Music
3. More hints

Windows build and source code attached.
quest for ladida.jpg
 

« Last Edit: February 16, 2021, 08:10:39 am by Adrian »

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: Quest for Ladida
« Reply #1 on: February 16, 2021, 12:33:39 pm »
Color usually good, how about different fonts overlaying a screen image of the land of la-di-da :) or image of that mean old and nasty Sphinx. ;-))

Offline Adrian

  • Newbie
  • Posts: 39
    • View Profile
Re: Quest for Ladida
« Reply #2 on: February 16, 2021, 12:45:45 pm »
Color usually good, how about different fonts overlaying a screen image of the land of la-di-da :) or image of that mean old and nasty Sphinx. ;-))

haha.....good suggestions bplus, thanks! wanted to do text-only to save time but of course images can be added :)

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: Quest for Ladida
« Reply #3 on: February 16, 2021, 12:57:47 pm »
Text only can still be jazzed up like with Music background as you mention, so too Image Background.

You might like Steves fancy Ole English font, I think it fits your game. I can't remember if that's in Windows or...

Check out @SMcNeill's recent (Jan?) Calendar.

Is every newbie going to start a new thread when they modify a couple of lines in their game or other code? LOL

I love seeing how games or code evolves, looking at the start of the thread and looking a couple pages down maybe a year later, usually a beautiful sight and evidence of progress (or not).

Offline SMcNeill

  • QB64 Developer
  • Forum Resident
  • Posts: 3972
    • View Profile
    • Steve’s QB64 Archive Forum
Re: Quest for Ladida
« Reply #4 on: February 16, 2021, 01:56:01 pm »
https://github.com/SteveMcNeill/Steve64 — A github collection of all things Steve!

Offline Adrian

  • Newbie
  • Posts: 39
    • View Profile
Re: Quest for Ladida
« Reply #5 on: February 16, 2021, 02:19:26 pm »
Thanks guys!

Something like this?

Now to figure out how to put it into the program....lol.

Quest for Ladida 1067x800 JPG.jpg
* Quest for Ladida 1067x800 JPG.jpg (Filesize: 225.48 KB, Dimensions: 1067x800, Views: 253)

Offline SMcNeill

  • QB64 Developer
  • Forum Resident
  • Posts: 3972
    • View Profile
    • Steve’s QB64 Archive Forum
Re: Quest for Ladida
« Reply #6 on: February 16, 2021, 02:49:39 pm »
Thanks guys!

Something like this?

Now to figure out how to put it into the program....lol.

A quick tutorial on using OLDENGL.ttf.  (Download from the link above if it's not on your machine -- it's included with WORD, so if you use it, it should already be on your system.)

Code: QB64: [Select]
  1. SCREEN _NEWIMAGE(1024, 720, 32) '720p screen, which is standard for most things I do
  2. font_name$ = "OLDENGL.ttf" 'Don't forget the path, if necessary!
  3. font_size = 32
  4. font_style$ = "" 'Unless we just HAVE to, we don't want Old English to be a monospaced font.
  5. '                 Remember this distinction, as it CAN affect which commands are available for us to use.
  6. 'font_style$ = "MONOSPACE" ' <-- IF we have to have it monospaced, we can use this, but I don't recommend it.
  7.  
  8. font_handle = _LOADFONT(font_name$, font_size, font_style$) 'get a handle for the font, with size and style set
  9. _FONT font_handle 'swap to that font handle
  10.  
  11. PRINT "Hello World" 'print something to the screen.
  12.  
  13. 'Now, the one important note when dealing with non-monospaced fonts is with the following:
  14. LOCATE 10, 100: PRINT "10-100"
  15. 'If you look at your screen, you'll see that we're NOT 100 characters right of the screen.
  16. 'Since we don't know exactly how wide any one character is going to be, we LOCATE row, PIXEL instead.
  17. 'The 10, 100 in the above says LOCATE "10 rows down, 100 pixels right"
  18.  
  19. PRINT "Font Width: "; _FONTWIDTH
  20. 'Also notice that the above will give us a fontwidth of 0.  This is because, once again, we're NOT using
  21. 'a monospaced font.  We're using a variable width font, so there's no standard font width to apply.
  22. 'Instead, use _PRINTWIDTH to calculate how much screen space your text is going to use.
  23.  
  24. PRINT "Hello World "; _PRINTWIDTH("Hello World ")
  25. PRINT "I eat Cheese"; _PRINTWIDTH("I eat Cheese")
  26.  
  27. 'Now, as you can see from the above, those two lines have the same number of characters, but each takes up
  28. 'a different amount of space to print to.
  29.  
  30. 'Now, press any key to see what happens when we DO use monospace with OLDENGL.ttf
  31.  
  32.  
  33. font_style$ = "MONOSPACE" ' <-- IF we have to have it monospaced, we can use this, but I don't recommend it.
  34.  
  35. font_handle2 = _LOADFONT(font_name$, font_size, font_style$) 'get a handle for the font, with size and style set
  36. _FONT font_handle2 'swap to that font handle
  37. _FREEFONT font_handle 'free the old font to release it from memory
  38. COLOR _RGB32(255, 0, 0) 'red text to make the comparison very visible
  39. LOCATE 2, 1
  40. PRINT "Hello World" 'print something to the screen.
  41.  
  42.  
  43. LOCATE 10, 10: PRINT "10-10"
  44. 'No issue with LOCATE like normal.  It's row, column just like usual, but look at how the font looks.
  45. 'YUCKY!!
  46.  
  47.  
  48. LOCATE , 10: PRINT "Font Width: "; _FONTWIDTH 'here we can get our fontwidth, as all characters are the same size.
  49.  
  50. LOCATE , 10: PRINT "Hello World "; _PRINTWIDTH("Hello World ") 'as we can see from these.
  51. LOCATE , 10: PRINT "I eat Cheese"; _PRINTWIDTH("I eat Cheese")
  52.  
  53. _FONT 16 'back to the default font
  54. _FREEFONT font_handle2 'free the monospaced font I used above
  55. COLOR _RGB32(255, 255, 0) 'Yellow for the finish!
  56. LOCATE 30, 1: PRINT "That's all folks!"
  57.  

Also highlights the difference in MONOSPACE style and NON-MONOSPACE.  For OLDENGL.ttf, I recommend to *not* use monospacing, as it tends to stretch the spaces out to an insane level for the majority of the letters. 
« Last Edit: February 16, 2021, 02:54:21 pm by SMcNeill »
https://github.com/SteveMcNeill/Steve64 — A github collection of all things Steve!

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: Quest for Ladida
« Reply #7 on: February 16, 2021, 03:06:59 pm »
Thanks guys!

Something like this?

Now to figure out how to put it into the program....lol.

Oh man! Exactly how I pictured it except for font radiating hazy golden beams. :)

"Now to figure out how to put it into the program."
Wait... how did you get the screenshot? You telepathically photographed my brain?
« Last Edit: February 16, 2021, 03:09:30 pm by bplus »

Offline SMcNeill

  • QB64 Developer
  • Forum Resident
  • Posts: 3972
    • View Profile
    • Steve’s QB64 Archive Forum
Re: Quest for Ladida
« Reply #8 on: February 16, 2021, 03:31:06 pm »
Oh man! Exactly how I pictured it except for font radiating hazy golden beams. :)

"Now to figure out how to put it into the program."
Wait... how did you get the screenshot? You telepathically photographed my brain?

I was betting it was an issue with font sizing and positioning, which is why I tried to illustrate the differences in monospace vs non-monospace above.  ;)
https://github.com/SteveMcNeill/Steve64 — A github collection of all things Steve!

Offline Adrian

  • Newbie
  • Posts: 39
    • View Profile
Re: Quest for Ladida
« Reply #9 on: February 16, 2021, 08:15:04 pm »
Haha, it wasn’t a screenshot, bplus. I edited the image with an image editor and inserted the text (using Steve’s Olde English Font). Getting the image onto the screen in the QB64 program, which should be fairly trivial, is my problem. Need to study QB64 commands more assiduously. Thanks Steve for the fonts tutorial. :)
« Last Edit: February 16, 2021, 09:25:39 pm by Adrian »

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: Quest for Ladida
« Reply #10 on: February 17, 2021, 12:27:39 am »
Quote
Getting the image onto the screen in the QB64 program, which should be fairly trivial, is my problem.

No problem,
* Ladida.zip (Filesize: 225.95 KB, Downloads: 188)

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: Quest for Ladida
« Reply #11 on: February 17, 2021, 12:47:34 am »
Do you have the image before you printed on it?

Offline Adrian

  • Newbie
  • Posts: 39
    • View Profile
Re: Quest for Ladida
« Reply #12 on: February 17, 2021, 01:59:40 am »
No problem,

Thanks B+ !

I did try that, and got a similar error message.


Clipboard01.jpg
* Clipboard01.jpg (Filesize: 147.79 KB, Dimensions: 1920x1080, Views: 217)

Offline Adrian

  • Newbie
  • Posts: 39
    • View Profile
Re: Quest for Ladida
« Reply #13 on: February 17, 2021, 02:04:01 am »
Do you have the image before you printed on it?

Yes.
Ladida 960x720.jpg
* Ladida 960x720.jpg (Filesize: 546.2 KB, Dimensions: 960x720, Views: 225)

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: Quest for Ladida
« Reply #14 on: February 17, 2021, 02:16:45 am »
Thanks B+ !

I did try that, and got a similar error message.

I will bet real money you don't have a bullet next to "Output Exe to Source Folder" under the Run menu.
Click that line or make sure bullet on the left. Image files in source folders will never be found unless you have that clicked. QB64 would be looking in same folder as itself for those images.