Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411525 Posts in 69377 Topics- by 58431 Members - Latest Member: Bohdan_Zoshchenko

April 28, 2024, 05:00:00 PM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsCommunityDevLogsBio-Ex 127 (Working Title)
Pages: [1] 2
Print
Author Topic: Bio-Ex 127 (Working Title)  (Read 2976 times)
qwercus
Level 0
**



View Profile WWW
« on: July 07, 2013, 06:25:59 PM »

http://
~Biodiversity Experiment #127~
(working title)

This will be my first game.  It centers around the globally admired outdoor recreational activity that is weeding.  You are an intern for an ecology research station and it is your job to ensure that the various biodiversity plots have only the specified plant species in them.  Any other species are to be weeded.  

Why?  
Why make a game about weeding?  Not only is a simple concept that should be relatively simple to flesh out, it is also an idea that is heavily based on my current job.  By completing this game I hope to accomplish two things: finish my first game and surprise my coworkers with a (hopefully) entertaining game.

Pictures!




Some of the plants

left to right: sorrel, dandelion, butterfly milkweed, yarrow, wild lupine, and panic grass

Gameplay:
-Different plots have different assigned combinations of plants -- plants that are supposed to be there.
-Different plants have different characteristics and effects.
-Different plants are pulled at different rates.
-Plants have 4 different growth stages: seed, sprout, flower, and seeding.
-Seeding plants spread seeds onto adjacent bare ground.
-If you pull too many non-weeds, you lose.
-If you don't clear all the weeds in within the time limit, you lose.

Music:
-Title/Plot-Select: http://tindeck.com/listen/bvxh

Github:
https://github.com/Quercus27/Weeding

Download:
-Aug 6: http://www.mediafire.com/download/3f0889pe269ccqi/weeding_0.05.jar
-July 28: http://www.mediafire.com/download/bn0pubpj1xhtge8/weeding_0.04.jar
-July 23: http://www.mediafire.com/download/po70nag907bbc14/weeding_0.03b.jar

Technical:
-Language: Java
-Libaries: Slick2D
-Music: Reaper
-Artwork: GIMP / Paint.net

To-do list:
-Pause menu.
-Plants that choke out adjacent plants
-Some way of incorporating buffers (fast, slow, add time, etc.).
-Point system.
-Improve artwork: Player's sprite, plot-selection menu, plots, numbers at top, fail/success screen.
-Main menu
-Successfully clearing a plot unlocks a new plot.
-Title screen.
-Penalty for pulling non-weeds.
-Plants that spread via rhizomes (horizontal roots)
-Display number of weeds remaining.
-Multiple levels
-Timer
-Display desired plants at the top or bottom of the screen


Feedback is welcome!
-->Including title ideas!
« Last Edit: August 06, 2013, 06:09:51 PM by Quercus » Logged

I make ♫♪
soundcloud | twitter
ZASkaggs
Level 0
**



View Profile
« Reply #1 on: July 07, 2013, 07:20:38 PM »

Sounds like a solid enough concept. It's always good to see people starting with a modest idea and fleshing it out rather than planning an MMO or some other nonsense. I look forward to watching this come together.  Smiley
Logged

Dacke
Level 10
*****



View Profile
« Reply #2 on: July 08, 2013, 05:41:21 AM »

I really like the setting, it seems like an ingenious choice for an action/puzzler. I'm personally into using scythes and my brother-in-law is a fully educated gardener, so we'll probably be testing this out when it's ready.

Since you're a fellow Java/Linux user maybe I can be of some assistance if you run into problems. At least running some beta-tests for you.

Are you using proper version control (git/mercurial/bazaar)? That's something self-taught people often miss out on. Also, do you plan to publish the code on for example github/bitbucket?
Logged

programming • free software
animal liberation • veganism
anarcho-communism • intersectionality • feminism
qwercus
Level 0
**



View Profile WWW
« Reply #3 on: July 08, 2013, 05:12:21 PM »

