I've been working on making the game Android and iOS game Billionaire for a while now. It's pretty popular at my school, but for those who don't know what it is yet: https://play.google.com/store/apps/details?id=com.alegrium.billionaire&hl=en
It is similar to Adventure Capitalist in case that game is more familiar.

Right now I have a playable version, however in many places it probably could be much better. I'm kind of a newbie to hybrid basic, as this is the first thing I've ever made with it (besides just a few tests).

I would like to add sprites for all of the different businesses to make it look more colorful and interesting, but it take lots of space to store an image of much size. I'm wondering, is there a way to display a 16x16 sprite at the size of 32x32 pixels, so it covers more of the empty space?

Here is a screenshot of what it currently looks like:



EDIT: I've posted an early version of this game into the archives. Please try it out and give me any feedback. https://www.cemetech.net/programs/index.php?mode=file&id=1382
Looks good so far! There are a few things I'd like to know, though. What sort of saving mechanism do you use? If you use Appvars then you can just use

Code:

0
det(0
If not(θ
Then
// Initialize Appvar
End

Also, is there any way you can get rid of the flashing? If you're just updating the numbers, then you can use real(7,9,... , have the width be the length of the number (which is 1+int(log(N) ) and have the height be 8 so you can erase just the numbers.
The flashing I believe is caused by random number generation. It flashes much more using jusTIfied than on my calculator, and I'm not sure how to change it. To save I'm using lists and an appvar to store all the business name. I guess to make it faster I'll take your advice in erasing only the numbers, but since real(6,1 can't display very large numbers, It still will take a while for the numbers to load, as they have to be converted to a string. Thanks for the feedback though! Smile
EDIT: Is there a way to use the real(6,1,...) command to display a value greater than 9999. It takes quite a while for the calculator to convert each value into a string.
*bump* Yes, you can use real(6,1,...) to display a value greater than 9999, but it requires a bit of manual trickery. I spent a bit of time tonight (at 4am Wink ) recreating this code from my memory. It handles numbers between 0 and 99999999, assuming it's in X and you want to display the number at (x=A, y=B) in black:
Code:
If X>9999:Then
   real(6,1,A,B,0,iPart(X|E~4),0
   3-iPart(log(|E4fPart(X|E~4)+.9
   If Ans:Then
      sub("000",1,Ans
      real(6,0,A+8(iPart(log(X+.9)-4)),B,0,7,0
   End
End
real(6,1,A+8iPart(log(X+.9)-3)(X>9999),B,0,|E4fPart(X|E~4),1
Pause

Note that in this case |E is [2nd][,]. I'd be more than happy to answer any questions about how this code works, but here's the general outline:
1) Display any digits before the final 4. In 123,456, this would be "12". Any number >9999 has at least 5 and at most 8 digits, by our definitions. First, simply use 10^4 * int(X * 10^-4) to grab the first 1 to 4 digits, and display them
2) Then, determine whether we need to display extra 0s, and display them. Why is this necessary? If X=10001, then the first part is "1", and the second part is also "1". If we just display those two halves, we get "11". This code will display "1", "000", "1".
3) Finally, display the last 1 to 4 digits of the number. Use log tricks to make sure it's displayed in the right place.

Edit: I forgot to mention that I hope you're still working on this! I ran across it while double-checking tifreak8x's list of POTM programs.
KermMartian wrote:
*bump* Yes, you can use real(6,1,...) to display a value greater than 9999, but it requires a bit of manual trickery. I spent a bit of time tonight (at 4am Wink ) recreating this code from my memory. It handles numbers between 0 and 99999999, assuming it's in X and you want to display the number at (x=A, y=B) in black:

First of all, thanks a lot for making this for me, I really appreciated that. I looked at your code, and I don't really understand most of it, although this is because most of the math in this is beyond me. However, I'm going to take a better look at it tonight or tomorrow.
Also, would this be faster than just converting a variable to a string? Converting variables to strings made the load time for each business longer than I wanted, but this is quite a bit of code for each number so, I'm not completely sure if I will use this.

Also, you posting on this reminded me of the project. I've been pretty busy working on my pirate game, so I haven't been working on this lately. I did start making a faster version with some graphics a while back, but I had a bug I couldn't find, and it eventually was lost in a ram clear (why it wasn't archived - I don't know!). Either way: Yes I do plan to work on it soon, just not until I have a demo out for my pirate game (which will be very soon).
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement