Been out of it a bit with a root canal and a bit of a cold. But I'm back now.
I added the ability for the agents to move in a direct line, this will come in handy when determining line of sight. I think that completes the initial requirements lists. So here is the next list of todo's for this little project:
1. Restrict movement range
2. Restrict firing range.
3. Allow user to turn on and off range display.
4. Display units as images rather then circles. *grin*
5. Scorekeeping needs to be added for kills.
That's it for now.
Thursday, February 22
Monday, February 12
ASP and multiple values
A good friend of mine asked me a question about ASP programming. I remember spending quite a while figuring this out the first time I ran into it so I figured I'd share with you.
Question: I've got multiple text input fields on a form. All the input fields have the same name. How do I recover the values in the fields once the form is posted.
Answer:
When this happens all the variables go into an array on the response object. You can access them by selecting thier index value. Like the following
PetsName(0)
PetsName(1)
PetsName(2)
You could also loop the the array and display each value.
for each pName in PetsName
response.write(pName)
next
Thanks Wes for the blog posting.
Question: I've got multiple text input fields on a form. All the input fields have the same name. How do I recover the values in the fields once the form is posted.
Answer:
When this happens all the variables go into an array on the response object. You can access them by selecting thier index value. Like the following
PetsName(0)
PetsName(1)
PetsName(2)
You could also loop the the array and display each value.
for each pName in PetsName
response.write(pName)
next
Thanks Wes for the blog posting.
Friday, February 9
War Game Update
So I did a little coding. It actually didn't take me near as long as my estimates came out to be. I've put the new time at the bottom and revised the rest of my estimates. Enough about the mundane though. Here's a few things I learned/decieded.
Instead of creating an agent object and creating an array of those. I used a collection of arrays. I know, I know half of you are cringing at hearing that. Now normally I'm all for OOP goodness but as I implemented it that way. I found that there was a huge lag when it came time to paint the map with the agents on it.
I'm clearing the map, then painting all the agents on the map. Of course this means I have to loop through the array of agents, then calling the property object. You don't realize the overhead until the screen starts to lag.
Lesson Learned. I went back and created a number of array's that hold agent information. Something like the following...
Dim agentID(0) As Integer
Dim agentOwnerID(0) As Integer
Dim agentX(0) As Integer
Dim agentY(0) As Integer
Dim agentDestX(0) As Integer
Dim agentDestY(0) As Integer
Dim agentWait(0) As Integer
Dim agentAttWait(0) As Integer
Dim agentIsAttacking(0) As Integer
Dim agentSpeed(0) As Integer
Interesting huh...we will see how much this cost me in the long run.
I also built a quick push function which will put an element on the end of the array. It's rather simple and there probably is a much better way to do this.
Function pushInt(ByRef arr() As Integer, ByVal v As Integer)
Dim tmp(arr.Length + 1) As Integer
arr.CopyTo(tmp, 0)
tmp(tmp.Length - 1) = v
arr = tmp
End Function
Anyway at this point users can login, register, select thier unit, move it, and shoot an enemy unit.
Each unit will wait 10 seconds before it becomes active again.
Instead of creating an agent object and creating an array of those. I used a collection of arrays. I know, I know half of you are cringing at hearing that. Now normally I'm all for OOP goodness but as I implemented it that way. I found that there was a huge lag when it came time to paint the map with the agents on it.
I'm clearing the map, then painting all the agents on the map. Of course this means I have to loop through the array of agents, then calling the property object. You don't realize the overhead until the screen starts to lag.
Lesson Learned. I went back and created a number of array's that hold agent information. Something like the following...
Dim agentID(0) As Integer
Dim agentOwnerID(0) As Integer
Dim agentX(0) As Integer
Dim agentY(0) As Integer
Dim agentDestX(0) As Integer
Dim agentDestY(0) As Integer
Dim agentWait(0) As Integer
Dim agentAttWait(0) As Integer
Dim agentIsAttacking(0) As Integer
Dim agentSpeed(0) As Integer
Interesting huh...we will see how much this cost me in the long run.
I also built a quick push function which will put an element on the end of the array. It's rather simple and there probably is a much better way to do this.
Function pushInt(ByRef arr() As Integer, ByVal v As Integer)
Dim tmp(arr.Length + 1) As Integer
arr.CopyTo(tmp, 0)
tmp(tmp.Length - 1) = v
arr = tmp
End Function
Anyway at this point users can login, register, select thier unit, move it, and shoot an enemy unit.
Each unit will wait 10 seconds before it becomes active again.
Thursday, February 8
Programming Languages
I got to thinking what programming languages I have used and what I thought of them.
PHP
Classic VB
ASP
VB.NET
C#.NET
Java
Lisp
SQL (mySQL,T-SQL)
I've done a little with the following languages but definitely wouldn't label myself as a professional.
C++
C
Perl
PHP
Classic VB
ASP
VB.NET
C#.NET
Java
Lisp
SQL (mySQL,T-SQL)
I've done a little with the following languages but definitely wouldn't label myself as a professional.
C++
C
Perl
Tuesday, February 6
Game Concept: War Game
I was thinking of working out a game which will mock a miniature war game table. Having said that let me list out a few requirements.
This will be done in .Net as a web enabled application.
1. Completed 02.06.07 - User will need to login and register. Authentication will take place through a web service which pings mobeamer.com.
2. Completed 02.06.07 - The playing board will be seen in a top down view.
3. A user will have an "army" list:
5. Completed 02.06.07 - After taking action a unit will become inactive for a time period.
2 wait periods, one for moving and one for shooting
6. Completed 02.06.07 - Units can take one of the following actions:
8. AI will be extremly simple, as an ai unit becomes active it will shoot any thing within range. If nothing is within range it will move closer to a unit.
Estimates:
1. User Login - 4 hrs
2. Top Down Map - 8 hrs
3. Army Lists - 2 hrs
4. User interact - 2 hrs
5. Inactive Unit - 2 hrs
6. Movement and Target - 8 hrs
7. Communication - 16 hrs
8. AI - 8 hrs
Estimates - Revised 02.07 :
1. User Login - 1 hrs
2. Top Down Map - 2 hrs
3. Army Lists - 4 hrs
4. User interact - 4 hrs
5. Inactive Unit - 1 hrs
6. Movement and Target - 3 hrs
7. Communication - 4 hrs
8. AI - 8 hrs
This will be done in .Net as a web enabled application.
1. Completed 02.06.07 - User will need to login and register. Authentication will take place through a web service which pings mobeamer.com.
2. Completed 02.06.07 - The playing board will be seen in a top down view.
3. A user will have an "army" list:
- 1 - Heavy Hitter
- 2 - Medium Hitters
- 3 - Light Units
5. Completed 02.06.07 - After taking action a unit will become inactive for a time period.
2 wait periods, one for moving and one for shooting
6. Completed 02.06.07 - Units can take one of the following actions:
- Move - Move to a location within their movement range
- Shoot - Shoot an enemy unit within their shooting range
- Line of sight will not be taken into account yet.
8. AI will be extremly simple, as an ai unit becomes active it will shoot any thing within range. If nothing is within range it will move closer to a unit.
Estimates:
1. User Login - 4 hrs
2. Top Down Map - 8 hrs
3. Army Lists - 2 hrs
4. User interact - 2 hrs
5. Inactive Unit - 2 hrs
6. Movement and Target - 8 hrs
7. Communication - 16 hrs
8. AI - 8 hrs
Estimates - Revised 02.07 :
1. User Login - 1 hrs
2. Top Down Map - 2 hrs
3. Army Lists - 4 hrs
4. User interact - 4 hrs
5. Inactive Unit - 1 hrs
6. Movement and Target - 3 hrs
7. Communication - 4 hrs
8. AI - 8 hrs
Intro - What this is all about
Hello, my name is Markus Beamer. I love programming and solution solving. I've worked in many areas of the web development arena. I've classified myself as many things over the years. DBA, Database Developer, application developer and the list goes on. However, I aspire to be a software architect.
That being said I have a side hobby which I really love, game development. I certainly don't consider myself a professional at it. But I do like to think I'm a little better then most hobby game writers.
I keep a few of my games on www.untouchablegames.com and I play with code on mobeamer.com. Check out either site and feel free to leave a comment.
I'm keeping this blog in hopes to capture all the crazy ideas that tend to sprout from my head. My most recent craze is to develope a .Net game.
That being said I have a side hobby which I really love, game development. I certainly don't consider myself a professional at it. But I do like to think I'm a little better then most hobby game writers.
I keep a few of my games on www.untouchablegames.com and I play with code on mobeamer.com. Check out either site and feel free to leave a comment.
I'm keeping this blog in hopes to capture all the crazy ideas that tend to sprout from my head. My most recent craze is to develope a .Net game.
Followers
Copyright 2009 mobeamer. Powered by Blogger
Blogger Templates created by Deluxe Templates
Wordpress by Nattywp