Sounds like a solid enough concept. It's always good to see people starting with a modest idea and fleshing it out rather than planning an MMO or some other nonsense. I look forward to watching this come together.  Smiley

Thanks!  If I had planned anything more ambitious, it probably wouldn't get anywhere.  I think the scale of this game is perfect for my first game.  And hopefully this game will flesh out well. Smiley

I really like the setting, it seems like an ingenious choice for an action/puzzler. I'm personally into using scythes and my brother-in-law is a fully educated gardener, so we'll probably be testing this out when it's ready.

Since you're a fellow Java/Linux user maybe I can be of some assistance if you run into problems. At least running some beta-tests for you.

Are you using proper version control (git/mercurial/bazaar)? That's something self-taught people often miss out on. Also, do you plan to publish the code on for example github/bitbucket?

It would be awesome to have you as a tester/guru!  I still have a lot to learn about Java/programming.  And I'm glad that you (and potentially your brother) are interested in this game idea.

Thanks for bringing up version control.  You're right.  It's actually something I had never heard of.  After reading your post, I did some research and set up a git repository for this game.  Taking advantage of it will likely change how I program, but might take a while to learn exactly how to do that.

I am not currently planning on publishing the code anywhere.  What would be some reasons to do so?
Logged

I make ♫♪
soundcloud | twitter
Dacke
Level 10
*****



View Profile
« Reply #4 on: July 09, 2013, 11:41:54 AM »

Haha, wow, please don't think of me as a guru. I've hacked together a bunch of small games and prototypes over the years, but I have yet to create a sizeable game. I do work as a Java developer though, so maybe I can be of some help Smiley

There are a few important things you get from using distributed version control:
1. Magic undo. You can see exactly what changes you've since the last commit and you can always undo some or all of them.
2. Proper backup. Push your changes to a reliable server (like github/bitbucket) and the code should be safe.
3. Seamless collaboration. If you (at some point) want to collaborate with someone it's super-easy if you're using version control already.

You get all that stuff for free when using the system. You may find yourself using it for more advanced things later (branching/tagging/bisecting etc.) but that's just bonus stuff for later.

Your basic work flow now should be:
1. Make changes to program, test that they work.
2. Verify that the changes look good with "git diff"
3. Use "git add" and "git commit" to save the changes as a commit
4. Goto 1 if you want to work more
5. Use "git push" to send the changes to your remote server (github/bitbucket)

Ideally commits should be "atomic", doing one conceptual change to the code. Like "Added nettles" or "Formatted all the code". It's a good practice to learn, but when working alone it's also fine to have commits that say "Today's work".

I think it's a good habit to publish your code and work on it in the open, in part because it helps you get over the feeling that your code is "ugly" (pretty much everyone's code is, especially game code). It also helps the community, as we can learn from each other, reuse other's code and contribute to interesting projects.

There's really no rational reason to keep the code private, unless you think that you want to sell the game later (and even then it can be a good idea to open source it). I put most of my stuff on github and slap a GPLv3 license on it (or LGPL if it's a library). That way people can use and modify the code as they see fit, submit patches or build something new from it (as long as they share it back under the same license). In this case, it would allow me to directly test your code to see that it runs properly for me and test updates as you write them (if I have the time Wink).
« Last Edit: July 09, 2013, 11:49:34 AM by Dacke » Logged

programming • free software
animal liberation • veganism
anarcho-communism • intersectionality • feminism
qwercus
Level 0
**



View Profile WWW
« Reply #5 on: July 09, 2013, 05:24:00 PM »

Yesterday and today I added a few things.

I added a functional plot-selection menu, I placed images of the species that belong in a plot at the top of the screen, I made two additional plots with different combinations of plants in them (for the sake of the plot-selection menu), and I added a second grass.

The new menu:


The reference images at the top of the screen:

And of course these additions will see improvement.  Especially the plot-selection menu.

I think the next things I will focus on will be a punishment for picking a non-weed and some sort of timer.


« Last Edit: July 09, 2013, 05:35:07 PM by Quercus » Logged

I make ♫♪
soundcloud | twitter
qwercus
Level 0
**



