Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / [BUG] Using print for float that goes out of bounds crashes Tier1 player

Author
Message
Cybermind
Valued Member
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: Denmark
Posted: 3rd Jun 2021 11:26
This code:



will make my player crash with no error message (just closes). I know I have raised this issue before, but since it has not been fixed, I'm reporting it again.

Windows 10 64-bit
Intel i7 47200HQ
8GB ram
AGK2 built on 2021-02-09
13/0
Loktofeit
AGK Developer
15
Years of Service
User Offline
Joined: 21st Jan 2009
Location: Sarasota, FL
Posted: 3rd Jun 2021 13:30
In the meantime, you can set a cap on the number.

"If your rent is a penny the first day and doubles every day..." tallied at computer speed gets really ridiculous inside of a second.

The image here is your number by about the 25th or so iteration.


LynxJSA's web games/quizzes - LynxJSA's Android apps
AGK Resource Directory
"Stick to a single main loop (DO...LOOP) and loop through it every frame.
Do everything inside functions.
Use finite state machines to control your game.
Use lots and lots of source files.
Use virtual resolution instead of the default percentage system." - Digital Awakening
n00bstar
20
Years of Service
User Offline
Joined: 9th Feb 2004
Location: Montreal, Canada.
Posted: 3rd Jun 2021 14:17
I'm fairly sure this is how my landlord has actually calculated my rent.
-----------------------------------------------------------------------------
We all got a chicken duck woman thing waiting for us
Virtual Nomad
Moderator
18
Years of Service
User Offline
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 5th Jun 2021 04:37
added to the git
[My Itch.io Home] [Community Apps on Itch.io]
[AGK Resource Directory] [TGC @ GitHub]
[CODE lang=agk] YOUR CODE HERE [/CODE]
[VIDEO=youtube] VIDEO ID [/VIDEO]
[AGK Showcase][Google Forum Search]
Kevin Picone
21
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Australia
Posted: 5th Jun 2021 05:37

I doubt that's PRINT related, the FPU side of the processor will put into an overflow state if you keep doubling floats. once this happens future float operations will no doubt hang it.

PlayBASIC To HTML5/WEB - Convert PlayBASIC To Machine Code
Conjured Entertainment
AGK Developer
18
Years of Service
User Offline
Joined: 12th Sep 2005
Location: Nirvana
Posted: 11th Jun 2021 02:55 Edited at: 11th Jun 2021 03:17
Quote: "The image here is your number by about the 25th or so iteration"


That is way more that 25.

You could do 30 on paper and see it is like 5+million dollars on the last day, and over 10 mil for the total.

This is an old joke my grandmother taught me, but it wasn't rent. (they hired you for the month, and that was your daily pay - everyone says okay after you explain the first week - lol - sweet contract)

I have made a program to check Mersenne prime numbers using Dark Basic Classic that could do results thousands of digits long (many screens) accurately by using multidimensional arrays for incrementing the numbers.

So, there are easy work-arounds for math processor limitations. (I used addition to do multiplication, so it was the long way around but it worked fine)

I have also used this doubling factor to illustrate the global human population problem if each couple has an average of 4 children... 30 generations adds up fast.

In the 1980's I was doing census research and saw that there were roughly 1.6 billion people on the planet in the year 1900, and they were predicting we would hit 7 billion by the year 2000.

I warned them then that if humans procreate the next 100 years at the same rate they have for the last 100 years, that there would be about 3.5 times the number of people that the planet can sustain based on the best agricultural estimates.

No one wanted to listen to a kid trying to warn them, but now they realize the dilemma, hence the population reduction efforts through wars, chem trails, man made viruses, sugar and corn syrup food additives, etc etc... (unfortunately the pollution damage is already too far gone - ocean life depletion, carbon emissions, etc etc all due to overpopulation)

Fun math exercise though.

Coding things my way since 1981 -- Currently using AppGameKit V2 Tier 1

Login to post a reply

Server time is: 2024-04-24 15:59:41
Your offset time is: 2024-04-24 15:59:41