Qbasicnews.com
July 21, 2018, 07:44:32 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Back to Qbasicnews.com | QB Online Help | FAQ | Chat | All Basic Code | QB Knowledge Base
 
   Home   Help Search Login Register  
Pages: [1] 2
  Print  
Author Topic: Dot Life Simulator  (Read 12991 times)
Meg
Ancient QBer
****
Posts: 483


« on: October 15, 2004, 10:48:54 AM »

Hey, I was reading this thread ( http://forum.qbasicnews.com/viewtopic.php?t=6963 ) in the programming help forum, and got me thinking about trying a sim project.

This is the very rudimentary work I've done so far.  It's very basic at this stage; the code is heavily documented so it shouldn't be too hard to follow.

{edit: will update links as it's updated.}
http://www.ifcdata.com/mb/qb/dots-11-10-2004.txt
{/edit}

I'd be interested in getting a bunch of you who are interested in furthering this project involved.  Obviously there is a limitless number of ways to make this program more interesting.  Let's start small, though, and see where the project goes.

Some of my ideas:

1. No more random movements.  Make a dot variable that's a scale ranging from shy<--->social, and have it locate the nearest dot and either move towards it or away from it.  Adjust the shy<-->social variable depending on stuff like if the dot gets into a fight, mates, reaches certain ages, etc.

2. Instead of instant birth, have the female dots go through pregnancy (show with new color of dot).  Environmental variables can adjust the length of pregnancy.

3. Rework the dying of old age code to be more realistic (the older you get, the higher the chance of death each year)

4. Replace the current "death fight" encounter (occurs 50% of time when dots of same sex meet) with something more interesting.

Let's keep the changes to things of this calibur for now (i.e. no adding food pellets that the dots fight for, hunters/prey, etc).  All ideas welcome!

*peace*

Meg.
Logged
Torahteen
Ancient Guru
****
Posts: 743



« Reply #1 on: October 15, 2004, 11:18:24 AM »

This looks  very interesting. I would like to help, but keep in mind that my Coding skills are limited. I would still hope for others to join.
Logged

quote="Deleter"]judging gameplay, you can adaquately compare quake 4 with pong[/quote]
potato
Ancient QBer
****
Posts: 409



WWW
« Reply #2 on: October 15, 2004, 01:58:11 PM »

I was one of the interested ;o

Create a CVS or management system and I'll add to it every now and then.
Logged

ammit potato!
Torahteen
Ancient Guru
****
Posts: 743



« Reply #3 on: October 15, 2004, 02:35:17 PM »

Screw my last two posts :lol: . I have made up my mind :roll:, finally. I will help out.  Could you send me a copy of the *.bas file? I will PM you with my e-mail, as I don't believe that I have it publicly posted. I have an idea for the fighting subject.
Logged

quote="Deleter"]judging gameplay, you can adaquately compare quake 4 with pong[/quote]
Meg
Ancient QBer
****
Posts: 483


« Reply #4 on: October 15, 2004, 04:35:16 PM »

the .bas file and the .txt file (linked in my original post) are the same.  just download the .txt file and rename it to .bas extension.

*peace*

Meg.

edit:  Feel free to post your ideas here; maybe it will spark another idea in somebody else.
Logged
Meg
Ancient QBer
****
Posts: 483


« Reply #5 on: October 19, 2004, 12:00:46 PM »

updated the link in the initial post.  here's a direct link:

http://www.ifcdata.com/mb/dots-10-19-2004.txt

* added text log so you can tell what's going on with the dots.

* added unique ID number for each dot so that even once a dot has died and is removed from the array, you can still reference it historically.  This is useful because it ties into the next new thing:

* added two new variables to the dots: mom and dad.  These contain the ID number of the new dot's parents.  This can be used for any number of things.  For example, make it so that a dot won't kill its parents.  Or make it so that the dot follows its parents for the first 10 years of its life.  Or make it so that dots with common parents won't mate.
Logged
whitetiger0990
__/--\__
*****
Posts: 2964



WWW
« Reply #6 on: October 19, 2004, 10:25:19 PM »

That thing to so cool!

My dots keep killing themselves when they are young so everyone dies after the parents grow to old....
Logged


[size=10]Back by popular demand!
I will byte and nibble you bit by bit until nothing remains but crumbs.[/size]
Torahteen
Ancient Guru
****
Posts: 743



