+- +-

User

Welcome, Guest.
Please login or register.
 
 
 

Login with your social network

Forgot your password?

Stats

Members
Total Members: 8
Latest: Dilamon Saravi
New This Month: 0
New This Week: 0
New Today: 0
Stats
Total Posts: 146
Total Topics: 52
Most Online Today: 2
Most Online Ever: 303
(September 12, 2023, 04:34:39 pm)
Users Online
Members: 0
Guests: 8
Total: 8

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - MR. Y

Pages: [1] 2 3
1
General Discussion / Reading, Decoding and Puzzle games
« on: June 10, 2012, 01:50:00 am »
Here is an amazing demo about the brilliance of our human brains

ALL we need is the FIRST and LAST letter of each word!!!!!!
Use this to invent new games and puzzles!


dslyexia to a new lveel,


I cdnuolt blveiee taht I cluod aulaclty uesdnatnrd waht I was rdanieg. The phaonmneal pweor of the hmuan mnid. Aoccdrnig to a rscheearch at Cmabrigde Uinervtisy, it deosn't mttaer inwaht oredr the ltteers in a wrod are, the olny iprmoatnt tihng is taht the frist and lsat ltteer be in the rghit pclae. The rset can be a taotl mses and you can sitll raed it wouthit a porbelm. Tihs is bcuseae the huamn mnid deos not raed ervey lteter by istlef, but the wrod as a wlohe. Amzanig huh? yaeh and I awlyas thought slpeling was ipmorantt.

2
Tutorials / Re: Topic: more on Graphics: 3-D
« on: May 21, 2012, 04:22:02 pm »
Don't worry abt that!
Someone will tell 'em sooner or later and their silliness will stop.
(Actually qb64 is a threat as it is far better than their junk - for example always works versus "sometimes")

3
Tutorials / Re: Topic: more on Graphics: 3-D
« on: May 21, 2012, 02:12:06 pm »
Yes, no need for all 3 ideas at once

For finest resolution (and speed) do not show size the way done in the above example (coiled coils are very slow)
For smoothness colour-code for depth with GRADUAL and prpportional colour changes
Instead of jumping between two views a smooth change of eye-position can be used.
Just use the ideas best for YOU in YOUR program

4
BASIC board / A Xylophone or Guitar from your keyboard
« on: May 20, 2012, 02:24:26 am »
In QB64 you can make very realistic sounds.
Decide which instruments you want and form an orchestra!

But to start simply here is a xylophone
You have decided (see code below) which keys (\,a,z,s.......;,/)
play which notes.
Yes (but not this demo) you can play chords and change between wind, stringed, percussion and other instruments (timbre, overtones, transients, decay rates)

Just get the hang of it here and come back with your ideas!

Download qb64 and run this program:
Code: [Select]
CONST Pi = 3.14159265358979
_DELAY 0.5
'time (in seconds)
'a$ = INKEY$: IF a$ = "" THEN GOTO nxt
nxt:

DO
    nx: t = 0
    a$ = INKEY$: IF a$ = "" THEN GOTO nx 'INPUT p
    IF a$ = "\" THEN p = -9
    IF a$ = "a" THEN p = -8 'b
    IF a$ = "z" THEN p = -7
    IF a$ = "s" THEN p = -6 'b
    IF a$ = "x" THEN p = -5
    IF a$ = "d" THEN p = -4.5
    IF a$ = "c" THEN p = -4
    IF a$ = "f" THEN p = -3 'b
    IF a$ = "v" THEN p = -2
    IF a$ = "g" THEN p = -1 'b
    IF a$ = "b" THEN p = 0
    IF a$ = "h" THEN p = 1 'b
    IF a$ = "n" THEN p = 2
    IF a$ = "j" THEN p = 2.5
    IF a$ = "m" THEN p = 3
    IF a$ = "k" THEN p = 4 'b
    IF a$ = "," THEN p = 5
    IF a$ = "l" THEN p = 6 'b
    IF a$ = "." THEN p = 7
    IF a$ = ";" THEN p = 8 'b
    IF a$ = "/" THEN p = 9
    a$ = ""

    DO WHILE _SNDRAWLEN < 1
            'this sets the overtones and their decay rates

        F = EXP(-t) * COS(t * 2 * Pi * freq(p))
        A = (1 / (4.5 * (t))) * COS(t * 2 * Pi * freq(p + 6 * 2.76))
        c = (1 / (5 * (t))) * COS(t * 2 * Pi * freq(p + 6 * 5.4))
        e = (1 / (6 * (t))) * COS(t * 2 * Pi * freq(p + 6 * 8.9))


        value = 0.125 * (F + A + c + e) ' this volume-adds them

        'Queue the value to be played
        _SNDRAW value

        t = t + 1 / _SNDRATE
    LOOP

    _LIMIT 10

