CodeWalrus

Development => PC, Mac & Vintage Computers => Topic started by: Strontium on April 29, 2015, 11:38:50 pm

Title: Flowers! [withdrew from contest] [ti-nspire cx] [PC]
Post by: Strontium on April 29, 2015, 11:38:50 pm
NOTICE: There is a git repo available here: https://gitlab.com/Strontium/flowers

I am creating a game where you program a plants DNA to allow it to survive in the given environment. DNA is edited in segments of four, and each segment does a different thing. So a segment dedicated to leaves could allow you to change the type of leave, wether that means its a light leaf, dark leaf, fuzzy leaf, whatever. (Yes, each type of leaf in nature has its pros and cons, they are not just like that to look pretty!)

For each plant you create, there will be some undocumented DNA segments that randomly generate in a different place each time. It is up to you to experiment with the undocumented ones to see what they do & utilize them.

You can see how much water, nutrients, and sunlight your plant it getting (all relative to its size) in the stats screen:
(https://i.imgur.com/wRSsqdl.jpg)
(the white borders are a bug in the emulator :P)

There will also be a screen where you can see your plant, and observe the environment. How much rain? How much sun? How good is the soil? Using what you can see on this screen will help you create your plant.

My TODO list, in order of priority:
-- finish stats screen (complete)
-- finish plant visualizer
-- make DNA editor
-- write the simulation code
-- score & failure screens

After the contest I am going to allow myself to expand into 8x6 or maybe 12x9 so I can add more features in stuff in order to make it more intuitive and fun.
Title: Re: Flowers! [4x3 contest]
Post by: Strontium on April 30, 2015, 12:00:24 am
Huh. Tested this on a real calc, *some* of the white lines are real. But I have no idea how to fix them or why they are there D:
Edit: Fixed them by rounding the outputs of the functions I used to get the window dimensions. Thanks math.ceil()!

Now all of the extra lines are bugs in the emulator, not in my code:
(https://i.imgur.com/qt0Wz47.jpg)
Title: Re: Flowers!
Post by: DJ Omnimaga on April 30, 2015, 03:43:25 am
Interesting idea. Will the leaves always have a green color or can they sometimes be represented with something else? What about sun, heat, cold, rain, etc?
Title: Re: Flowers! [4x3 contest] [ti-nspire]
Post by: Strontium on April 30, 2015, 03:45:56 am
On the plant screen, the sun will be in the upper right corner as a single pixel. The brightness represents how much heat and sunlight is being given off.

When it rains, the sun will be blocked by a cloud and blue pixels will fall from the sky.

I could make it so your plant could be different colors, but it would be only for aesthetics. Doing anything more advanced with colors would require more space.
Title: Re: Flowers!
Post by: DJ Omnimaga on April 30, 2015, 03:49:26 am
Aah ok thanks for clarifying. Sounds like a better move to put it at the top in a corner, since that's where it normally is. :P. I also like the rain drop idea. Or you could just replace the sun with an invisible pixel when it's cloudy, blue when it's rainy and gray when it's snowing.
Title: Re: Flowers! [4x3 contest] [ti-nspire]
Post by: Strontium on April 30, 2015, 03:51:07 am
But thats lame.

And now I want to include snow, but without being able to make it much more advanced I don't know how to implement it...

something something cold adapted something something surprise global warming something something BURN!
Title: Re: Flowers!
Post by: DJ Omnimaga on April 30, 2015, 03:55:30 am
You could maybe focus on the basics for now since after all plants usually can't grow in a snowy environment anyway. The most common conditions are hot, warm, cold, dry, wet, rainy, cloudy and sunny.
Title: Re: Flowers!
Post by: Unicorn on April 30, 2015, 05:51:01 am
I have a feeling this will be the most original. :P

Anyways, that is a pretty cool idea, blending ed with games.
Title: Re: Flowers! [4x3 contest] [ti-nspire]
Post by: Snektron on April 30, 2015, 08:03:39 am
Very, very cool idea :D
Title: Re: Flowers! [4x3 contest] [ti-nspire]
Post by: Strontium on April 30, 2015, 08:56:10 pm
Thank you :walrii:
Title: Re: Flowers! [4x3 contest] [ti-nspire]
Post by: Strontium on May 01, 2015, 01:57:27 am
UPDATE TIME!

I've begun working on the environment viewer screen. So far, the sun varies brightness depending on how much light it should give off, and the quality of the land is displayed in the color of the soil (light green is the best, dark brown is pretty good, light brown starts to suck, and then theres a bunch of different yellows for desert. There are also other colors for the land, those are just some examples).

This part is half-way done, though, because displaying the plant depends on its DNA, which I have not yet implemented. As such, I will begin work on the DNA editor tomorrow. Once the DNA editor is done, I'll be able to finish the plant visualizer.

Once I finish the plant visualizer, I'll begin working on the simulation code.

(https://i.imgur.com/Dy30qMx.jpg)
Title: Re: Flowers!
Post by: DJ Omnimaga on May 01, 2015, 05:52:30 am
The layout is much better this way :)
Title: Re: Flowers! [4x3 contest] [ti-nspire]
Post by: Strontium on May 01, 2015, 05:55:11 am
The other screen still exists :P Its kinda necessary so that the player can understand what is going on with the plant. Showing the environment with a image instead of some status bars is a lot more pleasant, which is why I am doing that here.

Unfortunately, the DNA editor wont be very pretty. Once I expand into 8x6 after the contest, though, I have nice plans for it.
Title: Re: Flowers! [4x3 contest] [ti-nspire cx]
Post by: Snektron on May 01, 2015, 09:25:20 am
I like the sun and the grass. Very clear what's its supposed to be, and looks nice ;)
Title: Re: Flowers!
Post by: alexgt on May 01, 2015, 02:09:23 pm
Air pollution would be a nice touch.
Title: Re: Flowers! [4x3 contest] [ti-nspire cx]
Post by: Strontium on May 01, 2015, 03:59:55 pm
Bah. That would be a pain to deal with. How would I even implement that? How would I display that? Turn the sky color to grey?

I don't want to add pollution.
Title: Re: Flowers!
Post by: alexgt on May 01, 2015, 04:02:11 pm
If you think about it I guess you don't have anything that would pollute the air, unless you had a polluted world and you need to clean it up with trees/ flowers

Looks good by the way :)
Title: Re: Flowers! [4x3 contest] [ti-nspire cx]
Post by: Strontium on May 01, 2015, 04:02:57 pm
I *might* be able to do something cool with pollution after the contest and I can expand into 8x6.
Title: Re: Flowers!
Post by: alexgt on May 01, 2015, 04:05:29 pm
It is quite hard to make good looking stuff with the resolution we have  :-|
Title: Re: Flowers! [4x3 contest] [ti-nspire cx]
Post by: Strontium on May 01, 2015, 07:55:00 pm
Its not that it wont be good looking, its because there isn't enough space.
Title: Re: Flowers!
Post by: alexgt on May 01, 2015, 08:58:37 pm
No, I wan't saying that Flowers looked bad I was saying it is hard to represent something in only a 4x3 space but you are doing a really good job :)
Title: Re: Flowers! [4x3 contest] [ti-nspire cx]
Post by: Strontium on May 01, 2015, 08:59:25 pm
I was referring to the implementation of pollution, not the entire game.
Title: Re: Flowers!
Post by: alexgt on May 01, 2015, 09:00:06 pm
Ohh I see now srry
Title: Re: Flowers! [4x3 contest] [ti-nspire cx]
Post by: Strontium on May 01, 2015, 09:45:23 pm
Been working on implementing rain. I've had an idea to expand on the rain mechanic:

Different types of rain!

heavy rain, light rain, medium rain, you name it! Need a rain? We've got that rain.

The probability of each kind of rain would depend on the environment. Heavy rains are more frequent in places that aren't deserts, for example.
Title: Re: Flowers!
Post by: Unicorn on May 02, 2015, 04:49:44 pm
ACID RAIN!

Sounds very complicated! ;)
Title: Re: Flowers! [4x3 contest] [ti-nspire cx]
Post by: Snektron on May 02, 2015, 05:14:19 pm
Walrii rain :P
Title: Re: Flowers!
Post by: Unicorn on May 02, 2015, 05:17:56 pm
Oh yeah?



