Author Topic: Short intro + Project/status updates  (Read 1334 times)

0 Members and 1 Guest are viewing this topic.

Offline pjwaffle (OP)

  • Able Ordinary Rate
  • p
  • Posts: 3
Short intro + Project/status updates
« on: November 21, 2011, 06:19:03 PM »
Hey guys, I'm pjwaffle, etc.   

Aurora has inspired me to create a simulation just as detailed, but down to a smaller scale - like a city or country, where we'd be focusing on individuals and governments rather than planets and empires.     Basically it'd look like this:

* Each individual is AI controlled and has an "instruction set" for communicating with other individuals.     Including trade, knowledge transfer, requests/orders, etc.   
* They will be in a randomly/semi-randomly generated X by X world, 3D but with a 2D map.   
* They all will have various goals, to simplify initially this could be "have X of a certain resource", "develop a certain technology", or "create the sole government".     Each goal would have sub-goals/steps towards accomplishing it.   
* They can co-operate or fight to achieve these goals.   
* The game may eventually have free-form governments/societies with set role-types, but may initially have fixed government types that are simple.   
* There would be various detailed simulations of the agents and their environments.    .    .     For example, industrializing may drastically pollute the environment (I'm no environmentalist - but hey, you have to acknowledge science!), or stabbing someone may cause them to bleed to death over time.   
* The agents can participate in a free market in a capitalist society, or work for the state/community in a communist/socialist one.   
* The agents can build buildings, equipment, weapons, etc.   

My initial goal for the game would be to have a randomly generated environment with different types of resources.    .    .     The agents can compete to get them and create weapons to fight.   

Can anyone offer any advice or tell me where to start?

I know I could totally make this given the determination (it's within my abilities).    .    .     It's just I don't know where to start.   

Thanks in advance/thanks currently!

PJ

EDIT: Also, the AI would NOT be "learning", it would just be really flexible and have complex goal systems.    (eg.    goal to mine might include goal to make wood pickaxe, goal to walk to mine, etc.   )
« Last Edit: November 21, 2011, 08:19:39 PM by pjwaffle »
 

Offline Erik L

  • Administrator
  • Admiral of the Fleet
  • *****
  • Posts: 5657
  • Thanked: 372 times
  • Forum Admin
  • Discord Username: icehawke
  • 2020 Supporter 2020 Supporter : Donate for 2020
    2022 Supporter 2022 Supporter : Donate for 2022
    Gold Supporter Gold Supporter : Support the forums with a Gold subscription
    2021 Supporter 2021 Supporter : Donate for 2021
Re: My introduction + How would I do the following...
« Reply #1 on: November 21, 2011, 06:54:13 PM »
Personally, I'd start with the map generation. Get your map and resource nodes generating consistently. Then work on spawning your agents.
 

Offline pjwaffle (OP)

  • Able Ordinary Rate
  • p
  • Posts: 3
My short intro + project and status updates
« Reply #2 on: November 21, 2011, 07:35:19 PM »
Quote from: Erik Luken link=topic=4379.     msg43581#msg43581 date=1321923253
Personally, I'd start with the map generation.      Get your map and resource nodes generating consistently.      Then work on spawning your agents.     

Status update, I've written a grid of 16x16 "H" bitmaps as a test, it works flawlessly and is resizable.     

PNG attached. 

And my code:
Code: [Select]
Imports System.IO

Public Class SimulationMap
    Dim bmpStream As Stream = File.OpenRead("testtile.bmp")
    Dim bmp As New Bitmap(bmpStream)

    Private Sub LoadBMPTile(ByRef gfx As Graphics, ByVal posX As Integer, ByVal posY As Integer)
        Dim point As New Point(posX, posY)
        gfx.DrawImage(bmp, point)
    End Sub

    Private Sub SimulationMap_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Paint
        Dim rect As New Rectangle(0, 0, Me.Width, Me.Height)
        Dim gfx As Graphics = Me.CreateGraphics()
        For X As Integer = 0 To Me.Size.Width Step 16
            For Y As Integer = 0 To Me.Size.Height Step 16
                LoadBMPTile(gfx, X, Y)
            Next
        Next
        gfx.DrawRectangle(Pens.White, rect)
    End Sub
End Class
« Last Edit: November 21, 2011, 07:37:27 PM by pjwaffle »
 

Offline pjwaffle (OP)

  • Able Ordinary Rate
  • p
  • Posts: 3
Re: Short intro + Project/status updates
« Reply #3 on: November 21, 2011, 08:28:19 PM »
Status update, got the ability to randomly select from two available bitmaps.  (Aka draw randomly either H or L. )

PNG screenshot attached!

Code:
Code: [Select]
Imports System.IO

Public Class SimulationMap
    Dim bmp As New Bitmap("testtile.bmp")
    Dim bmp2 As New Bitmap("testtile2.bmp")
    Dim r As New Random()

    Private Sub LoadBMPTile(ByRef gfx As Graphics, ByVal posX As Integer, ByVal posY As Integer)
        Dim point As New Point(posX, posY)
        Dim rng As Integer = r.Next(1, 3)
        If rng = 1 Then
            gfx.DrawImage(bmp, point)
        Else
            gfx.DrawImage(bmp2, point)
        End If

    End Sub

    Private Sub SimulationMap_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Paint
        Dim gfx As Graphics = Me.CreateGraphics()
        For X As Integer = 0 To Me.Size.Width Step 16
            For Y As Integer = 0 To Me.Size.Height Step 16
                LoadBMPTile(gfx, X, Y)
            Next
        Next
    End Sub
End Class

Next:
Express the map internally as a 2D array of Resource. . .  Resource will be a class containing Amount (As Integer), Type (As Integer the Integer will stand for which resource type.  The different available types will be accessible in Resource as static fields. )
 

Offline Din182

  • Sub-Lieutenant
  • ******
  • D
  • Posts: 145
Re: Short intro + Project/status updates
« Reply #4 on: November 24, 2011, 12:27:14 PM »
I hope to be able to play it one day. It reminds me that I want a zombie apocalypse simulator.
Invader Fleet #13090 has notified Fleet Command that it intendeds to Unload Trade Goods at Earth!
 

Offline procyon

  • Captain
  • **********
  • p
  • Posts: 402
Re: Short intro + Project/status updates
« Reply #5 on: November 26, 2011, 02:23:30 AM »
It reminds me that I want a zombie apocalypse simulator.

My sister-in-law with her three small children came to stay with us for the last few days.  Add this to our six kids following maration T day meals, and you could just stop by our house.   ;D
... and I will show you fear in a handful of dust ...