Aurora 4x
Off Topic => Off Topic => Topic started by: pjwaffle 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. )
-
Personally, I'd start with the map generation. Get your map and resource nodes generating consistently. Then work on spawning your agents.
-
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:
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
-
Status update, got the ability to randomly select from two available bitmaps. (Aka draw randomly either H or L. )
PNG screenshot attached!
Code:
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. )
-
I hope to be able to play it one day. It reminds me that I want a zombie apocalypse simulator.
-
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