All rain! :P
Title: Re: Flowers!
Post by: DJ Omnimaga on May 03, 2015, 06:26:06 am
Regarding pollution, maybe the sky could have a brown tint depending of how intense it is. However, it wouldn't be a very necessary feature I think. It would spice the game up though if you have extra time. As for rain maybe the sun could be blue and the sky gray, but the blue would be more intense with heavy rain than light rain.

Just tossing more ideas around :P
Title: Re: Flowers!
Post by: DJ Omnimaga on May 06, 2015, 04:00:51 pm
Bump: as a reminder, make sure this runs on OS 3.6 or 3.1, as the contest rules requires compatibility with at least one of those OSes.

Just making sure, since Greed requires 3.9-4.0.
Title: Re: Flowers! [4x3 contest] [ti-nspire cx]
Post by: Strontium on May 07, 2015, 12:17:05 am
This will work on OS 3.1. Don't worry.
Title: Re: Flowers! [4x3 contest] [ti-nspire cx] [PC]
Post by: Strontium on May 11, 2015, 05:00:37 am
UPDATE TIME

So, I'm rewriting this from scratch for the PC. When I started working on this game, I was SUPER out of practice with code, so I was doing all sorts of weird things. (like with Greed, instead of doing bound checking, I checked whether or not I got an error when I tried to access part of the board :P)