View Profile WWW
« Reply #6 on: July 09, 2013, 05:34:38 PM »

Haha, wow, please don't think of me as a guru. I've hacked together a bunch of small games and prototypes over the years, but I have yet to create a sizeable game. I do work as a Java developer though, so maybe I can be of some help Smiley

There are a few important things you get from using distributed version control:
1. Magic undo. You can see exactly what changes you've since the last commit and you can always undo some or all of them.
2. Proper backup. Push your changes to a reliable server (like github/bitbucket) and the code should be safe.
3. Seamless collaboration. If you (at some point) want to collaborate with someone it's super-easy if you're using version control already.

You get all that stuff for free when using the system. You may find yourself using it for more advanced things later (branching/tagging/bisecting etc.) but that's just bonus stuff for later.

Your basic work flow now should be:
1. Make changes to program, test that they work.
2. Verify that the changes look good with "git diff"
3. Use "git add" and "git commit" to save the changes as a commit
4. Goto 1 if you want to work more
5. Use "git push" to send the changes to your remote server (github/bitbucket)

Ideally commits should be "atomic", doing one conceptual change to the code. Like "Added nettles" or "Formatted all the code". It's a good practice to learn, but when working alone it's also fine to have commits that say "Today's work".

I think it's a good habit to publish your code and work on it in the open, in part because it helps you get over the feeling that your code is "ugly" (pretty much everyone's code is, especially game code). It also helps the community, as we can learn from each other, reuse other's code and contribute to interesting projects.

There's really no rational reason to keep the code private, unless you think that you want to sell the game later (and even then it can be a good idea to open source it). I put most of my stuff on github and slap a GPLv3 license on it (or LGPL if it's a library). That way people can use and modify the code as they see fit, submit patches or build something new from it (as long as they share it back under the same license). In this case, it would allow me to directly test your code to see that it runs properly for me and test updates as you write them (if I have the time Wink).

Well I suppose I won't really know the pros/cons unless I give it a shot.  I'll push my repository to github. Smiley
Logged

I make ♫♪
soundcloud | twitter
mushbuh
Level 9
****


Epic Laughs await you, traveler *tips steampunkhat


View Profile WWW
« Reply #7 on: July 09, 2013, 08:58:06 PM »

Interesting concept
Logged

Dacke
Level 10
*****



View Profile
« Reply #8 on: July 10, 2013, 12:56:33 AM »

I'm really glad you put your code on github Smiley

I got the game running in Eclipse and it's looking really nice! But I ran into a few problems that may be useful to know about (for you and others who want to run the code).



First I got the compile-time error "no lwjgl in java.library.path", which I fixed by adding this as a VM argument:
Code:
-Djava.library.path=lib/natives/linux



Then the program compiled, but when I tried to run the game it crashed almost immediately. Apparently my computer didn't like to load new images/spritesheets from disk every time a new plant was created.

A simple solution is to save the images as static variables, so that all instances of a class share the same image data. Each time you create a new plant you check if the spritesheet is available and only load it if it isn't. This will be much more effective (the game runs faster and uses much less RAM). It also stops the game from crashing on my computer. Like this:

Code: (Plant.java)
protected static SpriteSheet sheet;

...

if(sheet==null) {
   sheet = new SpriteSheet("res/plantSheet.png", tileSize, tileSize);
}

Code: (BareGround.java)
protected static Image plant0Image;

...

if(plant0Image==null) {
   plant0Image = new Image("res/plant0.png", false, Image.FILTER_NEAREST);
}

image = plant0Image;

Later you may want to load stuff in a more centralized way. But this should work perfectly for now.



It took me some time to figure out that I had to hold space to pull weeds (even after looking at the code). But that can easily be fixed later by adding a sprite and/or sound for that action.



I also got a FPS of 3000+ which seemed a bit excessive Grin. But that's just a matter of uncommenting the appgc.setTargetFrameRate(60) line in the main method, so no worries.



