joeheader16
friendsoffortiesfive Aimoo Forum List | Ticket | Today | Member | Search | Who's On | Help | Sign In | |
friendsoffortiesfive > General > Games Go to subcategory:
Author Content
Zenith
  • Rank:Emerald
  • Score:89070
  • From:Canada
  • Register:07/31/2019 10:06 PM

Date Posted:02/05/2023 8:20 PMCopy HTML

CONCEIVE, BELIEVE, ACHIEVE!
Niceguy2 #1226
  • Rank:Diamond
  • Score:329800
  • From:USA
  • Register:01/12/2009 5:00 AM

Re:Game Code Development Area

Date Posted:06/20/2024 3:09 AMCopy HTML

Not yet.

Zenith #1227
  • Rank:Emerald
  • Score:89070
  • From:Canada
  • Register:07/31/2019 10:06 PM

Re:Game Code Development Area

Date Posted:06/20/2024 3:51 AMCopy HTML

Another way to make a folder in C:\ root is:

1: Click START button, lower left
2: Type  PROMPT in slot ...

A black window will pop up showing  C:\Users\Causey> 

3: Type  CD\ on the black window ...  You will now see  C:\>
4: Type  MD ICONS ...  You will now see  C:\>
5: Type EXIT to return to Windows

===========

To access ICONS folder:


1: Click START button, lower left

2: Type C:\ in slot.

You may need to press ENTER after : then type \

A bunch of Windows folders and files in C:\ will pop up alphabetically.

3:Open ICONS (double-click) and dump your icons in it.

===========

NOTES: If you give a hoot!


You may want a shortcut to ICONS on your desktop, or Work folder (right click stuff!!!).

FYI: MD means MAKE DIRECTORY in DOS language.

       CD means CHANGE DIRECTORY

       CMD also works instead of PROMPT

Zenith #1228
  • Rank:Emerald
  • Score:89070
  • From:Canada
  • Register:07/31/2019 10:06 PM

Re:Game Code Development Area

Date Posted:06/20/2024 2:03 PMCopy HTML

Edited #1227 for easier reading. 5 steps of easy English to make a folder. 2 steps to view folder.


How to dump?

CTRL+A>>CTRL+C>>CTRL+V ... all done!

Zenith #1229
  • Rank:Emerald
  • Score:89070
  • From:Canada
  • Register:07/31/2019 10:06 PM

Re:Game Code Development Area

Date Posted:07/04/2024 2:18 PMCopy HTML

Joe's introduction to FREEBASIC:

How to make OLD MAID auto-generated code.


(My Freebasic Proto has some unused pre-loaded code, and some debug code

that I left in, since it was only me looking at it before.)


If you check each line closely, you will probably get

the idea of what is happening.

============================================================


'oldmaid-maker V2.0
#lang "fblite"
'#include "dir.bi" '... req'd for LIST_FILES
'#include "vbcompat.bi" ' req'd for if exist

screen_choice%=15   '400x300 8x8
num_pages%=1
full_screen%=0
screen screen_choice%,,num_pages%,full_screen%
option gosub
OPTION ESCAPE  '  print !" \" as example"
'print !"testing print files \" prior "

defint a-Z

CR$=chr(13) '0D
LF$=chr(10) '0A
CRLF$=CR$+LF$
SP$=chr(32)
TB$=chr(9)
QT$=chr(34)

randomize timer
''==============================================================================
main:
gosub header
gosub process
print "FILE SAVED AS "+outfile$
gosub pause
end
''==============================================================================
header:
cls
locate 1, 1
color 10
print "*****************************************"
print "*      VORK'S OLD_MAID MAKER V2.0       *"
print "*****************************************"
print
color 7
return
''==============================================================================
check_quit:
color 7
print
input "Hit Q to Quit, ENTER to continue: ", contin$
if ucase(contin$)="Q" then system
goto main
end
''==============================================================================
pause:
color 7
print
input"Paused ... ENTER to continue: ",dummy$
return
''==============================================================================
write_buffer:
open "OM_out.htm" for output as #2
for i= 1 to len(buff$)
  a$=mid(buff$,i,1)
  print #2, a$;