Anyways, this time, I created a proper color palette! And the code is more sane! etc, etc. Don't worry, though, once the contest is over, I'll be sure to port it to the Nspire.

New stats screen:
(https://i.imgur.com/Z8rdk1s.png)

Plant visualizer:
(https://i.imgur.com/1hld2Ea.png)
Title: Re: Flowers! [4x3 contest] [ti-nspire cx] [PC]
Post by: Snektron on May 11, 2015, 09:16:42 am
Ohh awesome, looks cool :D
Title: Re: Flowers! [4x3 contest] [ti-nspire cx] [PC]
Post by: Strontium on May 12, 2015, 02:41:14 am
Well, shoot.

I spilled water on my laptop.

And I didn't make backups of my game.

Woops.
Title: Re: Flowers!
Post by: Unicorn on May 12, 2015, 03:06:04 am
Oh, man that sucks. Is the hard drive retrievable? If your parents have a laptop you could recover your files by switching the hard drives out.
Title: Re: Flowers!
Post by: DJ Omnimaga on May 12, 2015, 03:55:25 am
Ugh that sucks. At least it wasn't yet another laptop failure like many people have, else I would have said use a desktop instead since they break less fast. But yeah next time don't forget to backup >.<

Or maybe you could instead continue the calc version instead of computer, since you probably had a calc copy?
Title: Re: Flowers! [4x3 contest] [ti-nspire cx] [PC]
Post by: Snektron on May 12, 2015, 12:49:29 pm
It was a PC Game, wasn't it? But maybe you can still save your hdd, try drying it somewhere. Maybe even take it apart and let the pieces individually dry. Watch out you don't kill it though
Title: Re: Flowers! [4x3 contest] [ti-nspire cx] [PC]
Post by: Strontium on May 12, 2015, 05:59:14 pm
Don't worry, I am going to get a SATA to USB cable and rescue my data.
Title: Re: Flowers!
Post by: Duke "Tape" Eiyeron on May 12, 2015, 06:53:59 pm
Welp, I spilled once orange juice on my first laptop. I think it ran faster after getting spilled with it but I think it was only my mind.
Title: Re: Flowers!
Post by: DJ Omnimaga on May 15, 2015, 05:00:37 am
Quote from: Cumred_Snektron on May 12, 2015, 12:49:29 pm
It was a PC Game, wasn't it? But maybe you can still save your hdd, try drying it somewhere. Maybe even take it apart and let the pieces individually dry. Watch out you don't kill it though
It used to be a TI-Nspire game, but then he moved the project to PC platform instead.
Quote from: Strontium on May 12, 2015, 05:59:14 pm
Don't worry, I am going to get a SATA to USB cable and rescue my data.
Good luck. I hope it works out. If it doesn't, then do you still plan to redo your entry?
Title: Re: Flowers!
Post by: alexgt on May 22, 2015, 02:36:46 am
Are you still in the contest @Strontium I hope so :)?!
Title: Re: Flowers!
Post by: bb010g on May 22, 2015, 04:18:27 am
Thanks for telling me about brogue, @Strontium! It looks cool. :) And good luck on getting your data back; we're all rooting for you.
Title: Re: Flowers! [4x3 contest] [ti-nspire cx] [PC]
Post by: Strontium on May 23, 2015, 01:24:55 am
I've lost all motivation to rewrite this game for the contest. However, I am working on a new game in the same spirit as this, but it would not be able to qualify for judging because it breaks a lot of rules.
Title: Re: Flowers!
Post by: DJ Omnimaga on May 23, 2015, 01:34:05 am
Sorry to hear. I hope the new game works out better, though, and I hope you stick around on the forums despite the data loss :)
Title: Re: Flowers! [4x3 contest] [ti-nspire cx] [PC]
Post by: Strontium on May 23, 2015, 01:35:20 am
Why would I leave? Codewalrus is awesome! :walrii:
Title: Re: Flowers!
Post by: DJ Omnimaga on May 23, 2015, 01:37:02 am
Oh I was saying that since you vanished all of a sudden after the data loss and in the past there are community members who never came back after losing a project O.O
Title: Re: Flowers! [4x3 contest] [ti-nspire cx] [PC]
Post by: Snektron on May 23, 2015, 09:45:54 am
i'm happy that didn't happen O.O
Title: Re: Flowers!
Post by: Unicorn on May 28, 2015, 05:00:07 am
Dj, youare always worying aboutnif we leave or not. :P But yeah, to to bad you couldn't finish strontium. :')
Title: Re: Flowers!
Post by: DJ Omnimaga on May 28, 2015, 06:04:32 am
Quote from: Unicorn on May 28, 2015, 05:00:07 am
Dj, youare always worying aboutnif we leave or not. :P But yeah, to to bad you couldn't finish strontium. :')
Lol that's because of past experiences in the TI community. When I ran Omnimaga forums, we were in perpetual rebuild mode due to losing too many users during Summer and Christmas (except maybe Summer 2010). :P
Title: Re: Flowers!
Post by: Unicorn on May 28, 2015, 06:55:34 am
Yeah, past experiences really define a persons worries. But on this topic, I won't be leaving calc forums for a while, as thy hav really help my knowledge expand. :)
Title: Re: Flowers!
Post by: DJ Omnimaga on May 29, 2015, 06:35:48 pm
On a side note, since you Withdrew from the contest, do you mind if I move this topic to the projects sub-forum?
Title: Re: Flowers!
Post by: alexgt on May 29, 2015, 08:11:49 pm
Quote from: Unicorn on May 28, 2015, 06:55:34 am
Yeah, past experiences really define a persons worries. But on this topic, I won't be leaving calc forums for a while, as thy hav really help my knowledge expand. :)

