Watch here for information about this project: https://www.youtube.com/watch?v=o1IheoDRdGE
Runs with Processing 3.3.3 (perhaps it will work on earlier version, but I am not sure.) Get it here: https://processing.org/
Watch here for information about this project: https://www.youtube.com/watch?v=o1IheoDRdGE
License: MIT License
Watch here for information about this project: https://www.youtube.com/watch?v=o1IheoDRdGE
Runs with Processing 3.3.3 (perhaps it will work on earlier version, but I am not sure.) Get it here: https://processing.org/
I opened the game and it cropped the window so the UGO button is offscreen
There doesn't seem to be a way to remove either codons or UGOs from a cell.
For codons, I would suggest "remove" and then "RGL<>"
For UGOs, I would suggest "remove" and then "Weak Loc"
Additionally, it would be neat if "remove" "inwards" removed all food, waste, and UGOs from a cell.
First of all, I respect the effort that carykh has made in making this "simulation game" to entertain and let more people learn about biology and virology.
However I am of the philosophy that when you let people get insight on your project and let them access to your source code they should know how to build on that project and make more from it. I have tried to change the cell arrangements in the simulation to test some fun experiments (What if I fill the entire grid with living cells? What if I scale up the map and separate the cells far away from each other?). It is not possible or it's unclear from the provided code how to do that. Of course I've seen this comment in the Cell.pde file :
/*
0: empty
1: empty, inaccessible
2: normal cell
3: waste management cell
4: gene-removing cell
*/
But it doesn't explain clearly what each of these cell types do. 1 is black walls and 2 is living cells but where exactly do I need to put 3 and 4 cells?
I could determine that food particles can only spawn from empty cells (2) and that having none crashes the game. But why can't I manage to have a working simulation where the code for expelling waste doesn't crash the game ? I know cells can't be put on the edges else the waste can get expelled out of the map crashing instantly but theres something else I don't get, probably with those strange seemingly empty 3 and 4 cells.
Thank you again carykh for all your work but I hoped I won't have to spend hours in trial and error and I could get info about how I can modify the simulation without breaking it.
Oh and to modify the cell types I made the function "int getTypeFromXY(int preX, int preY)" in virus.pde return the cell type I want for every tile in the simulation.
The only way I can infect a cell is by manually throwing a virus at it. After the viruses reproduce and leave the cell, they just bounce off the other uninfected cells, as if they were infected. Redownloading the game seems fix it, but the problem is back when I close it and open it back up. So I would have to redownload it every time I want to reset the map. Also I didn't change the code at all. When I close programming 3.3.3 it doesn't say anything about saving changes like it usually would.
error: ArrayIndexOutOfBoundsException: <WORLD_SIZE>
it happens in:
cell.pde
line #329
in function: public void pushOut(Particle waste)
while(chosen == -1 || cells[y+dire[chosen][1]][x+dire[chosen][0]].type != 0){
(i know I'm talking like a compiler error)
As you can see the right side of the image is cut off.
Although if I try to make it any wider I might have problems with #4.
The bottom of the screen is cut off too. (just a little bit - you might have to zoom in to see it!)
I tested the sim with FX2D and it is considerably faster. That's all, I experienced no issues, just it being way faster, due to being rendered on the gpu.
Just make the size line say
size(1728,972, FX2D);
hey Carykh! your UI is too big
i tried using the scale(0.5) int the draw method but it didnt work
tried chanding the window resolution in the setup() to size(1280,720);
tried changing the drawUI scale to scale(0.75) it work but the buttons click is still on the original scale
i think this means you need to import this to unity or something hahaha
makes it easier for rendering stuff
I ran the program on Processing and the window was too big for my 13" MacBook Pro.
Workaround: change display settings and scale everything down.
When world size is larger than 12, the camera will refuse to zoom above where it would in if world size was 12. The zoom that the game starts with is correct, but if you zoom in, you will never be able to zoom all the way out again. You also are able to zoom in a bit further that normally possible in a size 12 world. (After checking the code, this should al also apply inversely on smaller worlds))
I also noticed that the amount of food both initially generated and generated over time was too large for small worlds, and too small for large worlds. After poking around, it turns out that this is because the variable foodLimit in virus.pde is static and independent on world size. I'm actually not certain on whether this is unintentional, as it could be that this variable was just left to be manually edited.
I'm not here to complain and do nothing about it though, so I've worked out the solutions
I looked at the zoom function and found an easy solution that only requires editing one line. It fixes both zooming in and out in both larger and smaller worlds.
Just change the if statement on line 331 of virus.pde to this:
if ((camS > 50/(WORLD_SIZE/12) || e < 0.0) && (camS < 1000/(WORLD_SIZE/12) || e > 0.0)) {
this will adjust the maximum and minimum view to the world size to make it equivalent to if it were a size 12 world
If the food amount being static is unintentional, then the solution is to just scale the food limit to the world size. We can do this while retaining the ability to easily alter the food limit by splitting foodLimit into two variables, foodLimit and localFoodLimit. Local food limit should be set to whatever "foodLimit" would previously be set to in a size 12 world, and foodLimit will scale to match it.
Replacing lines 6 of virus.pde with this:
int localFoodLimit = 180;
and then add this line below it:
int foodLimit = (int) Math.round(localFoodLimit*(WORLD_SIZE/12));
here, 180 would be replaced with any positive integer.
Are the commands not supposed to be able to operate on as many things as possible? I think deleting and repairing codons (rgl values) is pretty obvious, but what about removing ugos, digesting waste, stuff like that.
I've been trying to create a self replicating virus but it copies "[NOTHING]" into memory. Though the funny thing is that an RLG codon got loose in the environment & actually created new 5 codon viruses, which unfortunately didn't make it to the second generation, but it was amazing. Any suggestions on how to fix this?
java.lang.ArrayIndexOutOfBoundsException: 31
at virus$Cell.pushOut(virus.java:1054)
at virus$Cell.doAction(virus.java:911)
at virus$Cell.iterate(virus.java:883)
at virus.iterate(virus.java:185)
at virus.draw(virus.java:116)
at processing.core.PApplet.handleDraw(PApplet.java:2482)
at processing.awt.PSurfaceAWT$12.callDraw(PSurfaceAWT.java:1547)
at processing.core.PSurfaceNone$AnimationThread.run(PSurfaceNone.java:313)
I was able to fix by setting all cells on the edge to empty (type 0) in getTypeFromXY
int getTypeFromXY(int preX, int preY){
//set all cells on the edge to emtpy
if ( preX >= WORLD_SIZE - 1 || preY >= WORLD_SIZE - 1 ) {
return 0;
}
...
It's very hard to distinguish the food and waste circles for me (and probably a lot of other people). It would be great, if you could use some other color combination that is less prone to this problem. (red + blue?)
Or use different shapes to eliminate the problem altogether. (Circles and empty circles? Stars?)
Zooming in with touchpad is ok, but zooming out just makes everything shake.
while(chosen == -1 || cells[y+dire[chosen][1]][x+dire[chosen][0]].type != 0){
)there was a error where digest doesnt work
Please add a license so that people can use your code :)
// This makes things more readable if used correctly
/*
Please use those
things because they make
things more readable
Please.
*/
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.