Front Office Football Central  

Go Back   Front Office Football Central > Main Forums > Dynasty Reports
Register FAQ Members List Calendar Mark Forums Read Statistics

Reply
 
Thread Tools
Old 08-12-2004, 11:39 PM   #1
Godzilla Blitz
College Starter
 
Join Date: Oct 2000
Libertas Morte: A Programming Odyssey

Overview
Like many people, I’ve wanted to learn how to program and make a game. This will be a low-frills log of my attempt to accomplish both of these things. I’ll write down accomplishments, questions, thoughts, frustrations, ideas, etc., as I work my way through the process. The ultimate goal is to make a simple text sim called Pit Fighter (working title), but the name and the game may change as things move along. I’m hoping that jotting down notes will motivate me to keep going when I get frustrated.

I hope that this may be of interest to some readers out there. If anything, it may give you a chance to watch someone create a really bad game that doesn’t work.

I should clarify, though. Life is busy, so I may only get an hour or two a week to work on this. I’m aiming to try and spend a few minutes each day plugging away. At times, though, I may get chunks of days and make lots of progress, and there will definitely be times where I can't work on it for days. I welcome feedback, help, suggestions, and comments. Tell me what I’m doing wrong. Laugh. Throw digital tomatoes. Have a good time. If anyone wants a copy of the various stages of the game, let me know and I’ll be happy to upload them. Be forewarned: they will really suck.

Lastly, I’d like to start off by thanking FranklinNoble for the idea of creating a log like this.


Last edited by Godzilla Blitz : 08-22-2004 at 12:02 AM.
Godzilla Blitz is offline   Reply With Quote
Old 08-12-2004, 11:44 PM   #2
Godzilla Blitz
College Starter
 
Join Date: Oct 2000
Libertas Morte: A Programming Odyssey

Goals and Stuff

The Game I Want to Make
Pit Fighter, for now anyway. In a perfect world, this game would be a text sim where you manage a stable of fighters over the course of their careers. Think Coliseum for concept, but with more hard-core text sim elements like FOF.

Victory
I “win” this dynasty if I create a working executable file that allows a gamer to control a fighter that participates in a sixteen-fighter, single-elimination, gladiator-style tournament. I must finish the project within one year (August 10, 2005). It will be a decisive victory if I finish it within six months (February 10, 2005). If this goes well, the project is fun, and the game shows even a glimmer of promise, I might attempt a second round of development to add things like a game world, a calendar, fighter development, random events, etc.

Necessary features for the first round (temporary list, may be expanded):

  1. The program should randomly create a field of 15 fighters to participate in the tournament. Each fighter should have a name, essential stats (maybe weapons and armor if I can work it out).
  2. The gamer should be able to create a fighter to enter in the tournament.
  3. The game universe should be savable and loadable.
  4. The program should be Windows XP friendly and work cleanly. No crashes, no gameplay bugs.
  5. The combat should allow the gamer to control general fighter directions in the tournament (aggressive, defensive, normal, surrender, etc.).
  6. Although there will be no visual graphics to depict the fight, there should be some textual explanation of what is going on.
  7. The computer should fight rationally. Not brilliantly, but respectably well.
  8. The tournament management screen should work, showing the fighters advancing in rounds, etc.
  9. The game should be visually clean. What little there is should at least look professional.
Defeat
I lose if I give up or do not finish this within one year.


The Language
Visual Basic 6.0. This language is comparatively easy to learn and should give me all the horsepower that I want to write a text sim of this scale.

Last edited by Godzilla Blitz : 12-18-2004 at 08:19 PM.
Godzilla Blitz is offline   Reply With Quote
Old 08-12-2004, 11:48 PM   #3
Godzilla Blitz
College Starter
 
Join Date: Oct 2000
Background

Beginning Programming Knowledge
Basically zero. A couple of times I’ve made it through the first three chapters of a Visual Basic textbook, but that’s about it. Once I signed up for an online course with Barnes & Nobles, but bailed out after the third lesson.

Over the Past Month
I’ve off and on been hacking away at Step by Step Visual Basic 6.0, and have managed to get to Lesson 7. This represents about 5 hours worth of time, so basically I’m starting from scratch here. I think I have a rudimentary grasp of variables, basic events, basic controls, and properties.

Work Done to Date
Two weeks ago, I created a simple, one-form program that simulates two fighters battling. There are some basic textual descriptions, and each fighter has randomly determined hit points and accuracy. There is no strategy, you simply push buttons and read about the guys fighting. It works, but it sucks.

Off We Go!!!
That should do it as far as the introduction to all this goes. From here on out, I’ll make posts that tell what I got done during a particular day. For the first couple of months it will probably log what stuff I learned in the Step by Step textbook, but I tend to wander and try programming when I learn something new.

Last edited by Godzilla Blitz : 08-12-2004 at 11:49 PM.
Godzilla Blitz is offline   Reply With Quote
Old 08-12-2004, 11:51 PM   #4
Godzilla Blitz
College Starter
 
Join Date: Oct 2000
11 August 2004 (Yesterday)

Worked through Chapter 6 in Step by Step. Got a better understanding of If…Then statements. Learned how to use VB’s debugging mode. Total time: 30 minutes.

Next, I did a web search for sites on VB programming, and found a neat site that describes how to make a simple RPG. Ended up reading the thing for about an hour, and learned a lot about defining variable types, creating arrays, and creating a programming structure for a game. Total time: 1 hour.

I think now I have just about all I need to know to try and program the code that will create the 15 fighters that will be in the tournament. I need to learn about loops, but that comes up in the next chapter of Step by Step.

Total time to date: 1 hour, 30 minutes. 365 days to go.