Same here :) :walrii:
Title: Re: Flowers!
Post by: Strontium on May 30, 2015, 05:39:52 am
Quote from: DJ Omnimaga on May 29, 2015, 06:35:48 pm
On a side note, since you Withdrew from the contest, do you mind if I move this topic to the projects sub-forum?

Sure
Title: Re: Flowers!
Post by: Unicorn on May 31, 2015, 08:00:22 am
Wat platform will the new game be on? Hopefully pc soI can play it. :P
Title: Re: Flowers! [4x3 contest] [ti-nspire cx] [PC]
Post by: Snektron on May 31, 2015, 09:28:29 am
Yeah i still wan't to play it too. This seemed like a really cool concept :D
Title: Re: Flowers!
Post by: DJ Omnimaga on June 01, 2015, 09:23:54 pm
Same. And yeah I am curious about the platform myself. I placed it in the non-calc section for now since it seems to be for PC now but I'll move it back to calcs if you changed your mind.
Title: Re: Flowers! [withdrew from contest] [ti-nspire cx] [PC]
Post by: Strontium on June 28, 2015, 10:45:56 pm
(https://codewalr.us/proxy.php?request=http%3A%2F%2Fi.imgur.com%2F1zJMuP8.png&hash=b168600235df9241e469ee1f785e19d8)

Progress is being made!

Also, git repo:
https://github.com/Quojil/flowers

As for calculatorness:
I'm writing the code so that when I port it over to the Nspire, I only need to change some of the internal LOVE stuff to GC stuff.
Title: Re: Flowers!
Post by: DJ Omnimaga on June 29, 2015, 07:47:35 am
Ooh I'm glad to see this picked up again. I worried that due to missing the contest deadline you had canceled the project altogether. Also I'm happy to see you plan to make a calculator version. Keep us updated :)
Title: Re: Flowers! [withdrew from contest] [ti-nspire cx] [PC]
Post by: Snektron on June 29, 2015, 08:46:48 am
I'm happy to see it revived too, it was a really good idea :)
Title: Re: Flowers!
Post by: Unicorn on June 29, 2015, 10:18:56 pm
Yay! Will it be compatible with Windows 8/7?
Title: Re: Flowers!
Post by: Strontium on June 30, 2015, 02:27:54 am
Quote from: Unicorn on June 29, 2015, 10:18:56 pm
Yay! Will it be compatible with Windows 8/7?