I noticed that you seem to be using Java 1.5. Do you have any particular reason for not using Java 6 or 7? Java 5 and 6 are no longer getting security updates so you should be able to assume that people have Java 7 installed (mostly).
« Last Edit: July 10, 2013, 03:43:44 AM by Dacke » Logged

programming • free software
animal liberation • veganism
anarcho-communism • intersectionality • feminism
qwercus
Level 0
**



View Profile WWW
« Reply #9 on: July 10, 2013, 02:08:20 PM »

Thank you so much for taking your time to test out and analyze the code!  It really means a lot. Smiley



First I got the compile-time error "no lwjgl in java.library.path", which I fixed by adding this as a VM argument:
Code:
-Djava.library.path=lib/natives/linux


Yes, I had to do that too.  I don't think there's any way to avoid that.  Perhaps I should just mention it in the README?




Then the program compiled, but when I tried to run the game it crashed almost immediately. Apparently my computer didn't like to load new images/spritesheets from disk every time a new plant was created.

A simple solution is to save the images as static variables, so that all instances of a class share the same image data. Each time you create a new plant you check if the spritesheet is available and only load it if it isn't. This will be much more effective (the game runs faster and uses much less RAM). It also stops the game from crashing on my computer.

Later you may want to load stuff in a more centralized way. But this should work perfectly for now.


Thanks for pointing that out.  That's something I would not have thought of.  I did exactly what you recommended, and memory use decreased a ton!




It took me some time to figure out that I had to hold space to pull weeds (even after looking at the code). But that can easily be fixed later by adding a sprite and/or sound for that action.


Yeah, that's not my biggest priority right now.  But you're right -- it's not intuitive.  I think I'll use some sort of animation or image and worry about sound later down the line.




I also got a FPS of 3000+ which seemed a bit excessive Grin. But that's just a matter of uncommenting the appgc.setTargetFrameRate(60) line in the main method, so no worries.


Woops!  Yeah there really wasn't any reason to have that commented.  I noticed that CPU usage went from about 90% to 10% after I un-commented that.




I noticed that you seem to be using Java 1.5. Do you have any particular reason for not using Java 6 or 7? Java 5 and 6 are no longer getting security updates so you should be able to assume that people have Java 7 installed (mostly).

I have a friend whose computer cannot support anything higher than 1.5 (he has a Power PC), and he really enjoys testing the game.  If you think it would be an issue, perhaps I could use Java 6 or 7 and switch to 1.5 to compile a .jar designed for him.
« Last Edit: July 10, 2013, 02:15:28 PM by Quercus » Logged

I make ♫♪
soundcloud | twitter
Dacke
Level 10
*****



View Profile
« Reply #10 on: July 10, 2013, 02:24:38 PM »

No problem, it's good practice for me at the same time. I really enjoy dipping into open source projects and lend a hand every now and again Smiley

The VM-path things is standard for lwjgl, just mention it in the README.

I wouldn’t worry about sounds either. An extra animation frame will work better anyway.

There are no dangers in writing Java 5 compatible code, so you can keep doing that! You'll miss out on some syntactic sugar from Java 7 when developing, but that's about it.
Logged

programming • free software
animal liberation • veganism
anarcho-communism • intersectionality • feminism
lordchibi
Level 0
**



View Profile WWW
« Reply #11 on: July 10, 2013, 11:49:29 PM »

Looking very interesting! Biodiversity is a theme that has always fascinated me in games, definitely following this. I know I will end up giving the theme a shot myself at some point, but I feel it's going to be more about creating a biome with both flora and fauna and keeping it in balance.
Logged

Niklas Saari - Producer and Holder of Visions @ Team Jolly Roger
Currently working on Interplanetary [DevLogs][Dev blog]
Romm22
TIGBaby
*


View Profile
« Reply #12 on: July 11, 2013, 05:22:16 AM »

 Hand Thumbs Up Right A very nice, simple concept that I can't wait to see develop over time  Smiley
Logged

\\\"Noice\\\" -TromboneBanjo
OneMoreGo
Level 3
***

Stop looking at my chest