Last edited by Godzilla Blitz : 08-12-2004 at 11:53 PM.
Godzilla Blitz is offline   Reply With Quote
Old 08-12-2004, 11:52 PM   #5
Godzilla Blitz
College Starter
 
Join Date: Oct 2000
12 August 2004

Worked through the first few pages of Step by Step, Lesson 7. Learned the basics of Loops. This will come in handy for generating an array of fighters to populate the tournament, which I may try to get working sometime in the near future. Total time: 15 minutes

Next, I wrote this log. Total time: 1 hour.

Short-term Goals: Finish Lesson 7 in Step by Step. Try to write the code to generate a 15 fighter array.

Things to Figure Out: How to get VB to read text files of first names and last names, concatenate them, and assign them to locations in the array. I'll need to do this to be able to assign random names to fighters in the tournament. No clue yet on how to do this.

Total time to date: 2 hours, 45 minutes. 364 days to go.

Last edited by Godzilla Blitz : 08-13-2004 at 12:03 AM.
Godzilla Blitz is offline   Reply With Quote
Old 08-13-2004, 12:03 AM   #6
Blade6119
Coordinator
 
Join Date: Dec 2000
Location: Scottsdale, Arizona
godzilla dynasties own me...crap, by bye to all my dates for awhile
__________________
Underachievement
The tallest blade of grass is the first to be cut by the lawnmower.
Despair
It's always darkest just before it goes pitch black.
Demotivation
Sometimes the best solution to morale problems is just to fire all of the unhappy people.
http://www.despair.com/viewall.html
Blade6119 is offline   Reply With Quote
Old 08-13-2004, 12:06 AM   #7
Godzilla Blitz
College Starter
 
Join Date: Oct 2000
Quote:
Originally Posted by Blade6119
godzilla dynasties own me...crap, by bye to all my dates for awhile
Thanks, but this won't be a good dynasty.
More like a journal, I think, than a "dynasty".

I can't imagine reading about arrays and properties is anywhere near as interesting as reading about Sectoids trying to take over the world.

Last edited by Godzilla Blitz : 08-13-2004 at 12:29 AM.
Godzilla Blitz is offline   Reply With Quote
Old 08-13-2004, 08:56 AM   #8
sachmo71
The boy who cried Trout
 
Join Date: Oct 2000
Location: TX
Good luck, GB.
sachmo71 is offline   Reply With Quote
Old 08-13-2004, 09:00 AM   #9
JAG
Grizzled Veteran
 
Join Date: Nov 2000
Location: St. Paul, MN
Agree with sachmo. Good luck GB. Don't forget about Riverside too.
JAG is offline   Reply With Quote
Old 08-13-2004, 02:34 PM   #10
Godzilla Blitz
College Starter
 
Join Date: Oct 2000
Sachmo: Thanks!

JAG: I don't know what happened this time when I started playing FBCB. It just didn't hold me like it did last time. I think it must have been the warm weather. I do intend to continue at some point in the future. This programming "journal" won't eat up all of my time, as I want to do other things too.
Godzilla Blitz is offline   Reply With Quote
Old 08-13-2004, 10:31 PM   #11
Godzilla Blitz
College Starter
 
Join Date: Oct 2000
13 August 2004

Early this morning glanced through three other Visual Basic books I have to see if they had anything about reading text files. Found one piece that helped clarify some things, but confused me on others.

During the day, I worked through the next few pages in Lesson 7 in Step by Step. Learned a bit more about Loops. Read ahead in the book a bit to see if I could figure a bit about modules, and got a decent idea of what they are about.

Also spent about thirty minutes looking at some of the code on the game programming site.

Lastly, I hacked around in the program for about 20 minutes.

Total time: 1 hour and 30 minutes

Total time to date: 4 hours, 15 minutes. 363 days to go.
Godzilla Blitz is offline   Reply With Quote
Old 08-14-2004, 06:12 AM   #12
CraigSca
Pro Starter
 
Join Date: Jul 2001
Location: Not Delaware - hurray!
Wow, good luck to you, GB. You have a really daunting task ahead of you. I can't even imagine programming a game while learning programming at the same time. FWIW, I've loved every book by Rod Stephens regarding VB. He has a great collection of algorithms in one of them (unfortunately, I forget the exact title) - a lot of, "Oh, I didn't realize I could do that quite that easily," type of stuff.

I'll read this with great interest.
CraigSca is offline   Reply With Quote
Old 08-14-2004, 03:14 PM   #13
Godzilla Blitz
College Starter
 
Join Date: Oct 2000
Craig: Thanks for the encouragement! I have found that trying to make the game is helping me learn to program, as it forces me to apply the concepts in the books I'm reading.

I think the task would be daunting if I was actually trying to make a good game, but for this first round, I'm mainly interested in getting something functioning.

Thanks, too, for the tip on Rod Stephens. I'll hunt some of his stuff down as I work my way through some of the books I currently have (I've got four VB books now).
Godzilla Blitz is offline   Reply With Quote
Old 08-14-2004, 03:55 PM   #14
GoldenEagle
Grizzled Veteran
 
Join Date: Dec 2002
Location: Little Rock, AR
GB, as someone working on a game myself, I would like to wish you the best of luck.
__________________
Xbox 360 Gamer Tag: GoldenEagle014
GoldenEagle is offline   Reply With Quote
Old 08-14-2004, 07:51 PM   #15
CraigSca
Pro Starter
 
Join Date: Jul 2001
Location: Not Delaware - hurray!
BTW - if you get stuck anywhere, just ask -- I've used VB for years.
CraigSca is offline   Reply With Quote
Old 08-14-2004, 08:55 PM   #16
TargetPractice6
College Benchwarmer
 