next
close #2
return
''==============================================================================
html_start:
print #2, !"<div style=\"font-size: 14px; text-align: center;\">AUTO-GENERATED &#38; UNCHECKED</div><br />";
print #2, !"<div>";
print #2, !"<table style=\"line-height:0px;width:auto;border:7px solid #FFFF00;";
print #2, !"margin:0px auto;background-image:url('https://i.postimg.cc/vTRBJhRQ/blue-galaxy.jpg');";
print #2, !"padding:0px;border-spacing:20px;\"><tbody><tr><td>";
print #2, !"<table style=\"line-height:30px;width:473px;border:7px solid #FFFF00;";
print #2, !"margin:0px auto;background-color:#F0F0FF;font-family:arial;font-size:18px;";
print #2, !"text-align:center;color:#000066;padding:0px;border-spacing:0px;\">";
print #2, !"<tbody><tr><td style=\"border:3px solid #162b52;\"><p>&nbsp;</p><h2>** OLD MAID #"+NUMB$+" **</h2>";
print #2, !"<img src=\"https://i.postimg.cc/KYJ5g6wK/oldmaid300.jpg\"><p>&nbsp;</p><b>Take turns to delete a card.<br>";
print #2, !"A pic will show.<br>Old Maid wins!<br>Have fun!</b><p>&nbsp;</p></td></tr></tbody></table>";
print #2, !"<p>&nbsp;</p><table style=\"width:auto;line-height;0px;border:7px solid #FFFF00;";
print #2, !"color:#000066;margin:0px auto;background-color:#ffffff;padding:0px;border-spacing:0px;\">";
print #2, !"<tbody>";
return
''==============================================================================
html_td:
print #2, !"<td style=\"height:100px;width:75px;text-align:center;";
print #2, !"background-image:url"+bkg$;
print #2, !"\">";
print #2, !"<img src=\"https://i.postimg.cc/MpJtkb1G/back100.jpg\">";
print #2, !"</td>";
return
''==============================================================================
html_end:
print #2, !"</tbody></table></td></tr></tbody></table></div>"
return
''==============================================================================
''@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ *** process ***
''==============================================================================
process:
bkg$=""
input "Enter OM-game number: "; NUMB$
if NUMB$="" then NUMB$="XX"

outfile$="OM_"+NUMB$+".HTM"
n=int(rnd*36)+1
open outfile$ for output as #2
gosub html_start

for j=1 to 6
  print #2, "<tr>";
 
  for i=1 to 6
    c=6*(j-1) + i
    if c=n then
      bkg$="('https://i.postimg.cc/SxLdm2Gf/oldmaid100x.jpg')"   'old maid
    else
      bkg$="('https://i.postimg.cc/g0YDjzSF/fish100.jpg')"   'fish
    end if
    
    gosub html_td
  next
  print #2, "</tr>";
next

gosub html_end
close #2
return
''==============================================================================




You should be able to deduce that color 10 is green, and color 7 is gray.

When you see GOSUB it jumps to that name with a colon on the end.

When you see RETURN it goes back to where it came from.

CONCEIVE, BELIEVE, ACHIEVE!
Zenith #1230
  • Rank:Emerald
  • Score:89070
  • From:Canada
  • Register:07/31/2019 10:06 PM

Re:Game Code Development Area

Date Posted:07/04/2024 3:16 PMCopy HTML

Block-Art has similar layout but no backgrounds or foregrounds are put in, just a thousand TDs or so .... LOL.
CONCEIVE, BELIEVE, ACHIEVE!
Zenith #1231
  • Rank:Emerald
  • Score:89070
  • From:Canada
  • Register:07/31/2019 10:06 PM

Re:Game Code Development Area

Date Posted:07/04/2024 3:53 PMCopy HTML

Let's look art a small sub-routine.


pause:     'name of routine
color 7     'gray font
print         'blank line
input "Paused ... ENTER to continue: ", dummy$   'input waits for keyboard input ...

dummy$ is text variable that will never be used, and is the ENTER or whatever the user hit ...
return        ' ... since you go back one line after where the code called GOSUB pause.


Here it is called by MAIN: and END follows, so the program terminates after the input is put in,

but the code doesn't flash by at light speed and quit all without indicating it worked with

print "FILE SAVED AS "+outfile$

where

outfile$="OM_"+NUMB$+".HTM"


If NUMB$ is 56, put in by user, prog prints      FILE SAVED AS OM_56.HTM,

pauses to read it, and quits after ENTER or some string plus ENTER.

User want quick response, so omits the string!

CONCEIVE, BELIEVE, ACHIEVE!
Zenith #1232
  • Rank:Emerald
  • Score:89070
  • From:Canada
  • Register:07/31/2019 10:06 PM

Re:Game Code Development Area

Date Posted:07/04/2024 5:32 PMCopy HTML

FREEBASIC RANDOM NUMBERS:

Freebasic rnd produces a number between 0 and 0.99999999.

We can call that variable n, so n=rnd.


To get it to produce a number between 0 and 9.9999999 we multiply n by 10, like

n=rnd*10


To get it to drop the .9999999 we say n=int(rnd*10).

Now we have n= 0 to 9

int means give integer value, or drop the stuff after the dot.


To get it to produce a number n between 1 and 10 we add 1.

Finally,  n=int(rnd*10)+1


Put in MAX% as final number to get n = 1 to MAX%:

n=int(rnd*MAX%)+1

% signifies numeric variable, while $ signifies text variable.

defint a-Z means all single letter variables are integers, so n does not need %.

CONCEIVE, BELIEVE, ACHIEVE!
Zenith #1233
  • Rank:Emerald
  • Score:89070
  • From:Canada
  • Register:07/31/2019 10:06 PM

Re:Game Code Development Area

Date Posted:07/04/2024 6:08 PMCopy HTML

