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.

Work in Progress / 2D biological cell simulation program (no media, core engine finished, code included)

Author
Message
qwe
21
Years of Service
User Offline
Joined: 3rd Sep 2003
Location: place
Posted: 10th Jul 2006 10:52 Edited at: 11th Sep 2006 04:04
Basic concept: 2d array (300 by 300) where there are a number of different molecules present. Each molecule floats about. Certain molecules do certain things. Read the description, or go run the code

For example, in the code included, there are a few (only about 6, its just the core engine and some test molecules) molecules floating. the blue one is an enzyme. whenever it comes into contact with glucose (green) the glucose is turned into two pyruvate (red), and two ATPs nearby are turned into ADPs (ATP is the energy currency of the cell, and when a phosphate is taken for its energy, ATP is degraded to ADP). of course, the finished program will be a lot more complicated but you get the general idea

Thus in this test program you will see the glucose counter go down, and the pyruvate counter go up twice as fast

its a science program, the first coding goal is to get a self-sustaining cell. the second is to add cool stuff. for example, the user could turn a point in the array into a cyanide fountain, or introduce a virus, etc etc

if anybody would like to offer suggestions, or hop on and help, that'd be cool

NEW UPDATE! Sept 10

User GUI is fully implemented. you can place/erase molecules, select which molecule to place, select size of 'pen', load and save

the .exe file and code are here (last updated September 10):
http://www.votewehrle.com/qwe/cell.rar
UFO
18
Years of Service
User Offline
Joined: 11th Oct 2005
Location:
Posted: 10th Jul 2006 16:15
Can you post the exe please? I don't have DBP.

Thanks

qwe
21
Years of Service
User Offline
Joined: 3rd Sep 2003
Location: place
Posted: 11th Jul 2006 00:17 Edited at: 11th Jul 2006 00:20
sure:
http://www.votewehrle.com/qwe/cell.exe

i have some changes for the structure of the code planned and some features. then ill be adding the molecules

i've yet to read the genetics section of my biology textbook, once i'm through with that i'll be able to design this fully
UFO
18
Years of Service
User Offline
Joined: 11th Oct 2005
Location:
Posted: 11th Jul 2006 00:22
Neat! I have no clue what's happening (), but it looks cool! I'm following this...

qwe
21
Years of Service
User Offline
Joined: 3rd Sep 2003
Location: place
Posted: 11th Jul 2006 01:24
^each molecule floats about randomly (it gets a random direction each loop). if a green molecule happens to be directly to the right of a blue molecule, the blue molecule makes the green molecule dissapear, and two red molecules (one to the right and one to the bottom of the blue molecule) appear

the finished program will have many molecules all interacting as a self-sustaining system
Pincho Paxton
21
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 11th Jul 2006 01:41
It's fast!!! I thought it would be slow.

qwe
21
Years of Service
User Offline
Joined: 3rd Sep 2003
Location: place
Posted: 11th Jul 2006 02:33
^what FPS do you get? there's going to be a lot more molecules, so im afraid the final program might be rather slow i get 24 FPS with 2.5ghz, my sisters computer gets 30-40 FPS with 3.0 ghz
jasonhtml
20
Years of Service
User Offline
Joined: 20th Mar 2004
Location: OC, California, USA
Posted: 11th Jul 2006 02:35 Edited at: 11th Jul 2006 02:36
wow, this is cool

EDIT: i get about 24-28 fps on a 2.4 Ghz


Thread: http://forum.thegamecreators.com/?m=forum_view&t=78971&b=8&p=0
*New Website Coming Soon*
qwe
21
Years of Service
User Offline
Joined: 3rd Sep 2003
Location: place
Posted: 11th Jul 2006 06:13
update! (the EXE at the begining is also updated)

code is restructured, it's much easier to add molecules now

there is unfortunately a net movement upward for the particles. this means they collect at the top of the cell. i need to figure out a way to stop this

for those interesting in the science of it, read this:
dab
20
Years of Service
User Offline
Joined: 22nd Sep 2004
Location: Your Temp Folder!
Posted: 11th Jul 2006 08:41 Edited at: 11th Jul 2006 08:41
I get 50-ish fps:
amd athlon 64 (2.12 ghz) (1gig ram)

Not sure what's happening. but it does look cool.

UFO
18
Years of Service
User Offline
Joined: 11th Oct 2005
Location:
Posted: 11th Jul 2006 16:52
I get 26 at 2.4ghz and 510MB RAM

NeX the Fairly Fast Ferret
19
Years of Service
User Offline
Joined: 10th Apr 2005
Location: The Fifth Plane of Oblivion
Posted: 11th Jul 2006 20:09 Edited at: 11th Jul 2006 20:09
39FPS on a 1.8GHZ Athlon XP. It does something wierd to my Media Player, though:



Chain Mail doesn't scare me! My G-CON can melt any Medieval armour!