Join Date: Apr 2003
Location: Lexington, KY
Quote:
Originally Posted by GoldenEagle
GB, as someone working on a game myself, I would like to wish you the best of luck.
How is your game coming along?
TargetPractice6 is offline   Reply With Quote
Old 08-14-2004, 11:20 PM   #17
Godzilla Blitz
College Starter
 
Join Date: Oct 2000
14 August 2004

Finished Chapter 7 in Step by Step. Learned about conditional loops (Do While/Until) and learned about the timer function in VB. Chapter 8 is up next. It discusses interface design, using multiple forms, error handling, and printing.

Spent an hour and a half this evening writing out some thoughts on how to model combat in the game. My own notes now span five pages, but basically…

I want to get away from a turn-based, hit point system and move to a pulse-based, realistic damage system.

Hit points in a game seems a terribly artificial way to model damage to a human being in combat. I would like to incorporate things like concentration, pain, specific body part injuries, blood loss, and endurance into the damage model to portray man-to-man combat more realistically.

As far as combat goes, I am thinking that each fight will be executed in ten-second pulses. The gamer makes a choice of action. The computer makes a choice of action. The program then analyzes the two decisions and produces a result. Possible choices: General Attack (attack any opening), Attack Specific Body Part or Weapon, Defend, Rest, Evade, Run Away, Back Off, Close In. Attacks should further be delineated by mode (Cautious, Aggressive, Normal) and type (jab, slash, overhand, etc.). Defenses can also be delineated to emphasize a particular area (Legs, Torso, Head).

The ultimate goal behind this system is to create a wide set of tactical decisions for the gamer, and a number of possible fighting styles to try and win with. For example, if you’ve got a high-endurance, highly elusive fighter with good weapon skill and little power, you may want to mix up defending, evading, and cautious general jabs until your opponent’s stamina and concentration wanes, the pour on the attack. If you’ve got a low endurance fighter, you may be forced to attack early in hopes of landing a decisive blow. If your opponent has weak leg armor, you may want to aim low in your attacks. If you hit your opponent in the head, you may want to adjust your attacks high to knock the guy out. Opponent got a powerful yet fragile weapon? You may want to go after the weapon or the weapon arm. Badly outclassed or getting pounded? Go for a desperate overhead shot to the head.

All of these choices should have consequences and drawbacks. For example, aggressive attacks should leave you more vulnerable on defense and burn more of your energy up. Defending low will leave you much more open to get whapped upside the head. Resting would be disastrous in close against an enemy who attacks, but would increase energy more quickly than defending; if your opponent chose to defend, you would gain more energy back than him.

The overall effect I’m trying to get in strategy is something like boxing meets Monster Rancher meets Paper/Rock/Scissors meets Coliseum (I think, anyway. I haven’t played Coliseum yet but have just ordered it).

Time Today: 2 hours.

Total Time to Date: 6 hours and 15 minutes

Last edited by Godzilla Blitz : 08-14-2004 at 11:46 PM.
Godzilla Blitz is offline   Reply With Quote
Old 08-14-2004, 11:22 PM   #18
Godzilla Blitz
College Starter
 
Join Date: Oct 2000
Golden Eagle: Thanks! Good luck to you as well. What kind of game are you making?

Craig: Thanks! I appreciate it and may take you up on that. Feel free to offer advice anytime as well.

Last edited by Godzilla Blitz : 08-14-2004 at 11:23 PM.
Godzilla Blitz is offline   Reply With Quote
Old 08-15-2004, 09:42 AM   #19
CraigSca
Pro Starter
 
Join Date: Jul 2001
Location: Not Delaware - hurray!
One thing I've found that could possibly make things easier when modeling certain parts of the game - use Excel. There were many times when my original concept for ratings were proven to be unacceptable just by modeling them for a few minutes in a spreadsheet. In Excel, they can be fine-tuned and usually can be play-tested much quicker than in your program.
CraigSca is offline   Reply With Quote
Old 08-15-2004, 09:52 AM   #20
Danny
Head Coach
 
Join Date: Jul 2001
Excellent thread Godzilla. Ill be keeping an eye on thos thread while I am working on development for my game.
Danny is offline   Reply With Quote
Old 08-15-2004, 10:19 PM   #21
Godzilla Blitz
College Starter
 
Join Date: Oct 2000
15 August 2004

Not much free time today, but managed to get halfway through Lesson 8 in Step by Step. Learned about using multiple forms in one program (kind of understood this already) and basic printing commands.

All in all, I’m surprised at how flexible and logical all this has been so far. I come from a linguistic background; human spoken languages are filled with exceptions and special cases that require brute memorization to master. By contrast, programming languages are straightforward, without exceptions. Total time: 30 minutes


Grand total: 6 hours and 45 minutes

Last edited by Godzilla Blitz : 08-15-2004 at 10:19 PM.
Godzilla Blitz is offline   Reply With Quote
Old 08-15-2004, 10:21 PM   #22
Godzilla Blitz
College Starter
 
Join Date: Oct 2000
Craig: Thank you for the tip. I will definitely try that when I get to testing a combat system. I think for the first time through I am going to make a basic combat system, then gradually add pieces to it.

EagleEye: Thanks!
Godzilla Blitz is offline   Reply With Quote
Old 08-16-2004, 09:16 AM   #23
Bee
Pro Starter
 
Join Date: Oct 2000
Location: Fairfax, VA
Always wanted to see a game like that GB. I wish you the best of luck and will be following along.
Bee is offline   Reply With Quote
Old 08-16-2004, 09:43 AM   #24
sachmo71
The boy who cried Trout
 
Join Date: Oct 2000
Location: TX
Yes, I'll be beta tester number 1, whenever that happens.
sachmo71 is offline   Reply With Quote
Old 08-16-2004, 10:22 PM   #25
Godzilla Blitz
College Starter
 