LOOP 'WHILE t < 1

'Wait for sound buffer to empty
DO: LOOP WHILE _SNDRAWLEN
GOTO nxt

'Returns the frequency (in Hz) of the desired note
'measured in semitones from A440 (that's A above middle C)
'A above middle C is 0, A# is 1, B is 2, C is 3, etc.
'Middle C is -9
FUNCTION freq# (note AS DOUBLE)
freq = (2 ^ (note / 12)) * 440
END FUNCTION

5
General Discussion / How I made my very first Game
« on: May 20, 2012, 01:18:31 am »

I wanted to write a game.
But soon found that all a computer could DO was write idiot things like "Hello World" on the screen.

So given a computer HOW do we get it to do something that helps ME!

Well for weeks I was disillusioned.
But one day, idly, I made it write Hello world so many time it filled the screen and I noticed it then "jumped up one"
And it still did that whatever I told it to print
So I told it to print I a hundred times, each on a new line (PRINT "I")
This gave me a vertical line
Big deal!

So I moved the I a bit (Print " I", Print " I", and so on)
A wiggly line.
Not much use, eh

But TWO wiggly lines?
They are the edges of a RACE TRACK
which "Moves up" each time a new line is "added"

OK, so we need a car
My car was done like this
llll
llll
llll
and I started with it between the edges of my racetrack

I found I had WRITTEN a program!
Here the car is at the top of the screen and "moves down the track because the track edges move up!

To STEER the car I had to insert spaces before it to move it Right (or after it to move it Left)

HOW you do this really DOES NOT MATTER.
In fact I ended up using the keyboard keys L and R.
You can use the "arrows" if you look up a bit of jargon (i.e. what "codes" they use).

You can also make a far better car, and the colours you want.

Anyway the car "proceeds down the wiggly track"
(use RND to wiggle the track)
Soon it collides with the track edge.
Count how many times and you have both a score, a winner and a record score ever

By now I hope you are getting the idea and at least SOME of all that jargon code (in whatever language) is starting to make sense.

I suggest using QBAS, because it is "almost English" which means you can get help about it from a friend or parent. They can read your program and almose see what it is doing.

Unfortunately, Bill Gates, in one of his bodge "improvements" (this one called SP2) managed to STOP most people using QBAS. (I managed to defeat him.)
If he stops you then use QB64 - a free download that Google Search knows all about.
QB64 is very much faster than QBAS. Better.
"More powerful" - good luck with finding out what that actually means.

Having now written your first game, write to us here and tell us how it turned out and all your ideas for better games.

6
General Discussion / Have Fun experimenting with Mapping
« on: May 19, 2012, 01:11:53 pm »
When a flea hops, where he lands depends where he hopped from.
YOU can make up the rules!
It is fun because this way you can draw his tracks on the screen as fabulous coloured patterns.

For thousands of years everyone "knew" (it was "obvious") that simple mappings (hopping rules) give simple patterns (maps)

A very few people knew otherwise, but were ridiculed.
Then, surprisingly recently, it was discovered that even the SIMPLEST hopping rule can give results that are UTTERLY UNPREDICTABLE long term.
Where you will end up is fixed (predestined) but the ONLY way to find out is to take ALL the jumps and see!

For example  think of a flea hopping along a line.
He is now at position 0.6
He has an amount of energy we will call 1 (or 100%).
This would be enough to hop  from 0.6 to 2.4 (increasing his distance by 4 times)
But to get to 0.6 he used some of his energy, leaving him with only 1-.6 = .4