I'm writing it in Lua with no libraries other than LOVE, so it should work on any platform.
Title: Re: Flowers!
Post by: Duke "Tape" Eiyeron on June 30, 2015, 10:46:27 am
And on WIndows, *compiling* the poject makes just bundle the lua files into the love's executable, so yeah, if Löve can run on your computer, the game will.
Title: Re: Flowers!
Post by: Unicorn on July 03, 2015, 02:56:32 am
But the game will only run on the designated window size for the platform right?
Title: Re: Flowers!
Post by: DJ Omnimaga on July 08, 2015, 03:13:53 am
Scaling would be nice so that we can play full screen on larger resolutions. Can Lua change the screen resolution, by the way?
Title: Re: Flowers!
Post by: Strontium on July 23, 2015, 09:04:11 pm
Quote from: DJ Omnimaga on July 08, 2015, 03:13:53 am
Scaling would be nice so that we can play full screen on larger resolutions. Can Lua change the screen resolution, by the way?


I've had scaling built in to Flowers from the start. Demo of both scaling and the new cursor in the DNA editor:

(https://codewalr.us/proxy.php?request=http%3A%2F%2Fi.imgur.com%2FIUULTO1.gif&hash=a4bd5a2f8d16415a9a868f707cac592e)
Title: Re: Flowers!
Post by: alexgt on July 23, 2015, 09:08:51 pm
Awesome glad to see this still being worked on :)
Title: Re: Flowers!
Post by: Unicorn on July 24, 2015, 12:17:08 am
^^ And scaling is nice to have :)
Title: Re: Flowers!
Post by: alexgt on July 24, 2015, 01:10:56 am
^ Definitely
Title: Re: Flowers! [withdrew from contest] [ti-nspire cx] [PC]
Post by: Snektron on July 24, 2015, 11:50:26 am
Looks cool! Weren't you making a 8x6 version too?
Title: Re: Flowers! [withdrew from contest] [ti-nspire cx] [PC]
Post by: Strontium on July 24, 2015, 12:22:29 pm
Quote from: Cumred_Snektron on July 24, 2015, 11:50:26 am
Looks cool! Weren't you making a 8x6 version too?