Join Date: Oct 2000
16 August 2004

Messed around this afternoon looking for artwork ideas on the net and creating a rough splash screen for the game. Mostly just trying to get a feel for the mood of the game.

Also did a name check on the name “Pit Fighter” and found that it’s already been used for a game, so I’ll need a new name. Ideas are welcome! Gladiator would work well, but that one is clearly taken, as is Gladius and Coliseum. One issue that I’ll want to consider is how closely I want to follow the history of gladiator fighting in Rome. I don’t know if it’s better to loosely tie the game to the historical backdrop of Rome, or whether to break from that theme altogether and set the game in more of a fantasy setting.

Tying the game closely to actual Gladiator fighting would most be a bad idea, as apparently the death rate in contests was ferociously high, with the winner simply continuing on to fight the next combatant, etc., until nearly everyone was dead.

Time: 1 hour

This evening I finished Chapter 8 in Step by Step. Learned some basic information about Error Handlers, which made sense but I don’t understand it well enough to use it correctly yet. The book did a superficial job with this, and I’ll need more information when it comes time to put error handlers in a real program. Up next is Chapter Nine, which covers adding graphics and artwork to a program.

Time: 30 minutes.

Grand total: 8 hours and 15 minutes.

Last edited by Godzilla Blitz : 08-16-2004 at 10:24 PM.
Godzilla Blitz is offline   Reply With Quote
Old 08-16-2004, 10:27 PM   #26
Godzilla Blitz
College Starter
 
Join Date: Oct 2000
Bee: Thanks for the encouragement!

Sachmo: Thanks! I'll start a list! Not sure I'll ever get that far, but this would definitely be the place to recruit beta testers.
Godzilla Blitz is offline   Reply With Quote
Old 08-17-2004, 06:30 AM   #27
Bee
Pro Starter
 
Join Date: Oct 2000
Location: Fairfax, VA
Nice Screen!
Bee is offline   Reply With Quote
Old 08-17-2004, 08:20 AM   #28
sachmo71
The boy who cried Trout
 
Join Date: Oct 2000
Location: TX
Blood for the Masses
We who are about to die
Gladiator Mogul
Sand and Blood
For Glory and Freedom

Last edited by sachmo71 : 08-17-2004 at 08:24 AM.
sachmo71 is offline   Reply With Quote
Old 08-17-2004, 10:01 PM   #29
Godzilla Blitz
College Starter
 
Join Date: Oct 2000
17 August 2004

Had some time today…

Started & Completed Lesson 9 in Step by Step. Learned about graphic buttons, drag & drop, and basic animation. Useful stuff, and easy to understand. Good progress.

Conducted a survey on the game theme, and received a lot of helpful information. Based on the results and ideas, I’m going to go with a basic Roman setting to start with, but will consider adding a “Fantasy Rome” setting if I can get the basic game to work well. Will try another survey tomorrow to try and brainstorm some possible game names.

Went to Borders and looked through their programming books. Discouraging. The game programming books were mostly for graphic-intensive C++ games, which doesn’t help me, and the content was far over my head. The game AI books were either extremely difficult for me to understand, and/or relating to issues (pathfinding, etc.) that I won’t need to deal with in a text-sim. The game design books were either too theoretical to be of much help, or aimed once again at graphic-intensive games. The game math books were mind-boggling. I realized how far I have to go.

Spent a little time tweaking the splash screen to get a better color and texture.

Found a good forum for VB Game Programming. Learned about file paths and reading from text files. Helpful.

Spent a little time this evening planning how I’m going to attack the programming for the game’s combat. Basically, I’m going to try and develop it in a series of stages…

Stage 1
Actions
Attack (Desperate, Aggressive, Normal, Cautious, Feint)
Defend
Rest
Attributes
Health
Energy
Strength
Accuracy

Once I get this working, I’ll add the following in subsequent stages: weapons; armor & shields; body part specific damage, more complex attributes (concentration; morale), and aiming attacks; weapon specific attacks (jab, swing, overhead); stances (kneeling, prone, standing); distance & ranged weapons; unique actions (throwing sand); broken weapons & armor.

First I need to write some routines that can generate a fighter and his attributes, and design a basic fighting screen. I think I know enough to get started on this part now.

Not a bad day today, the trips to Borders withstanding.

Total time: 4 hours.

Grand total: 12 hours and 15 minutes.

Last edited by Godzilla Blitz : 08-17-2004 at 10:02 PM.
Godzilla Blitz is offline   Reply With Quote
Old 08-17-2004, 10:08 PM   #30
Godzilla Blitz
College Starter
 
Join Date: Oct 2000
Bee: Thanks! I've changed it some today, but am not quite happy with it yet. I'll put up a new one once I decide on a game name.

Sachmo: I like Sand & Blood. I'm going to solicit names tomorrow though, and see what the powers of FOFC can come up with. It's time to pick the name.
Godzilla Blitz is offline   Reply With Quote
Old 08-17-2004, 10:59 PM   #31
Vince
Pro Starter
 
Join Date: Aug 2001
Location: Willow Glen, CA
You're coming along great so far! I'll volunteer to be Beta Tester #2

Really looking forward to what comes out of this.
__________________
Every time a Dodger scores a run, an angel has its wings ripped off by a demon, and is forced to tearfully beg the demon to cauterize the wounds.The demon will refuse, and the sobbing angel will lie in a puddle of angel blood and feathers for eternity, wondering why the Dodgers are allowed to score runs.That’s not me talking: that’s science. McCoveyChronicles.com.
Vince is offline   Reply With Quote
Old 08-18-2004, 10:44 PM   #32
Godzilla Blitz
College Starter
 