Attachments

Login to view attachments
Oneka
20
Years of Service
User Offline
Joined: 24th Apr 2004
Location: Hampton,VA
Posted: 11th Jul 2006 21:28 Edited at: 11th Jul 2006 21:28
Is mine dead?




Making better games everday!
Oh yeah and just so you know its Oh-nek-a not One-ka!

Attachments

Login to view attachments
qwe
21
Years of Service
User Offline
Joined: 3rd Sep 2003
Location: place
Posted: 11th Jul 2006 23:08 Edited at: 11th Jul 2006 23:09
^they aren't really alive yet, these are just test reactions going on in the cell

the exe has been updated btw. now there are proteins that move along the cell membrane. they dont facilitate diffusion yet though

i need to stop that net movement upward so they don't collect at the top, then read the genetics unit in my biology textbook, then i'll be able to design a cell model that could be considered 'living'
Oneka
20
Years of Service
User Offline
Joined: 24th Apr 2004
Location: Hampton,VA
Posted: 11th Jul 2006 23:45
Dont forget to add cell division and all the other stuff xD


Making better games everday!
Oh yeah and just so you know its Oh-nek-a not One-ka!
Gil Galvanti
19
Years of Service
User Offline
Joined: 22nd Dec 2004
Location: Texas, United States
Posted: 12th Jul 2006 01:15
looks cool even though I have no clue whats going on .

Pirates of Port Royale
Live the life of a pirate.
qwe
21
Years of Service
User Offline
Joined: 3rd Sep 2003
Location: place
Posted: 12th Jul 2006 01:32 Edited at: 12th Jul 2006 01:33
Quote: "Dont forget to add cell division and all the other stuff xD"

unfortunately i dont know how i would code a phospholipid molecule that would of itself form into circles with other phospholipids. so, the membrane is static. thus i cant show osmosis or cell division or vesicle transport

to those who posted screenshots, would you mind making them smaller in photoshop or paint, or taking them off? the thread is screwed up for those with 1024x768 resolutions (my monitor wont go higher). thanks
Diggsey
18
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 12th Jul 2006 17:28
My framerate's so low after a while that my cell got frostbite It's also going yellow at the corner





There are three types of people, those that can count and those that can't.
Opposing force
19
Years of Service
User Offline
Joined: 10th Aug 2005
Location: England
Posted: 12th Jul 2006 22:37
Hey, I like this program. Good work qwe. I just spent 5 minutes staring at the Adenosine Triphosphate, as it filled the circle.

visit http://www.freewebs.com/teammegabasic for FPSC models, media and games.
qwe
21
Years of Service
User Offline
Joined: 3rd Sep 2003
Location: place
Posted: 13th Jul 2006 08:18
^thanks
Diggsey, did you change the code?
qwe
21
Years of Service
User Offline
Joined: 3rd Sep 2003
Location: place
Posted: 20th Jul 2006 09:01 Edited at: 20th Jul 2006 09:01
I'm going on vacation. I'm mostly through the genetics part of my textbook, the overall molecular setup of the cell will be designed early vacation (ill have laptop) and ill impliment it through the vacation. when i come back, i expect to live a living "breathing" cell and features for the user to interact with it
DVader
20
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 26th Jul 2006 02:42
Runs at 55-59 fps on my ath 64 3500. Down to 22 and less on play mode. looks nice though, reminds me of folding at home in a fashion.
qwe
21
Years of Service
User Offline
Joined: 3rd Sep 2003
Location: place
Posted: 17th Aug 2006 04:28 Edited at: 17th Aug 2006 04:32
just to let you guys know, im still working on this, on and off. i didnt get anything done over vacation though heh

im trying to get the membrane molecules to sguiggle (without making any leaks). if the membrane is not static, i can include such things as cell division and vesicle transport

an update will come when im done with the membrane code
FoxBlitzz
20
Years of Service
User Offline
Joined: 19th Nov 2003
Location: United States
Posted: 17th Aug 2006 09:58
Aw come on. I know that this thing should get over 40 FPS on my specs. D: Also, the Net Y Move is horrifically inaccurate. It keeps decreasing further and further. It's not reasonably balanced in the middle like the Net X Move is.

AMD Athlon 64 X2 4200+
1GB DDR-SDRAM (May increase to 2GB one day)
512MB ATI Radeon X1800 Series - Finally! A card that does pixel shaders correctly!
Josh
21
Years of Service
User Offline
Joined: 7th Dec 2002
Location: Pompey, Great Britain =D
Posted: 17th Aug 2006 23:00
Wow this is a fantastically interesting experiment!

I'm getting 39 FPS on my 1.7Ghz Pentium M with 512MB RAM. (Yes this is just a laptop )

@FoxBlitzz: lol wouldn't think my laptop could beat your PC, looking at your specs.