#@(<  off, Dave!
CONCEIVE, BELIEVE, ACHIEVE!
Niceguy2 #1234
  • Rank:Diamond
  • Score:329800
  • From:USA
  • Register:01/12/2009 5:00 AM

Re:Game Code Development Area

Date Posted:07/05/2024 3:36 AMCopy HTML

#@(<  off, Dave!


Zenith #1235
  • Rank:Emerald
  • Score:89070
  • From:Canada
  • Register:07/31/2019 10:06 PM

Re:Game Code Development Area

Date Posted:07/06/2024 4:48 PMCopy HTML

PLAIN ENGLISH "GOLD_MINER AUTO-CODE":
=====================================

Code is read from top to bottom, with jumps to sub-routines inserted.

At the top I set up my Freebasic IDE for screen size, language version, and other required and desired initial stuff, like whether arrays start with index=1 or index=0.

The prog asks for a game number.

I make an empty array with 60 holes to put a number (columns 10 x rows 6 = 60).
The holes will be what is in the TDs, initialized with 0.

I get 15 random numbers from 1 to 60 and use them as array indexes and change the 0 to the rand num,
so the hole for TD-25 (or whatever) gets 25 put in.

I print out a copy of the HTML code right down to, but excluding first row TR [HTML-START:]

For the <tr><td> portion I have subroutines for whether to put in a [NUGGET:] or [NONE:].
If the array for current TD has 0, I choose the NONE:, otherwise the NUGGET:.
So HTML-MID: puts the TR and 10 TDs in, then \TR, 6 times, using the 60 array numbers.

Then I run a copy of table-closing code [HTML-END:].

The whole crapload churns out a file based on the game number I had to put in.
====

Ok ... Freebasic routine to ask for game number:
''==============================================================================
get_game_num:                   'sub-routine name
input "Enter Game Number: ";g$  'g$ will hold text input
if g$="" then g$="XXX"          'if no num use XXX
print "Game Num = "+g$          'verify num
print                           'blank line
return                          'go back
''==============================================================================
''The last part of my PROCESS: routine,(called by MAIN:) where it prints out the game

gosub get_game_num              'it is stuck inside text variable g$
outfile$="gmine-"+g$+".htm"     'concoct a name using g$ [ie gmine-69.htm]
open outfile$ for output as #3  'give output file name a nickname of #3
gosub htm_start                 'print out all the ho-hum start code
gosub htm_mid                   'print out the processed rows and columns with rands in there
gosub htm_end                   'stick ho-hum table closing code on.
close #3                        'turn off outputting to the nickname
print "Check "+outfile$         'tell user which file to look in for new game.
return                          'go back to MAIN: and quit.
''==============================================================================


That effin' Dave must be deaf, boyz!

CONCEIVE, BELIEVE, ACHIEVE!
Niceguy2 #1236
  • Rank:Diamond
  • Score:329800
  • From:USA
  • Register:01/12/2009 5:00 AM

Re:Game Code Development Area

Date Posted:07/07/2024 4:25 AMCopy HTML

Its All Greek To Me Confused GIF - Its All Greek To Me Confused I Dont Know  - Discover & Share GIFs

Niceguy2 #1237
  • Rank:Diamond
  • Score:329800
  • From:USA
  • Register:01/12/2009 5:00 AM

Re:Game Code Development Area

Date Posted:07/07/2024 4:27 AMCopy HTML

Γεια σου Dave, δεν μπορώ να διαβάσω ελληνικά. 

Zenith #1238
  • Rank:Emerald
  • Score:89070
  • From:Canada
  • Register:07/31/2019 10:06 PM

Re:Game Code Development Area

Date Posted:07/07/2024 1:35 PMCopy HTML

OK .. English only:


Push WINDOW key on keyboard.

Type                              PROMPT [enter] ... the ENTER key

On black screen type        CD\  [enter]

On black screen type        MD ICONS  [enter]

On black screen type        EXIT [enter]

Zenith #1239
  • Rank:Emerald
  • Score:89070
  • From:Canada
  • Register:07/31/2019 10:06 PM

Re:Game Code Development Area

Date Posted:07/07/2024 1:41 PMCopy HTML

Please advise me when the above is done.

Then I will explain how to use the results.


Niceguy2 #1240
  • Rank:Diamond
  • Score:329800
  • From:USA
  • Register:01/12/2009 5:00 AM

Re:Game Code Development Area

Date Posted:07/07/2024 6:07 PMCopy HTML

Will do.  I'm all out of time now, though.  Got to run.

Zenith #1241
  • Rank:Emerald
  • Score:89070
  • From:Canada
  • Register:07/31/2019 10:06 PM

Re:Game Code Development Area

Date Posted:07/19/2024 4:19 AMCopy HTML

Joe:

It should take less than a minute to type the 5 words.


Press Window Key ... then type PROMPT


CD\

MD ICONS

EXIT

CONCEIVE, BELIEVE, ACHIEVE!
Copyright © 2000- Aimoo Free Forum All rights reserved.
Skin by SandhillsDebby - Elements from DivaAmyMarie.blogspot.com