Join Date: Oct 2000
18 August 2004

Started & Completed Lesson 10 in Step by Step. Learned about modules, functions, and sub procedures. Kind of understood the basics of these things from reading other stuff, but the content was helpful to clarify details. Tomorrow’s lesson is on arrays and collections. Looking forward to that one.

Started to lay out an initial combat screen, but got thoroughly confused with how to do this so that it displays properly at different resolutions. Frustrating stuff. With a lack of good information on how to do this, I think I’ll just lay it out to make sure it looks good at 800x600. The consensus seems to be that going up in resolution doesn’t create much of a problem. If anyone could direct me to information on how to resize controls on a VB form for different resolutions, I’d be grateful.

Lots of suggestions for a game name, but nothing really jumps out at me at the moment. Got to sleep on this one.

Total time: 2 hours.

Grand total: 14 hours and 15 minutes.

Last edited by Godzilla Blitz : 08-18-2004 at 10:45 PM.
Godzilla Blitz is offline   Reply With Quote
Old 08-18-2004, 10:46 PM   #33
Godzilla Blitz
College Starter
 
Join Date: Oct 2000
Vince: Thanks! I'll add you to the list! I'm curious to see what ever becomes of this as well.

I must say that this has been a lot of fun so far. Reading back over the past week, I can see that I’ve made progress. Confidence-wise, it’s been a mixed bag. At times I feel like I can do this, and at times I feel like I lack the knowledge to be even attempting this. I have to keep myself from getting discouraged when I bump into programming problems for which I don’t have the ability to solve yet. Got to keep my head focused on the problem directly in front of me, not the problem two months down the road. If I can keep going, one step at a time, I have to believe I can do this.
Godzilla Blitz is offline   Reply With Quote
Old 08-18-2004, 10:54 PM   #34
GoldenEagle
Grizzled Veteran
 
Join Date: Dec 2002
Location: Little Rock, AR
Quote:
Originally Posted by Godzilla Blitz
Started to lay out an initial combat screen, but got thoroughly confused with how to do this so that it displays properly at different resolutions. Frustrating stuff. With a lack of good information on how to do this, I think I’ll just lay it out to make sure it looks good at 800x600. The consensus seems to be that going up in resolution doesn’t create much of a problem. If anyone could direct me to information on how to resize controls on a VB form for different resolutions, I’d be grateful.

*Geek Talk Alert*

Do a search in your VB help for mapping modes. In VC++, I can change the coordinate pixes to logical pixels which fit the screen no matter what the screen resolution. The default mapping mode is probably MM_TEXT, but you can may can change it.
__________________
Xbox 360 Gamer Tag: GoldenEagle014
GoldenEagle is offline   Reply With Quote
Old 08-18-2004, 11:00 PM   #35
VPI97
Hokie, Hokie, Hokie, Hi
 
Join Date: Mar 2001
Location: Kennesaw, GA
Quote:
Originally Posted by Godzilla Blitz
If anyone could direct me to information on how to resize controls on a VB form for different resolutions, I’d be grateful.
You can do something simple like this:
Code:
Private Sub Form_Load() For Each ctlControl In Form1 If TypeOf ctlControl Is TextBox Then .Width = (Screen.Width / 10) .Height= (Screen.Height / 10) End If Next ctlControl End Sub

Which loops throught all text boxes on the form and makes them all 10% the size of the screen. Modify to make it do what you want.
VPI97 is offline   Reply With Quote
Old 08-18-2004, 11:09 PM   #36
VPI97
Hokie, Hokie, Hokie, Hi
 
Join Date: Mar 2001
Location: Kennesaw, GA
Quote:
Originally Posted by GoldenEagle
*Geek Talk Alert*

Do a search in your VB help for mapping modes. In VC++, I can change the coordinate pixes to logical pixels which fit the screen no matter what the screen resolution. The default mapping mode is probably MM_TEXT, but you can may can change it.
VB doesn't manage it automatically...you can determine screen size, but any changes to positioning or dimensions have to be done manually (or by a third party control)
VPI97 is offline   Reply With Quote
Old 08-18-2004, 11:46 PM   #37
sabotai
General Manager
 
Join Date: Oct 2000
Location: The Satellite of Love
GB,

Books that will help with creating a text sim...

Well first off, we know you won't be doing anything really graphical, so forget any book with the word "OpenGL" or "DirectX" in the title.

Ok, seriously, most game books you will find will deal with graphics and audio and such and such. For you, I would stick with books that generally improve you VB skills. I use C++, not VB, so I can't help you there. (But think I'm good at general design and programming topics)