I decided to go with 4x3 instead
Title: Re: Flowers!
Post by: Unicorn on July 24, 2015, 03:26:28 pm
Cool, keeping to the idea of the contest. :)
Title: Re: Flowers! [withdrew from contest] [ti-nspire cx] [PC]
Post by: Strontium on July 25, 2015, 02:09:34 am
I'm working on rain:

(https://codewalr.us/proxy.php?request=http%3A%2F%2Fi.imgur.com%2FWEBNOqQ.gif&hash=2e4e763b60a47e99ec4799350bddc1e3)

There will be 3 factors related to rain. Frequency, weight, and chance.

Frequency is the minimum amount of time between rainstorms.
Weight is how heavy the rain is. This is shown by the color of the rain.
Chance is, of course, the chance that a rainstorm will occur.

These are all varied by the type of environment.
Title: Re: Flowers!
Post by: Unicorn on July 25, 2015, 02:54:46 am
Very cool! What language are you making this in?
Title: Re: Flowers!
Post by: Strontium on July 25, 2015, 03:12:17 am
(https://codewalr.us/proxy.php?request=http%3A%2F%2Fi.imgur.com%2FKyZceIN.png&hash=9081d1e38099c51569d6013dd98031a7)

What else would it be in? I'm gonna port it to the Nspire when I am done :P
Title: Re: Flowers! [withdrew from contest] [ti-nspire cx] [PC]
Post by: Snektron on July 25, 2015, 11:26:01 am
Lua is awesome :D. Maybe you can port it to android too when you're done
Title: Re: Flowers! [withdrew from contest] [ti-nspire cx] [PC]
Post by: Strontium on July 25, 2015, 07:32:49 pm
Yeah, it would probably be easier to port to android than to the Nspire. I have no android devices to test with, though.
Title: Re: Flowers!
Post by: DJ Omnimaga on July 25, 2015, 10:54:28 pm
Awesome to see there is scaling :D
Title: Re: Flowers! [withdrew from contest] [ti-nspire cx] [PC]
Post by: Strontium on August 10, 2015, 01:00:46 am
posting this again:
I moved from github to gitlab. New repo is at https://gitlab.com/Strontium/flowers
Title: Re: Flowers!
Post by: DJ Omnimaga on August 10, 2015, 02:14:29 am
Yeah I am still curious about why you moved. I know it's due to their new gender policies, but since CW allows rants topics as long as they don't single out an entire group of people (eg basic programmers, LGBT, women, etc) then mind explaining in another topic? :)
Title: Re: Flowers! [withdrew from contest] [ti-nspire cx] [PC]
Post by: Strontium on August 10, 2015, 06:57:04 am
I'd have to write a lot to explain it all. Maybe when I feel liking writing a lot of text :P
Title: Re: Flowers!
Post by: Unicorn on August 10, 2015, 07:03:54 am
Or just a little: I didnt agree with their policy on [insert word here] projects
Title: Re: Flowers!
Post by: DJ Omnimaga on August 11, 2015, 07:37:53 am
Yeah it doesn't have to be an essay either. :P

On a side note, have you worked on Flowers since the last update?
Title: Re: Flowers! [withdrew from contest] [ti-nspire cx] [PC]
Post by: Strontium on August 12, 2015, 05:00:34 am
After I moved to gitlab, I did rewrite the code for the rain since I implemented it in a really stupid way (using threads) which would not be able to work on the nspire. Other than that rewrite, I haven't done much work cause I'm in Hawaii right now.
Title: Re: Flowers!
Post by: Unicorn on August 12, 2015, 05:57:28 am
Oh, hawaii?Which island @Strontium ? And Im going to check your repo out.
Title: Re: Flowers! [withdrew from contest] [ti-nspire cx] [PC]
Post by: Strontium on August 12, 2015, 06:33:17 am
Oahu.
Title: Re: Flowers!
Post by: Unicorn on August 12, 2015, 06:55:07 am
Ah, The big islands the best. :P

No city or crazy traffic, and an actual live volcano!