Any chance you could explain things in more detail, but in layman’s terms? For those of us not so much "in-the-know".

qwe
21
Years of Service
User Offline
Joined: 3rd Sep 2003
Location: place
Posted: 18th Aug 2006 03:12 Edited at: 18th Aug 2006 03:33
check original post for updated code and .exe

Quote: "the Net Y Move is horrifically inaccurate. It keeps decreasing further and further. It's not reasonably balanced in the middle like the Net X Move is."

didnt you see the molecules floating upward though? the net-y-move was not innacurate, the molecules did have a net movement upward. ive fixed it in the latest update

Quote: "Any chance you could explain things in more detail, but in layman’s terms? For those of us not so much "in-the-know"."

my goal is to make a simulation of cellular processes. all of the major aspects of the cell will be included:

* taking in glucose and other sources of energy, turning the glucose into usable energy (ATP), then using ATP for various tasks to maintain and grow the cell
- [a part of this process is already included. when a glucose and two ATP come in contact with the blue enzyme, the glucose is turned into two G3P and the two ATP are degraded to ADP. this is only the begining of the process that turns glucose into ATP energy (glycolysis)]

* reproduction/cell division
- [the cell will have DNA, which will split into two copies, and the cell will split into two. one of the new cells will just dissapear and the other will have room to grow again into a full cell, and the cycle will repeat]

* the DNA code causing production of proteins (the work molecules of the cell, the molecules that build other molecules)
- [certain proteins will, when in contact with the DNA in the center of the cell and the necessary materials, create RNA strands from the DNA. the RNA strands, when in contact with ribosomes, will produce proteins. proteins will be hte molecules producing and modifying the cell]

after ive achieved a self-sustaining cell, ill include features that let the user 'play' with the cell, by for example, placing cyanide and watching the production of ATP using oxygen cease, thus killing the cell, or introducing a bacteria or virus (or even trying to 'cure' the infected cell)

p.s. mods is there any way you can deletet Nex's and Oneka's pictures? reading on this thread is annoying when you have to scroll to the left and right. thanks
Bmad6
19
Years of Service
User Offline
Joined: 25th Aug 2005
Location: Virginia, United States
Posted: 5th Sep 2006 05:44 Edited at: 5th Sep 2006 06:12
I'm gonna try to write some code which will allow you to have a membrane which you can manipulate to create cell division and other cool tricks... I'm looking at your current membrane code now...

UPDATE:
Whoa - Place_cell_membrane looks really confusing... what does all that crazy stuff there with the x and y coordinates do?

UPDATE:
Oh, I get it now... but, wouldn't it make more sense to do that with sine and cosine? (sin() and cos()?)

UPDATE:
Also, if you're worried about fps, why not change your counting algorithm so that it's a little more speed-friendly? Instead of iterating through and recounting all of the molecules every loop, why not just count at the beginning, then increment or decrement the count for each molecule type as you add or remove molecules?

UPDATE: (I love the edit button. )
Ok, I give up - where's the code that adds and removes molecules? I can't seem to find it...

Harvard's Law, as Applied to Computers:
Under the most rigorously controlled conditions of pressure, temperature, volume, humidity and other variables, the computer will do as it d*mn well pleases.
qwe
21
Years of Service
User Offline
Joined: 3rd Sep 2003
Location: place
Posted: 5th Sep 2006 11:58 Edited at: 5th Sep 2006 12:07
^hey im sorry about the confusing code. if you want to help i can add comments and simplify things. also i just loaded an update: adding the membrane at start is much simpler, and the FPS is much higher because i rearranged the structure of the code somewhat, and the cell membrane molecule seems to work pretty good now

>>Whoa - Place_cell_membrane looks really confusing... what does all that crazy stuff there with the x and y coordinates do?>>

it was a weird way of putting a circle. my circle equation made left gaps, though, so i made another circle too. then i did some other stuff, lol

>>where's the code that adds and removes molecules>>
do you mean by the user with the mouse? look at the function 'do_user_molecule_interface()'

p.s. if you want to play around with the 'pen' tool (im about to add the gui interface for it tomorow so user can select pen size, and what molecule to add when clicking the mouse) look in ini.dba and look for the variables pen_size and pen_mol. right now its set to a size of 2 (2x2) and the phospholipid molecule
qwe
21
Years of Service
User Offline
Joined: 3rd Sep 2003
Location: place
Posted: 11th Sep 2006 04:14
Update! User GUI fully implemented. should only take a minute to become familiar with the controls. thoughts?
Bizar Guy
19
Years of Service
User Offline
Joined: 20th Apr 2005
Location: Bostonland
Posted: 11th Sep 2006 22:16
I wonder, would this qalify as a 'living' virtual cell if it acted exactly like a real cell?

Login to post a reply

Server time is: 2024-09-29 16:37:25
Your offset time is: 2024-09-29 16:37:25