One thing you need to figure out is if you'll be using a database to store your data or using binary and/or text files. If it's databases, you should grab a book on that (if the intro book doesn't go into that). If it's binary, then whatever intro book you have should be sufficient.

As far as programming the appearence (interface), the intro book should be good enough. Maybe grab a more advanced VB book.

As for AI, this is going to be a simple text sim (sounds like it will be), so you really don't need an AI book. Straightforward if...then and case statements to determine actions and team management should be fine. Nothing advanced (or even beginner like) is really needed.

Data Structures for Game Programmers is a good book to have. But take this as a warning. It uses C++ and it uses something that I'm pretty sure is not used in VB (templates) to code and demostrate the structures. I'm not sure if you would be able to follow it. But the author does a good job os using drawings and tables to explain the structures and how they work. Next time you are in a book store, look through it, read the first chapter and see what you think. $50 is a lot to put down on a book that you may not use/understand so I'm just warning you with that one. (I have about 5-6 $50+ books I have yet to even read more than 2 lines of....I could use that $300 right about now. )

And that's going to a hurdle. Most game programming books out there are written in C++ and are for graphical games. Even if they aren't specifically for graphical games, they're in C++. Game Programming Gems and AI Game Programming Wisdom are two GREAT series of game programming books. A LOT of the stuff is not about the graphical part of the games. However, a lot of articles are intermediate-advanced topics and use C++.

There really isn't much out there for the text sim programmer specifically. At least one at your stage anyway. What I would suggest to you is to stick with the VB books, ones that deal with application developement so you can learn the ins and outs of VB itself.

Trust me, it's not the "game programming" that's the bitch when it comes to game programming. It's getting it to the point where you start doing the "game programming" that's boring and the most work intensive. (like programming the interface, programming the file I/O, programming the basic framework of the application, etc. etc. You won't be spending much time on the "fun" stuff like AI. ) So you're going to want to know VB inside and out before jumping into more advanced stuff so that doing the legwork and foundation building (which, in VB, is far less than VC++) doesn't take a long time and you can spend more time on doing the cool stuff (the stuff people will actually notice in a game).

I hope my much longer than intended rant helps on some level....
sabotai is offline   Reply With Quote
Old 08-18-2004, 11:48 PM   #38
sabotai
General Manager
 
Join Date: Oct 2000
Location: The Satellite of Love
Quote:
Originally Posted by VPI97
VB doesn't manage it automatically...you can determine screen size, but any changes to positioning or dimensions have to be done manually (or by a third party control)

When I used Delphi, it was the same way. I always just designed the forms for 640x480 in mind. (This was several years ago. ).
sabotai is offline   Reply With Quote
Old 08-19-2004, 12:57 PM   #39
AStott
Mascot
 
Join Date: Nov 2002
Oh, oh! Name a variable after me, ok?



Well, how else can we manage to make this dynasty interactive.

Then you can do writeups that explain what "my" variable did in your latest coding session. If you could, make me a global variable. That way a get a little more action...
AStott is offline   Reply With Quote
Old 08-19-2004, 03:01 PM   #40
Godzilla Blitz
College Starter
 
Join Date: Oct 2000
VP197, Golden Eagle: Thanks for the help! Regarding the code that changes the size of the controls to a fixed% of screen size, wouldn't I still have issues with font sizes? For example, wouldn't a 10-point font that looks good in a text-box (sized at say 10% of a particular screen) at 800x600 be too small to look good at a high-resolution setting? And wouldn't the same issue arise with text for any labels, etc., that are on the form?

Sabotai: Thanks for taking the time to write all that up. Extremely helpful, and I think it will save me a lot of time. I appreciate it. Some comments...

One of the 15 books I looked through at Borders was that Data Structures for Game Programmers. It did seem thorough, but as you hint at, I think it was a bit beyond me, and the use of C made it more difficult to understand.

Which leads me to another point you make. I need more basic programming skills. When I go to find an answer to something, and find code that hints at how to solve it, I usually have no clue what the code is doing.

I'll take a look for those Game Programming Gems and AI Game Programming Wisdom books. I may have looked through one of them at the bookstore, but I don't recall it off hand.

I was happy to see your comment wondering how I was going to store the data in the game. I was wondering this same question the other day, and have been looking forward to the next three chapters in the VB book (databases, arrays, and text processing). The fact that I was wondering the same thing as you asked makes me think that maybe I'm on the right track here. I think I'll know more in the next week, but I was thinking that I would use a little bit of each. First names and last names for randomly generated characters I was thinking of storing in text files. Weapons and armor (which will most likely be fixed) would probably make more sense to store in a database to read into the game? While I'm planning to randomly generate the fighters in the game world, I'm also thinking of adding certain historical figures to the game and would probably want to store their stats in a database file. Although the early versions of the game will start out much smaller, I'm guessing that the final version of the game world would need about 500 fighters in it, with a hundred or so characteristics for each one. I have no idea how to store, save, and manipulate all this information. Array? Database? Text file? No clue here.

Lastly, I'm actually not finding the general programming stuff that boring yet. The issues are like puzzles to be solved, and searching for and finding the solutions have been fun. That may change, but right now I'm enjoying the quest, even with its frustrations.

Again, thanks for all the input.

AStott: You can be lblStrHum. Your initial value will be randomly generated, between 1 and 100.

Sabotai: I'm guessing that designing for 640x480 would be a bit low now, correct? I can use 800x600 as a reasonable minimum?

Last edited by Godzilla Blitz : 08-19-2004 at 03:03 PM.
Godzilla Blitz is offline   Reply With Quote
Old 08-19-2004, 03:09 PM   #41
Franklinnoble
Banned
 
Join Date: Jul 2002
Location: Placerville, CA
Awesome thread, GB... makes me think I need to get off my ass and get back to work on my own game idea...
Franklinnoble is offline   Reply With Quote
Old 08-19-2004, 05:39 PM   #42
sabotai
General Manager
 
Join Date: Oct 2000
Location: The Satellite of Love
Quote:
Originally Posted by Godzilla Blitz
One of the 15 books I looked through at Borders was that Data Structures for Game Programmers. It did seem thorough, but as you hint at, I think it was a bit beyond me, and the use of C made it more difficult to understand.

Which leads me to another point you make. I need more basic programming skills. When I go to find an answer to something, and find code that hints at how to solve it, I usually have no clue what the code is doing.

I'll take a look for those Game Programming Gems and AI Game Programming Wisdom books. I may have looked through one of them at the bookstore, but I don't recall it off hand.

I'd wager a bet that if you did open up one of those books, your head would have exploded.

But seriously, the Gems and Wisdom series are most likely out of your league, however, for every 4-5 "expert" articles (they're books of many individual artices), there is 1-2 good "beginner" articles. Next trip to Borders, find one and open it up and look at the table of contents and you'll see what I mean. Good reading once you get far enough along.

As for the Data Structures book, you reall should have one. Not the one I said (since it's in C and uses templates), but I'm sure there is a VB Data Structures and Algorythm book out there.

I just went to amazon and foudn this one

http://www.amazon.com/exec/obidos/tg...books&n=507846

Only $12 used. Now, not suggesting this one exactly (it has good reviews but I don't have it), but you really do need a book that covers lists, arrays, stacks, trees, recursion, sorting, etc. etc. Beleive me, it'll be one of your most used books.

Quote:
I was happy to see your comment wondering how I was going to store the data in the game. I was wondering this same question the other day, and have been looking forward to the next three chapters in the VB book (databases, arrays, and text processing). The fact that I was wondering the same thing as you asked makes me think that maybe I'm on the right track here. I think I'll know more in the next week, but I was thinking that I would use a little bit of each. First names and last names for randomly generated characters I was thinking of storing in text files. Weapons and armor (which will most likely be fixed) would probably make more sense to store in a database to read into the game? While I'm planning to randomly generate the fighters in the game world, I'm also thinking of adding certain historical figures to the game and would probably want to store their stats in a database file. Although the early versions of the game will start out much smaller, I'm guessing that the final version of the game world would need about 500 fighters in it, with a hundred or so characteristics for each one. I have no idea how to store, save, and manipulate all this information. Array? Database? Text file? No clue here.

Well, I use binary files. Basically what they are is a stored file of what's in memory, essentially. I know Jim also uses binary file. Arles, however, uses a database to store all of the information. It's really just a preference. Binary files take much more legwork, but you have more control over them and you don't have to worry about the user having the most up to date .dll files and such.

Also, I'm pretty sure VB makes it easy to access a database (I took a class in it at college). MUCH easier than C++ anyway. So going the database route probably makes a lot of sense in VB. (If I'm not mistaken, Puresim made by Shaun Sullivan and TPF and TDCB made by Arles both were coded in VB and use databases. And since I know Shaun's "real job" involves coding in VB also, it's obviously not a mistake to do it that way.)

Also, like I said, binary file i/o takes more legwork, so doing it the database way will take a lot less time. I use binary files because I'm a control freak.

EDIT: I use text files for names to be used. Like just having a list of names the program reads in and picks a name at random. But that's it. I do not suggest storing data in text files.

Quote:
Sabotai: I'm guessing that designing for 640x480 would be a bit low now, correct? I can use 800x600 as a reasonable minimum?

Yeah, I'd say designing for 800x600 is reasonable now. But you have to remember not to make the forms 800x600. This will take up the entire screen of those using 800x600. Kind of defeats the purpose of having it in a window.

Making them 800x600 will have the form covering the taskbar, causing the user to have to push the form off screen just a bit. It's an annoyance. Instead, design you largest forms at slightly smaller sizes. Like 750x525. or something lik that, so you leave room for the taskbar and on the edges so it does take up the whole screen.

Last edited by sabotai : 08-19-2004 at 05:43 PM.
sabotai is offline   Reply With Quote
Old 08-19-2004, 09:42 PM   #43
Godzilla Blitz
College Starter
 
Join Date: Oct 2000
19 August 2004

Started & Completed Lesson 11 in Step by Step. Learned about collections, which was extremely helpful in thinking about how to resize controls and making sense of VP197’s syntax. Also learned the basics about arrays, which I pretty much understood from reading other stuff last week. Getting confused about how one would go about displaying these nicely on screen (for rosters, lists of attributes, etc.), but I won’t worry about that yet.

Coliseum arrived yesterday and I spent 30 minutes getting a feel for how that game works as a comparison. Fun game, but very different from what I am looking to make.

Narrowing in on a game name. Maybe tomorrow.

Ordered the book Ready-to-Run Visual Basic Code Library: Tips, Tricks, and Workarounds for Better Programming, and will look to pick up Ready-to-Run Visual Basic Algorithms in the near future. Both by Rod Stephens.

Got lots of help here with various issues. Confidence is high again.

Tomorrow’s lesson deals with text strings. As an intermediate project, I might try and create a small program that generates Cryptograms. My mom loves those things, and I was thinking it would be neat to make a small book of cryptograms about our family and give it to her for her birthday. Glancing over the lesson, it looks like I'll have just enough knowledge to figure this out, but I'll have to think through how to shuffle 26 letters and reassign them randomly to a spot on an array. Or perhaps mixing up the letters and then placing them in sequence would be better. Something to consider. I think I can do this though, and it would be good practice for me.

Total time: 2 hours.

Grand total: 16 hours and 15 minutes.
Godzilla Blitz is offline   Reply With Quote
Old 08-19-2004, 10:00 PM   #44
Godzilla Blitz
College Starter
 
Join Date: Oct 2000
FranklinNoble: Thanks! Glad you like it. As I mentioned above, the credit should go to you for the idea. It's been nothing but fun so far. Sitting down for ten minutes at night and considering what I've done during the day for this project keeps me focused, and the help that people have posted here has been awesome. I think it's very easy for beginners at something to get lost and waste hours and hours studying the wrong things, or banging heads trying to solve something better put off until later, and the guidance and solutions that people are putting up here I think will help keep me from getting really lost.

Sabotai: Thanks for the guidance on the books. I think I will pick that one up you found. CraigSca recommended the author earlier in the thread, so I was looking at that exact book earlier in the week. I thought I might need it later in the project, but it sounds like I might need it sooner.

Thanks as well for the info on the files. Sounds like storing data in either binary files or a database would work fine. I will avoid storing the info in text files. Even if I went with a database storage system, I would guess I'll still need a binary file or two to store a lot of a saved game's miscellaneous information? I'll see how I feel about the whole thing after I read the lesson on managing databases. From glancing at it though, it seems that VB makes it pretty easy to manipulate databases. One of my side goals would be to make the game as moddable as possible, and I'm guessing that storing the information in a database would make doing that much easier for the end user?

And thanks one more time for the info on tightening up an 800x600 window to allow for the taskbar, etc.! I would have only figured that out after I spent hours making a few screens, and then had to redo them all. One thing...You mention going to 750x525. Would there be any importance to maintaining a 4:3 aspect ratio, though?
Godzilla Blitz is offline   Reply With Quote
Old 08-19-2004, 10:58 PM   #45
sabotai
General Manager
 
Join Date: Oct 2000
Location: The Satellite of Love
Quote:
Originally Posted by Godzilla Blitz
One of my side goals would be to make the game as moddable as possible, and I'm guessing that storing the information in a database would make doing that much easier for the end user?

Not really. Either way would work about the same, as long as you give out the file formats for the binary files. But as long as you leave it un-passworded, the database would be good.

Quote:
You mention going to 750x525. Would there be any importance to maintaining a 4:3 aspect ratio, though?

No, they were just numbers I pulled out of the air. Coincidence that they laid out in 4:3 aspect.
sabotai is offline   Reply With Quote
Old 08-20-2004, 11:56 AM   #46
Godzilla Blitz
College Starter
 
Join Date: Oct 2000
20 August 2004: Morning

Drank too much Coke with dinner last night and couldn’t get to sleep, so I spent an hour from 1 a.m. to 2 a.m. putting together lists of Latin names. Now have an Excel file with over 400 male first names and over 1000 male last names. From this I can generate a list of female names should I go that route. Historically, there were female gladiators.

Still not sleepy, I spent another hour brainstorming some of the details on how I want the combat system to work, and then brainstorming a list of “world changing” events. Basically, I hope to eventually incorporate optional random events into that game world that can impact the game globally, so that every future plays out slightly different. (I believe this was originally an idea of Honolulu Blue.)

I’ve got a list of about 20 things now, but here are some examples:
* Laws that allow/disallow female gladiators.
* Wars that force some gladiators to go off to war for a number of years. If they come back, they have gained quite a bit of experience, but there is always the chance that they could fall in battle.
* Abolishment of slavery
* Special Tournaments
* Disease and plague that sickens or kills gladiators.
* Laws that make certain types of matches/actions/weapons illegal or more prominent.
* A gladiator guild that will change various regulations governing arena combat.
* Weapon, medical, and metal advances that influence gameplay.

If anyone has any other ideas for such events, feel free to add them here. Some of these obviously will be difficult to do and won’t make it into the game right away, but some of them would be straightforward changes that should be easy to add. Ideally, I want each career to play out slightly different. In one game, you could have female gladiators, penalties for killing other gladiators in the ring, improved tempered weaponry, and frequent wars that draw your fighters away from the sport. In another game, you could have slavery abolished, generally weak weapons, and an emperor that stresses matches to the death. In a perfect world, I’d like to be able to give the gamer the option to select which random events he wants to have as potential events in his game.

Finally, about 3:30 a.m., I fell asleep, then it’s up at 5:50 a.m. to take care of my daughter. Eek.

Reminder to self: NO COKE WITH DINNER. EVER.
Godzilla Blitz is offline   Reply With Quote
Old 08-20-2004, 11:57 AM   #47
Godzilla Blitz
College Starter
 
Join Date: Oct 2000
Sabotai: Thanks!
Godzilla Blitz is offline   Reply With Quote
Old 08-20-2004, 12:27 PM   #48
CraigSca
Pro Starter
 
Join Date: Jul 2001
Location: Not Delaware - hurray!
GB,

One thing to keep in mind...using databases with VB is easy and convenient to the programmer (especially the searching and sorting aspect). However, from a personal standpoint I try to use databases as little as possible in order to increase speed. When I originally was program Franchise Baseball keeping all player info in a database it took about 75 seconds to play a day of games. In my eyes that was unacceptable. I re-programmed the entire thing keeping everything in memory and reduced that time dramatically - to 5 seconds. Just something to keep in mind that databases are great, but if they are thrashed your performance will suffer.
__________________
She loves you, yeah, yeah, yeah, yeah!
She loves you, yeah!
how do you know?
how do you know?

CraigSca is offline   Reply With Quote
Old 08-20-2004, 10:55 PM   #49
Godzilla Blitz
College Starter
 
Join Date: Oct 2000
20 August 2004: Afternoon

Started and completed Chapter 12 in Step by Step. I think I learned about text files, but I was so sleepy that I am going to have to read this chapter again.

Hacked around trying to get the text files for the Latin first and last names read into Visual Basic. Success! Tomorrow or Sunday I think I’ll try and write some code that reads those two files and creates a set of 500 random full names. Baby steps.

Total time: 3.5 hours hours.

Grand total: 19 hours and 45 minutes.
Godzilla Blitz is offline   Reply With Quote
Old 08-20-2004, 11:01 PM   #50
Godzilla Blitz
College Starter
 
Join Date: Oct 2000
Craig: That is interesting. Easy or fast, eh? I wonder how much of an issue speed will be if I have only 500 fighters in the game world. They will likely have a lot of attributes, stats, etc., to go with them, though.

I think I need to study more before I'll even have a clue what to do with this one. I'm thankful for the heads up, though. I'll be keeping this stuff in mind as I work on this over the next couple of weeks.
Godzilla Blitz is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is On
Forum Jump


All times are GMT -5. The time now is 11:21 AM.



Powered by vBulletin Version 3.6.0
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.