« Reply #7 on: October 19, 2004, 10:44:15 PM »

I will have to test that out. By the way, in the Init sub, I tried to make it so that the screen is wider. I had the same outcome. Put
Code:
WINDOW SCREEN (0,0)-(100,100)

in the  Init sub and try it out. I also am thinking of making that a bit smaller, so that you could have room to put a message center. One that tells you when a dot dies, and which dot. Just a thought.
Logged

quote="Deleter"]judging gameplay, you can adaquately compare quake 4 with pong[/quote]
Torahteen
Ancient Guru
****
Posts: 743



« Reply #8 on: October 19, 2004, 11:08:05 PM »

I fell so stupid :oops: . I should have run it before I posted. You already had a message center. That thing is so cool. Hope you don't mind, but I changed a few things. I made it so that the dots can have twins. I just used a random number, 1 or 2, so I will have to come up with a better way. Also, I made it so that the width of the Environment is as wide as it could be (75 with the WINDOW SCREEN command). It is working nicely. Keep working on it!
Logged

quote="Deleter"]judging gameplay, you can adaquately compare quake 4 with pong[/quote]
Meg
Ancient QBer
****
Posts: 483


« Reply #9 on: October 20, 2004, 12:49:36 AM »

You can adjust the environment dimensions in the Initialize sub by changing the values of Env.x and Env.y
Logged
Torahteen
Ancient Guru
****
Posts: 743



« Reply #10 on: October 20, 2004, 12:26:46 PM »

Quote from: "Meg"
You can adjust the environment dimensions in the Initialize sub by changing the values of Env.x and Env.y


True, but using WINDOW SCREEN, makes the dots look spread out. Having a screen resolution of only 75 by 75, makes the environment be able to fill the screen without having to make it 320 pixels wide. Understand now?

I have adjusted a few things such as making it so that they cannot act twice in a turn. Apparently you hadn't done that. Before, a mom was mating with 2 or three different dads in the same turn.

Another thing I want to do, is make the dots "Migrate" from one side to the other or something like that. That way, they don't get stuck together and get too crowded, which is what has been happening on my sims. They just keep mulitplying out of control. Shocked
Logged

quote="Deleter"]judging gameplay, you can adaquately compare quake 4 with pong[/quote]
Meg
Ancient QBer
****
Posts: 483


« Reply #11 on: October 20, 2004, 01:13:09 PM »

To make the dots perform only one act per turn, simply change the last two lines of the ClashDots() subroutine:

Code:
Dot(D1%).act = 1
Dot(D2%).act = 1


I've uploaded an updated sim to reflect these changes.  The link's in the top post.

* modified code so that dots will only perform a single action per turn

* added the option for wrap-around edges: Env.wrp (0=solid, 1=wrap-around).  You can set this value in the Initialize subroutine.

NOTE:  To people who are testing this thing out.  You are *supposed* to change the values in the Initialize subroutine.  Test out different sized environments, and play around with the ages.  And feel free to post ideas for changes.
Logged
Meg
Ancient QBer
****
Posts: 483


« Reply #12 on: November 10, 2004, 12:46:07 PM »

Hey, I haven't worked on this project much over the last few weeks, but I didn't want the thread to die, so here's a couple really minor updates.  As always, the updated code link is posted in the first post of the thread:

* Changed the screen mode from 13 to 12 to allow for more text on the screen.

* Removed the clunky string array with a modified viewport so the PRINT command can be used directly intead of passing strings.

My next big update is going to include some kind of "intelligence/awareness" scale.  This will be inherited from the parents plus/minus a random amount.

*peace*

Meg.
Logged
adosorken
*/-\*
*****
Posts: 3655



WWW
« Reply #13 on: November 10, 2004, 02:24:09 PM »

Quote from: "Torahteen"
Before, a mom was mating with 2 or three different dads in the same turn.

Sounds like MY mother. :roll:
Logged

I'd knock on wood, but my desk is particle board.
Torahteen
Ancient Guru
****
Posts: 743



« Reply #14 on: November 18, 2004, 02:39:21 PM »

Sad Oh, sorry.

I will have to look at that. What do you mean "Awareness"?
Logged

quote="Deleter"]judging gameplay, you can adaquately compare quake 4 with pong[/quote]
Pages: [1] 2
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!