View Profile
« Reply #13 on: July 11, 2013, 05:43:18 AM »

Weeding the garden is actually really nice and therapeutic (when I can be bothered  Tongue ) so this sounds like a great idea.
Logged
doihaveto
Level 2
**



View Profile
« Reply #14 on: July 11, 2013, 07:31:55 AM »

What a great starting concept. This could grow in so many directions - something more like a Conway Game of Life (play with cellular automata to grow your garden), or something more action-oriented (shoo animals away or try to trap them), etc etc. This has a ton of potential!

By the way, have you played SimLife? It's an old-school artificial life simulator. Your screenshot reminded me a bit of it...
Logged

qwercus
Level 0
**



View Profile WWW
« Reply #15 on: July 14, 2013, 07:30:51 PM »

Progress!

  • Seeds can disperse in all 8 directions around plant.  The number of seeds and their placement are random.
  • Plants designated as perennials do not disappear after seeding.
  • Plants that have rhizomes can spread both in the flowering and seeding stages.
  • The number of weeds left in a plot is displayed at the top of the screen.
  • The number of non-weeds that you can pull is displayed at the top of the screen.  If you pull too many, you will lose.
  • There is a time limit for each plot.  If you fail to remove all the weeds before the time is up, you lose.
  • There are now 6 more species.



Pictures

New plants!


left to right: sorrel, dandelion, butterfly milkweed, yarrow, wild lupine, and panic grass

Numbers!!!

The numbers from left to right: the number of weeds, the number of mistakes remaining, and the timer.



Thank you for all your feedback!  I will reply to your posts tomorrow.
« Last Edit: July 14, 2013, 07:46:13 PM by Quercus » Logged

I make ♫♪
soundcloud | twitter
qwercus
Level 0
**



View Profile WWW
« Reply #16 on: July 15, 2013, 01:29:01 PM »

Looking very interesting! Biodiversity is a theme that has always fascinated me in games, definitely following this. I know I will end up giving the theme a shot myself at some point, but I feel it's going to be more about creating a biome with both flora and fauna and keeping it in balance.

Thanks!  And I think your idea sounds really interesting too, and much more complex than this game.  I'm trying to keep this game relatively simple, so I think that the most there will be in this game about biodiversity will the general variation of species between plots, but maybe down the road I'll think of other ways to implement what I've learned about biodiversity into the game.
Logged

I make ♫♪
soundcloud | twitter
qwercus
Level 0
**



View Profile WWW
« Reply #17 on: July 15, 2013, 01:29:37 PM »

Hand Thumbs Up Right A very nice, simple concept that I can't wait to see develop over time  Smiley

Thanks Romm. Smiley
Logged

I make ♫♪
soundcloud | twitter
qwercus
Level 0
**



View Profile WWW
« Reply #18 on: July 15, 2013, 01:31:14 PM »

Weeding the garden is actually really nice and therapeutic (when I can be bothered  Tongue ) so this sounds like a great idea.

Haha, well I think this might be a little less relaxing and a bit faster paced.  But I hope it will much more fun than weeding a garden in real life. Thanks. Smiley
Logged

I make ♫♪
soundcloud | twitter
qwercus
Level 0
**



View Profile WWW
« Reply #19 on: July 15, 2013, 01:35:23 PM »

What a great starting concept. This could grow in so many directions - something more like a Conway Game of Life (play with cellular automata to grow your garden), or something more action-oriented (shoo animals away or try to trap them), etc etc. This has a ton of potential!

By the way, have you played SimLife? It's an old-school artificial life simulator. Your screenshot reminded me a bit of it...

I'm definitely aiming toward something more action-oriented.  The animal idea you have is a great one.  I think down the line I might add pests (insects, gophers, etc.) that you have to deal with to prevent plants from being damaged. 

I have actually never played or heard of SimLife before, but after seeing some videos of it I can see that the plant tiles look and behave similarly.
Logged

I make ♫♪
soundcloud | twitter
Pages: [1] 2
Print
Jump to:  

Theme orange-lt created by panic