So his next position is 0.6 times 4 times (1- 0.6), which is 0.96
His next hop now takes him to 0.96 times 4 times (1-.96)
And so on.......

It is a bit like an animal population (rabbits) that would quadruple each year but cannot do that because there is not enough food.

The interersting thing is this ever-so-simple rule next x=4x(1-x) gives results that NEVER repeat!

One of the first games I ever wrote was like this.
I had fish and plants in a tank
The fish eat the plants and the plants give the oxygen needed by the fish.
So the fish population goes up and down (often while the plant population goes down and up - but not always!)
I called this the "Fish Oscillator" for it was spectacularly unpredictable.

You can do the same thing using a flea that hops horizontally (x) on the screen as well as vertically (y)
Start him at x=0.1, y=0.31 and use the mapping hop rules
next x=4x(1-x)
next y=4y(1-y)
You will eventually get the whole screen chaotically filled with flea-landings.

But now try not a 4 times growth but a growth between 3 and 4
Now VERY strange things happen! Not always chaos!

7
General Discussion / Re: let's get something straight here...
« on: May 19, 2012, 12:21:25 pm »
Yes it is a message from your forum!
A would-be poster is asking for your advice

HOW does he send you a PM - it nowhere says how
In what manner is a PM different of better or less confusing.

Sorry if I "did it wrong"
Your advice where and how (under what heading or topic) to post this would be very much appreciated and not only because it is your site.
I don't want to post just to please myself - I want to help you Attract valuable and helpful new members.

8
Your Projects / Re: my text adventure
« on: May 18, 2012, 05:13:04 am »
We are trying to get new people with ideas.
If you say "Copy this into qbas" then that is fine and is English (and they can get help from normal people, friends and parents)
If you just "throw a "codebox" at them, we may drive away folk for whom codebox is jargon
I try never to use jargon if I can say it in simple English

9
Ideas / Re: The game of Bagatelle
« on: May 18, 2012, 05:03:39 am »
The people hundreds of years ago (thousands?) were VERY smart
Those who never played bagatelle missed a lot of FUN - only slightly revisited in recent games like Pinball.

The whole thing is fascinating.
For a ball will rattle safely down a sloping U-section valley (child's slide), while a togoggan on the Creata Run will also survive PROVIDED the errors do not take it higher than the walls!

So the two things are utterly different:-
!. How safely CONSTRAINED you are for SMALL errors (e.g of calculation)
2. How BIG an error and you fly off over the side!

In the game of bagatelle there is always another pin to bounce off if you miss one!
But in other cases (Pascal's Triangle) there may not be.
Even in Bagatelle you CAN (and do rarely) escape (the same way you got in: by chance!)

It would be FUN to know how LONG you are likely to remain inside the ring. This depends how SMALL is the gap between pins through which the ball, diameter D, must pass.

I can write a programme that calculates this.
BUT
The errors (of computation) grow - each one an increase of the earlier error - until the result is meaningless! Indeed, eventually you get out but NOT EVEN between the correct two pins!

The "whole new interesting thing" is this:-
WHY are some problems not calculable due to error growth
HOW to tell if your problem DOES forgive errors and how BIG an error will be forgiven?
The best idea is to think of the U-section slide and find the answers by experimental trials.

10
Ideas / Re: IDEAS
« on: May 12, 2012, 03:32:40 pm »

even though he's 11  (about 4 years younger than i am)........


11
Ideas / The game of Bagatelle
« on: May 12, 2012, 12:30:46 pm »
Here is a CHALLENGE for all of you!
I love the game of Bagatelle for here the ball bounces crazily around inside a ring of posts. Its path is utterly PRE-DESTINED yet CANNOT be predicted!
Suddenly it will escape, totally unexpectedly and nobody can foretell when or where.


In this game we have say 39 perfectly elastic immovable posts hammered vertically into a smooth horizontal plane
They are equally spaced on a circle each 1" apart from 2 closest-neighbours
Each post is 0.1" diameter
So between the gaps between posts a 0.8* diameter ball COULD pass.

But our ball is frictionless, perfectly elastic and 0.75" diameter.
We start it rolling within the circle of posts in no specially-chosen way.

Let V(n) be the name of the portion of the path that starts at the nth collision and ends at the next collision.

I maintain there is no formula for V(n)
The path is soon chaotic and the place and time of escape is not computable.

The only way to find out is to actually compute the path impact after impact in turn, from the beginning.
And no computer is accurate enough for that!
For the "bounce off" new direction depends CRITICALLY on where on the post the ball strikes. And that depends SUPER-critically on where the PREVIOUS path began and its direction.
It is a nightmare of chaos and instability. Like a house of cards built with each card more wobbly than the previous card.

The bouncing from convex and concave mirrors is especially interesting in the deign of LASERS, image-producing optics and paths (numbers) that are as near as is possible to "random"

In fact the only situations that any computer can predict are limited to those where the situation is STABLE. Otherwise the smallest errors get magnified and the results soon meaningless. (Soon means after a dozen or few dozen calculations).
But if the situation is STABLE the errors can get corrected - like a ball rattling down a U-section slide or down a valley.


12
Ideas / Re: IDEAS
« on: May 10, 2012, 10:02:08 am »
Thanks Axylon. Your site is GREAT for it has high potential - far above the "code only" sites.
Yes of course we want to encourage those already skilled enough to write in Basic, C** etc but we ALSO want to encourage and "light the fire" in those that have iDEAS but do not know where to start

As for me, I don't even know how to "take a screenshot" (What I mean is my brain is full up and I prefer to leave space for new ideas rather than remembering arbitrary syntax).

I am trying hard to get my Grandson Harvey to join and  he is 4 years younger than you so BOTH OF YOU are exactly the right "ideas" age to get a GREAT site running!

13
Your Projects / Re: my text adventure
« on: May 09, 2012, 09:19:33 am »
as I did say "Run this in QBAS"
QB64 runs it way too fast and you need to learn all about "loops" to slow it down!

14
Ideas / IDEAS
« on: May 07, 2012, 01:55:42 pm »
A place on this site for IDEAS

IDEAS (what you want to do) are far far more important and alive than the mere means (programs, tools) to do them.

This site could be the first to discuss ideas more than the mere tools that might do them!
It would be the place to FIND OUT what really interests users most - the games and other things they WISH existed.
Given THAT, we can start creating them!

So send in your ideas - as detailed as possible. Not just "An exciting game" but one that IS exciting BECAUSE of the ideas you have imagined and told us about are making things happen the way you hoped!

15
Here is a little prog that is a word adventure with a little graphics

It foretells the end of the world.

The nice thing is the words are so easily changed to whatever you want!
So you can have fun there.
Also the only thing needed for the graphics is every heavenly body accelerates as the mass of the nearby bodies divided by distance squared.
So you can try other gravity rules if you like!
And it ends in a ginormous explosion (end of the world) which you can design yourself!

This prog should be run on plain old QBAS
Run it on QB64 and you will need to slow it down enough to read the comments. All good practice at seeing that you CAN change what a prog does and how fast it does it.

Copy this into a prog that runs QBAS and hit run:


Code: [Select]
CLS
SCREEN 12
DIM m$(40)
VIEW (0, 0)-(639, 479)
WINDOW (-5, -5)-(5, 5)
RANDOMIZE TIMER
FOR x = 1 TO 500
PSET (10 * RND - 5, 10 * RND - 5), 7
NEXT
PSET (0, 0), 14
i = 0: n = -1: iseen = 10000: da = 1: db = 1: dc = 1: colb = 2

REM orbits of heavenly bodies.  Names are a, b, c, ..........
REM a has mass 10 and starts at x=0, y=0, vx=0, vy=0
ma = 10: xa = 0: ya = 0: vxa = 0: vya = 0
REM b has mass 1 and starts at x, y, with velocity vb
REM c has mass 3 and starts at xc, yc, with velocity vc
mb = 1: xb = -.55: yb = 0: vxb = 0: vyb = -4
mc = 3 - .00001: xc = -3.3065: yc = -6: vxc = -.532: vyc = -.12
vxa = -vxb / 10: vya = -vyb / 10
dabo = SQR((xa - xb) * (xa - xb) + (ya - yb) * (ya - yb))

m$(1) = "Earth in orbit round sun"
m$(2) = "Green and Pleasant Land:  365 days a year:  65 deg F"
m$(20) = "Dawn of a new  Ice  Age?"
m$(21) = "Earth is an arid desert!"
m$(3) = "January 2017   ALERT: Earth orbit is shifting!"
m$(4) = "March 2017  Suspect massive comet is approaching"
m$(5) = "October 2017 Radio telescopes detect massive comet"
m$(6) = "December 2017 Government denies  existence of comet"
m$(17) = "Wall Street Panic!  "
m$(7) = "UK and US stock collapse:  Many suicides"
m$(8) = "Sinners Repent:    The End draws Nigh"
m$(9) = "Computations predict impact with Earth"
m$(11) = "Watch my lips: there is no comet (US President)"
m$(10) = "  Comet visible in night sky"
m$(12) = "Comet visible in broad daylight"
m$(13) = " Comet turns night to day                       "
m$(14) = "     Comet brighter than sun   "
m$(15) = "Days this year "
m$(16) = "Mean day temp "
tnt = .00274
tint = tnt
WHILE INKEY$ = ""
i = i + 1

REM distance a from b:-   dabsquared=dxsquared+dysquared
dxabsq = (xa - xb) * (xa - xb): dyabsq = (ya - yb) * (ya - yb)
dabsq = dxabsq + dyabsq
dab = SQR(dabsq)
REM acceleration of a due to b:  (its really accn/dab)
fab = -1 / (dabsq * dab)
fxab = fab * (xa - xb)
fyab = fab * (ya - yb)

REM acceleration of b due to a:
fxba = -fxab * ma
fyba = -fyab * ma

REM acceleration of a due to c:
REM distance a from c:-   dacsquared=dxsquared+dysquared
dxacsq = (xa - xc) * (xa - xc): dyacsq = (ya - yc) * (ya - yc)
dacsq = dxacsq + dyacsq
dac = SQR(dacsq)
REM acceleration of a due to c:  (its really accn/dac)
fac = -mc / (dacsq * dac)
fxac = fac * (xa - xc)
fyac = fac * (ya - yc)

REM acceleration of c due to a:
fxca = -fxac * ma / mc
fyca = -fyac * ma / mc

REM acceleration of b due to c:
REM distance b from c:-   dbcsquared=dxsquared+dysquared
dxbcsq = (xb - xc) * (xb - xc): dybcsq = (yb - yc) * (yb - yc)
dbcsq = dxbcsq + dybcsq
dbc = SQR(dbcsq)
REM acceleration of b due to c:  (its really accn/dbc)
fbc = -mc / (dbcsq * dbc)
fxbc = fbc * (xb - xc)
fybc = fbc * (yb - yc)

REM acceleration of c due to b:
fxcb = -fxbc / mc
fycb = -fybc / mc

dvxa = (fxab + fxac) * tint
dvya = (fyab + fyac) * tint
dvxb = (fxbc + fxba) * tint
dvyb = (fybc + fyba) * tint
dvxc = (fxca + fxcb) * tint
dvyc = (fyca + fycb) * tint
vxa = vxa + dvxa
vya = vya + dvya
vxb = vxb + dvxb
vyb = vyb + dvyb
vxc = vxc + dvxc
vyc = vyc + dvyc
xa = xa + vxa * tint
ya = ya + vya * tint
xb = xb + vxb * tint
yb = yb + vyb * tint
xc = xc + vxc * tint
yc = yc + vyc * tint

PSET (xa, ya), 14
PSET (xb, yb), colb
PSET (xc, yc), 12
FOR iiy = 1 TO 300000: NEXT iiy' waste time

IF i > 3.5 * 184 THEN GOTO nxt
IF i < 3 THEN PRINT m$(i)
IF i = 1 * 184 THEN LOCATE 4, 1: PRINT m$(3)
IF i = 230 THEN PRINT m$(4)
IF i = 2 * 184 - 42 THEN PRINT m$(5)
IF i = 3 * 184 - 42 THEN PRINT m$(7)
IF i = 2 * 184 + 12 THEN PRINT m$(17)
IF i = 2 * 184 - 2 THEN PRINT m$(6)
IF i = 3 * 184 THEN PRINT m$(9)
IF i = 3 * 184 + 80 THEN PRINT m$(8)
nxt:
IF i = n * 184 THEN LOCATE 2, 27: PRINT m$(15); FIX(365 * dab / dabo); : n = n + 1: GOSUB temp: LOCATE 2, 48: PRINT m$(16); temp; " deg F"
IF da THEN IF dac < 6 THEN LOCATE 3, 1: PRINT m$(10): iseen = i: da = 0
IF i = iseen + 6 THEN LOCATE 11, 1: PRINT m$(11)
IF dc THEN IF dac < 4 THEN PRINT m$(12): dc = 0: n = FIX(i / 184) + 1:
IF dc THEN IF dbc < dab THEN PRINT m$(14)
IF db THEN IF dbc < 2 THEN LOCATE 4, 1: PRINT m$(13): db = 0
IF dbc < .02 THEN LOCATE 10, 57: PRINT "comet imapacts earth": GOTO earthend
IF dac < .07 THEN LOCATE 11, 57: PRINT "comet impacts sun": GOSUB bang
IF i = 0 THEN LOCATE 1, 57: PRINT "Dawn of New Millenium?";
IF 1 = 2 * 184 THEN LOCATE 2, 57: PRINT "1 January 2017"
IF 1 = 5 * 184 THEN : LOCATE 3, 57: PRINT "End of the World?": GOSUB blank
'IF i = 1 THEN PRINT m$(1)
'IF i = 1 THEN PRINT m$(1)
'IF i = 1 THEN PRINT m$(1)
' LOCATE 2, 60: PRINT 10 * (vxa ^ 2 + vya ^ 2) + vxb ^ 2 + vyb ^ 2 + 3 * (vxc ^ 2 + vyc ^ 2)

WEND


SCREEN 0
STOP
temp:
temp = FIX(135 * dabo / dab - 70)
IF temp < 0 THEN colb = 3: LOCATE 2, 1: PRINT m$(20)
IF temp > 200 THEN colb = 6: LOCATE 2, 1: PRINT m$(21)
RETURN

blank:
LOCATE 4, 1
PRINT "                                                   "
PRINT "                                                   "
PRINT "                                                   "
PRINT "                                                   "
RETURN

bang:
FOR u = 1 TO 100 STEP .123
PSET (xa + .004 * u * COS(u), ya + .004 * u * SIN(u)), 15 - .1 * u
NEXT
xc = xa: yc = ya + .1
vxa = -vxb * mb / (mc + ma): vya = -vyb * mb / (mc + ma)
dvc = (3.2 + .55 * RND) * SQR(ma): vxc = vxa - dvc: vyc = vya: vxa = vxa + dvc * mc / ma
RETURN

earthend:
FOR u = 1 TO 2000 STEP .0455
PSET (xb + .004 * u * COS(u), yb + .004 * u * SIN(u)), 15 - .01 * u
NEXT

SUB blank
PRINT
PRINT
PRINT
PRINT


END SUB


[edit by axlyon. "was that so hard?"]

Pages: [1] 2 3

+-Recent Topics

Excelling in C++: Trust the Professional Code Experts at MyCodingHomework for Expert Homework Assistance by Dilamon Saravi
June 05, 2023, 08:02:21 am

Make money online: 4 Reasons Why Blockchain Gaming is The Future by Damingw
March 06, 2023, 05:51:43 am

Fairy Cat, New Profitable Blockchain Game by claude william
March 01, 2023, 11:30:54 pm

GameFi - A way out for low-skilled workers by claude william
February 28, 2023, 11:29:57 pm

The History of Gaming — From Pay-to-Play to Play-to-Earn by claude william
February 27, 2023, 11:50:57 pm

Best Blockchain Games by claude william
February 26, 2023, 11:46:46 pm

3 Best Blockchain Games to Invest In 2023 by claude william
February 25, 2023, 11:16:23 pm

The History of Gaming — From Pay-to-Play to Play-to-Earn by claude william
February 24, 2023, 11:57:47 pm

Best Play-to-Earn Games with NFTs or Crypto by claude william
February 24, 2023, 12:04:48 am

A few lines of fun writing to IT brothers during Covid by claude william
February 22, 2023, 11:35:56 pm