| |
Hide the progress bar forever?
Yes
No
Recent posts by Levgre on Kongregate
Levgre
23 posts
|
Topic: Game Programming /
Clicking an object to execute a function and grab values
In my strategy game when a tile is clicked, I need to reference values from that tile in the function.
I’ve tried doing it event.target code, but I’m new to that. After googling, I tried redefining a var as the value of the private var of the target.
public function x()
{
var y:int = 0;
y= y[event.Target];
// do stuff with y
}
Should I use a get function?
Thanks for any help, not sure if I’m on the right track.
|
|
|
Levgre
23 posts
|
Topic: Game Programming /
Input/suggestions on my code
Thnx for the input.
Sorry, had a typo in there, there are no errors… I instantiated all the variables earlier in the main class, which currently has all the code (I’ll be separating things into classes as I expand).
I’ll definitely work on a separate “checkforscavenge” function.
I’ve studied from a book that had a state-based game framework, so that’s what I’m planning. This is a strategy game with little/nothing in real time, so it should fit well.
|
|
|
Levgre
23 posts
|
Topic: Game Programming /
Input/suggestions on my code
My game will have a simcity like map, and the player executes scavenge missions on ‘tiles’. 3 discovered items will be displayed, and the player then picks which ones to take.
Each tile has a limited amount of loot, of various types. My idea to simulate this is to have a ‘count’ for each category of loot, and a function will randomly determine the specific item.
So here’s what I have so far, just the scavenge function executed by a click of a button. No mission interface, or loot management. This code works, no errors, just doing this from scratch so looking for any input or advice.
public function scavenge(event:MouseEvent):void
{
scavenging = true;
trace("scavenging commenced");
var lootInt = Math.round(Math.random()*10)
while (lootCount >0 && missedLoot <= 15)
{
switch(scavenging)
{
case (lootInt >= 0 && lootInt <= 5 && resLoot >0):
trace ("found food");
resLoot = resLoot - 1;
lootCount = lootCount -1;
txtField.text = "found food";
break;
case(lootInt >= 6 && lootInt <=9 && comLoot >0):
trace ("found gear");
comLoot = comLoot - 1;
lootCount = lootCount -1;
txtField.text = "found gear";
break;
case (indLoot >0):
trace ("found tools");
indLoot = indLoot - 1;
lootCount = lootCount -1;
txtField.text = "found tools";
break;
default:
trace ("found nothing");
txtField.text = "found nothing";
missedLoot = missedLoot +1;
}
}
lootCount = 3;
missedLoot = 0;
scavenging = false;
}
Typical output is
“Found Food”
“Found Food”
“found Tools”
|
|
|
Levgre
23 posts
|
Topic: Game Programming /
General tips for designing a turn based strategy game
Yes, I’m sorry I wasn’t clearer, my main concern is the programming design, not the ‘game design’.
|
|
|
Levgre
23 posts
|
Topic: Game Programming /
General tips for designing a turn based strategy game
My goal is to make a large, complex turn based strategy game. I’m constructing smaller games working towards the end project(description of game below). Right now I imagine the design as somewhat similar to a super complex board game. Tons of variables will be tough, but the lack of physics, real time play, etc. should make it easier.
Any tips or links to study would be nice, I’ve gone through several game design books, including walkthroughs for turn based puzzle games, but I’ve failed to find any programming guides for a grand strategy game.
It is zombie themed group survival, Rebuild would be the closest on Kong. Features include:
Tech trees
base upgrades
MANY Random Events(like 50-100+), dependant on game state, in most the player chooses one of 2-4 options.
branching missions
Loot system including special/unique items
Large group of unique characters, each with personality and skill traits, and individual relationships between other group members
Group dynamics such as morale, values, attitudes (martial → domestic, religious →secular, etc.)
Many ease of play mechanisms, for example:
player created pre-set equipment and teams, easy set up for missions
Intuitive inventory system, partly borrowing from Diablo series
Automated location selection for scavenging, player able to set priorities such as distance, value, safety
Thanks for any help!
|
|
|
Levgre
23 posts
|
Topic: Game Programming /
TypeError: Error #1010 (solved)
Nevermind, solved. I had to edit the mapRowCount and mapColumnCount to match my map.
Having problems figuring out what I need to fix here. Here is the error message, seems kind of non specific:
TypeError: Error #1010: A term is undefined and has no properties.
at classes::ZombieDemo/drawLevelBackGround()
at classes::ZombieDemo()
Update: searching with adobe help, I now tested with “permit debugging”. It appears the error is line 90? Which in the code is.
blitTile = levelTileMap[rowCtr][colCtr];
And here’s the code
I was wondering if it has something to do with my tilesheet. have the png “BuildingSheet” imported into my library, but I copied the code from the book I’m using, and did whatever they did with their png.
package classes
{
import flash.display.Sprite;
import flash.display.Bitmap;
import flash.display.BitmapData;
import flash.geom.Rectangle;
import flash.geom.Point;
import classes.TileSheet;
public class ZombieDemo extends Sprite
{
public static const TILE_BUILDING:int = 0;
public static const TILE_LANDSCAPE:int = 1;
private var buildingFrames:Array;
private var landscapeFrames:Array;
private var tileSheetData:Array;
private var tileWidth:int = 32;
private var tileHeight:int = 32;
private var mapRowCount:int = 15;
private var mapColumnCount:int = 20;
private var level:int = 1;
private var levelTileMap:Array;
private var levelData:Level;
private var levels:Array = [undefined,new Level1()];
private var canvasBitmapData:BitmapData=new BitmapData(tileWidth * mapColumnCount, tileHeight * mapRowCount, true, 0x00000000);
private var canvasBitmap:Bitmap = new Bitmap(canvasBitmapData);
private var blitPoint:Point = new Point();
private var tileBlitRectangle:Rectangle = new Rectangle(0, 0, tileWidth, tileHeight);
private var tileSheet:TileSheet = new TileSheet(new BuildingSheet(0,0), tileWidth, tileHeight);
public function ZombieDemo()
{
initTileSheetData();
trace("tileSheetData.length=" + tileSheetData.length);
trace("buildingFrames.length=" + buildingFrames.length);
trace("landscapeFrames.length=" + landscapeFrames.length);
readBackGroundData();
readSpriteData();
drawLevelBackGround();
addChild(canvasBitmap);
}
......
private function readBackGroundData():void {
levelTileMap = [];
levelData = levels[level];
levelTileMap = levelData.backGroundMap;
}
private function drawLevelBackGround():void {
canvasBitmapData.lock();
var blitTile:int;
for (var rowCtr:int=0;rowCtr<mapRowCount;rowCtr++) {
for (var colCtr:int = 0; colCtr < mapColumnCount; colCtr++) {
blitTile = levelTileMap[rowCtr][colCtr];
tileBlitRectangle.x = int(blitTile % tileSheet.tilesPerRow) * tileWidth;
tileBlitRectangle.y = int(blitTile / tileSheet.tilesPerRow) * tileHeight;
blitPoint.x=colCtr*tileHeight;
blitPoint.y = rowCtr * tileWidth;
canvasBitmapData.copyPixels(tileSheet.sourceBitmapData,tileBlitRectangle, blitPoint);
}
}
canvasBitmapData.unlock();
}
Another update: I traced (array.join());
for levelTileMap = levelData.backGroundMap;
And it appears it was filled correctly. So I guess the problem has to do with the BuildingSheet tilesheet png, or the drawLevelBackGround function…
Update, the complete loop seems to be going through, up to x= 608 y = 288. So something happens when it is on the 10th row… my map is only 10 × 10 tiles (each 32×32 pixels). While the original was 20×15 tiles. Hence there is an error because of the differing map size here.
|
|
|
Levgre
23 posts
|
Topic: Game Programming /
Help pushing xml data into an array
Nice, starting a new project got it working. Now hopefully the rest of this chapter will go smooth.
|
|
|
Levgre
23 posts
|
Topic: Game Programming /
Help pushing xml data into an array
I’m using flash professional… at least I know the lack of output it is a software issue, or a settings issue (possibly with this project). I’ll get on that, then try fixing that output since that’s not what I want :P thanks for the help.
|
|
|
Levgre
23 posts
|
Topic: Game Programming /
Help pushing xml data into an array
var numTiles:int = tileXML.tile.length();
trace(numTiles);
What does that trace?
It traces nothing. So I guess the TilesheetDataXML class isn’t linking any info to Main? I’ve reread the chapter but can’t find what I missed.. perhaps there was an issue with mappy when exporting, but I don’t even think that is involved here. I guess I will read some web sources to better understand what this guy is doing.
Thanks for catching that error, however it still didn’t lead to output being traced. This is the 3rd time I’ve gone through this so I know at least one of the other times (when I copied code straight, just changing variables) I didn’t miss that parentheses.
|
|
|
Levgre
23 posts
|
Topic: Game Programming /
Help pushing xml data into an array
So I am using a FriendsofED flash book, and trying to transplant sections for my own game. I cannot even get what seems to be a simple portion of code to work.
So what I’m doing here is just setting up XML data as a static var, then having a function read and trace the output.
Here’s the XML sheet
package com.efg.games.zombiegame
{
public class TilesheetDataXML
{
public static var XMLData:XML=
<tilesheet>
<tile id="0" name="building" type="structure"></tile>
<tile id="1" name="building" type="structure"></tile>
<tile id="2" name="building" type="structure"></tile>
<tile id="3" name="building" type="structure"></tile>
<tile id="4" name="landscape" type="background"></tile>
<tile id="5" name="landscape" type="background"></tile>
<tile id="6" name="landscape" type="background"></tile>
<tile id="7" name="landscape" type="background"></tile>
</tilesheet>;
}
}
And, here is the class which is supposed to read it and trace out the arrays. I have copied it exactly to the original code(except for names), the original code works when I run it.
package com.efg.games.zombiegame
{
import flash.display.Sprite;
public class Main extends Sprite
{
public static const TILE_BUILDING:int = 0;
public static const TILE_LANDSCAPE:int = 1;
private var buildingFrames:Array;
private var landscapeFrames:Array;
private var tileSheetData:Array;
public function Main()
{
initTileSheetData();
trace("tileSheetData.length=" + tileSheetData.length);
trace("buildingFrames.length=" + buildingFrames.length);
trace("landscapeFrames.length=" + landscapeFrames.length);
}
private function initTileSheetData():void
{
buildingFrames = [];
landscapeFrames = [];
tileSheetData = [];
var numberToPush:int = 99;
var tileXML:XML = tileSheetDataXML.XMLData;
var numTiles:int = tileXML.tile.length();
for (var tileNum:int = 0; tileNum < numTiles; tileNum++)
{
if (String(tileXML.tile[tileNum].@type == "structure")
{
numberToPush = TILE_BUILDING;
buildingFrames.push(tileNum);
}
else if (String(tileXML.tile[tileNum].@type == "background")
{
numberToPush = TILE_LANDSCAPE;
landscapeFrames.push(tileNum);
}
}
tileSheetData.push(numberToPush);
}
}
}
I’m really stumped trying to figure this out, I don’t know what I’m changing that “breaks the chain”. I do not get ANY errors, there is simply no trace output. I tried copying the code then editing it, I tried writing it fresh, neither works. Here’s the original code(well sort of, the author did not provide the first iteration with only the XML data and InitTileSheetData function)
/**
* ...
* @author Jeff Fulton
* @version 0.1
* //file name TileSheetDataXML.as
*/
package com.efg.games.notanks {
public class TilesheetDataXML {
public static var XMLData:XML=
<tilesheet>
<tile id="0" name="road" type="walkable"></tile>
<tile id="1" name="player" type="sprite"></tile>
<tile id="2" name="player" type="sprite"></tile>
<tile id="3" name="player" type="sprite"></tile>
<tile id="4" name="player" type="sprite"></tile>
<tile id="5" name="player" type="sprite"></tile>
<tile id="6" name="player" type="sprite"></tile>
<tile id="7" name="player" type="sprite"></tile>
<tile id="8" name="player" type="sprite"></tile>
<tile id="9" name="enemy" type="sprite"></tile>
<tile id="10" name="enemy" type="sprite"></tile>
<tile id="11" name="enemy" type="sprite"></tile>
<tile id="12" name="enemy" type="sprite"></tile>
<tile id="13" name="enemy" type="sprite"></tile>
<tile id="14" name="enemy" type="sprite"></tile>
<tile id="15" name="enemy" type="sprite"></tile>
<tile id="16" name="enemy" type="sprite"></tile>
<tile id="17" name="explode1" type="sprite"></tile>
<tile id="18" name="explode2" type="sprite"></tile>
<tile id="19" name="explode3" type="sprite"></tile>
<tile id="20" name="ammo" type="sprite"></tile>
<tile id="21" name="missile" type="sprite"></tile>
<tile id="22" name="lives" type="sprite"></tile>
<tile id="23" name="goal" type="sprite"></tile>
<tile id="24" name="blueblock1" type="nonwalkable"></tile>
<tile id="25" name="blueblock2" type="nonwalkable"></tile>
<tile id="26" name="blueblock3" type="nonwalkable"></tile>
<tile id="27" name="blueblock4" type="nonwalkable"></tile>
<tile id="28" name="blueblock5" type="nonwalkable"></tile>
<tile id="29" name="blueblock6" type="nonwalkable"></tile>
<tile id="30" name="blueblock7" type="nonwalkable"></tile>
<tile id="31" name="blueblock8" type="nonwalkable"></tile>
<smallexplode tiles="17,18,17"></smallexplode>
<largeexplode tiles="17,18,19,18,17"></largeexplode>
</tilesheet>;
} // end class
}// end package
package com.efg.games.notanks
{
import flash.display.Bitmap;
import flash.display.BitmapData;
import flash.display.Sprite;
import flash.geom.Rectangle;
import flash.geom.Point;
import com.efg.framework.TileSheet;
/**
* ...
* @author Jeff Fulton
*/
public class GameDemo extends Sprite
{
public static const TILE_WALL:int = 0;
public static const TILE_MOVE:int = 1
public static const SPRITE_PLAYER:int = 2;
public static const SPRITE_GOAL:int = 3;
public static const SPRITE_AMMO:int = 4;
public static const SPRITE_ENEMY:int = 5;
public static const SPRITE_EXPLODE:int = 6;
public static const SPRITE_MISSILE:int = 7;
public static const SPRITE_LIVES:int = 8;
private var playerFrames:Array;
private var enemyFrames:Array;
private var explodeFrames:Array;
private var tileSheetData:Array;
private var missileTiles:Array=[];
private var explodeSmallTiles:Array;
private var explodeLargeTiles:Array;
private var ammoFrame:int;
private var livesFrame:int;
private var goalFrame:int;
private var tileWidth:int = 32;
private var tileHeight:int = 32;
private var mapRowCount:int = 15;
private var mapColumnCount:int = 20;
private var level:int = 1;
private var levelTileMap:Array;
private var levelData:Level;
private var levels:Array = [undefined,new Level1()]
private var canvasBitmapData:BitmapData=new BitmapData(tileWidth * mapColumnCount, tileHeight * mapRowCount, true, 0x00000000);
private var canvasBitmap:Bitmap = new Bitmap(canvasBitmapData);
private var blitPoint:Point = new Point();
private var tileBlitRectangle:Rectangle = new Rectangle(0, 0, tileWidth, tileHeight);
//***** Flex *****
//private var tileSheet:TileSheet= new TileSheet(new Library.TankSheetPng().bitmapData, tileWidth, tileHeight);
//***** End Flex *****
//***** Flash IDE *****
private var tileSheet:TileSheet = new TileSheet(new TankSheetPng(0,0), tileWidth, tileHeight);
//***** End Flash IDE *****
public function GameDemo()
{
initTileSheetData();
trace("tileSheetData.length=" + tileSheetData.length);
trace("playerFrames.length=" + playerFrames.length);
trace("enemyFrames.length=" + enemyFrames.length);
trace("missileTiles.length=" + missileTiles.length);
trace("explodeSmallTiles.length=" + explodeSmallTiles.length);
trace("explodeLargeTiles.length=" + explodeLargeTiles.length);
readBackGroundData();
readSpriteData();
drawLevelBackGround();
addChild(canvasBitmap);
}
private function initTileSheetData():void {
playerFrames = [];
enemyFrames = [];
tileSheetData = [];
var numberToPush:int = 99;
var tileXML:XML = TilesheetDataXML.XMLData;
var numTiles:int = tileXML.tile.length();
for (var tileNum:int = 0; tileNum < numTiles; tileNum++) {
if (String(tileXML.tile[tileNum].@type) == "walkable") {
//tileSheetData.push(TILE_MOVE);
numberToPush = TILE_MOVE;
}else if (String(tileXML.tile[tileNum].@type) == "nonwalkable") {
//tileSheetData.push(TILE_WALL);
numberToPush = TILE_WALL;
}else if (tileXML.tile[tileNum].@type == "sprite") {
switch(String(tileXML.tile[tileNum].@name)) {
case "player":
//tileSheetData.push(SPRITE_PLAYER);
numberToPush = SPRITE_PLAYER;
playerFrames.push(tileNum);
break;
case "goal":
//tileSheetData.push(SPRITE_GOAL);
numberToPush = SPRITE_GOAL;
goalFrame = tileNum;
break;
case "ammo":
//tileSheetData.push( SPRITE_AMMO );
numberToPush = SPRITE_AMMO;
ammoFrame = tileNum;
break;
case "enemy":
//tileSheetData.push(SPRITE_ENEMY);
numberToPush = SPRITE_ENEMY;
enemyFrames.push(tileNum);
break;
case "lives":
//tileSheetData.push(SPRITE_LIVES);
numberToPush = SPRITE_LIVES;
livesFrame = tileNum;
break;
case "missile":
//tileSheetData.push(SPRITE_LIVES);
numberToPush = SPRITE_MISSILE;
missileTiles.push(tileNum);
break;
}
}
tileSheetData.push(numberToPush);
}
explodeSmallTiles = tileXML.smallexplode.@tiles.split(",");
explodeLargeTiles = tileXML.largeexplode.@tiles.split(",");
}
private function readBackGroundData():void {
levelTileMap = [];
levelData = levels[level];
levelTileMap = levelData.backGroundMap;
}
private function readSpriteData():void {
//place holder for reading sprite data and placing sprites on the screen
}
private function drawLevelBackGround():void {
canvasBitmapData.lock();
var blitTile:int;
for (var rowCtr:int=0;rowCtr<mapRowCount;rowCtr++) {
for (var colCtr:int = 0; colCtr < mapColumnCount; colCtr++) {
blitTile = levelTileMap[rowCtr][colCtr];
tileBlitRectangle.x = int(blitTile % tileSheet.tilesPerRow) * tileWidth;
tileBlitRectangle.y = int(blitTile / tileSheet.tilesPerRow) * tileHeight;
blitPoint.x=colCtr*tileHeight;
blitPoint.y = rowCtr * tileWidth;
canvasBitmapData.copyPixels(tileSheet.sourceBitmapData,tileBlitRectangle, blitPoint);
}
}
canvasBitmapData.unlock();
}
}
}
|
|
|
Levgre
23 posts
|
Topic: Game Programming /
How to make Flash games
Okay I went with the “Head First Design Patterns” and it is very illuminating. I think a section should be added to the original post on programming to interfaces (either web tutorials or literature). It seems to be the next step for anyone who wants to go big into coding games, even just being aware of it (even if you don’t apply it heavily) adds a lot of perspective.
|
|
|
Levgre
23 posts
|
Topic: Game Programming /
How to make Flash games
After getting a handle on different AS3 mechanics, I now want to learn more about design schemes, getting the big picture on how large games should be programmed. I don’t really see any resources for that in this thread. And the game design books I’ve read don’t get into it much either.
I’ve found two books so far. “Head First Design Patterns” is written for Java, but people say that the same concepts largely apply to AS3 and the book seems to be written very well.
The other is “ActionScript 3.0 Design Patterns: Object Oriented Programming Techniques”, which also seems good, perhaps a bit more cryptic, but designed for AS3.
I’ll probably check out both and see which (or if both) sync better. If anyone had any other good suggestions for design AS3 theory, that’d be great.
|
|
|
Levgre
23 posts
|
Topic: Game Programming /
Copying the image/bitmap for a button, but not the button itself
I want to copy the image of a button somewhere else on the stage, but without any of the functionality of the button… just a picture. All I know how to do right now is copy the button.
How would I go about this?
|
|
|
Levgre
23 posts
|
Topic: Game Programming /
boolean error
Thanks for the replies. I had tried the reference(documentClass.baseSelected), but since it wasn’t static it didn’t work.
Now I know what exactly a static variable is… one less thing to learn for my game’s code!(only 100-1000+ more to go)
|
|
|
Levgre
23 posts
|
Topic: Game Programming /
boolean error
Okay, can’t figure out what causes this.
I am declaring a boolean variable for a superClass’s if statement. If I declare the boolean within that class, it works, but if I declare it in my document class(as public), it doesn’t work. And gives me the error message
“Access of undefined property baseSelected.”
What am I doing wrong?
So here’s the working code
public class Building extends SimpleButton
{
public var baseSelected:Boolean = false;
……
function thisSelected(event:MouseEvent):void
{
if(baseSelected == false)
{
trace(“would you like this to be your base?”)
}
|
|
|
Levgre
23 posts
|
Topic: Game Programming /
Making a single class type for a bunch of different sub classes/game objects
Thanks for all the imput. I got a template working after messing around a bit. All I do is assign 4 variables then trace them when I click on the subclass object on the gamescreen. Am I doing anything wrong/awkwardly? (I changed the variable names to avoid confusion, mine are kinda weird)
SUPER CLASS
package
{
import flash.display.SimpleButton;
import flash.display.MovieClip;
import flash.events.MouseEvent;
public class TowerEntity extends SimpleButton
{
public var a:int;
public var b:int;
public var c:int;
public var d:String;
public function TowerEntity (a1:int, b1:int, c1:int, d1:String)
{
a = a1;
b = b1;
c = c1;
d = d1;
this.addEventListener(MouseEvent.CLICK, buttonClicked);
}
function buttonClicked(event:MouseEvent):void
{
trace(this.a1);
trace(this.b1);
trace(this.c1);
trace(this.d1);
}
}
}
SUBCLASS
package
{
import flash.display.SimpleButton;
import flash.display.MovieClip;
import flash.events.MouseEvent;
import TowerEntity;
public class Tower1 extends TowerEntity
{
public function Tower1()
{
super(14, 10, 10, "hellloooo");
}
}
}
INSTANTIATING IN MAIN CODE
public function the_game() {
tower1 = new Tower1();
tower1.x = 0;
tower1.y = 200;
addChild(Tower1);
|
|
|
Levgre
23 posts
|
Topic: Game Programming /
Making a single class type for a bunch of different sub classes/game objects
AS3 – making my first game (besides some very simple ones)
I want to have 60+ of an object type in the game, say a building a player selects/attacks etc. So all have the same functionality. Just different images and different stats.
Do I make a single class with all the code, then somehow import that class into all the other ones so they use the same code?
So how exactly do I go about this? Trying to google for an answer, I assume it’s pretty common in design. Haven’t had luck finding it yet though.
I guess since these objects are passive, I could maybe just have a class with all the functions that trigger actions onto the buildings, changes their stats, etc?
|
|
|
Levgre
23 posts
|
Topic: Game Programming /
Looking for open source, usable aerial photos of cities
afaik Open Street Map does not have a bird’s eye photo view…
|
|
|
Levgre
23 posts
|
Topic: Game Programming /
Looking for open source, usable aerial photos of cities
Hmmm how sure are you? What if I end up getting a sponsor for the game (i.e. make money) or make an app on mobile devices for sale.
I’ll read up on Google Map’s terms more.
|
|
|
Levgre
23 posts
|
Topic: Game Programming /
Looking for open source, usable aerial photos of cities
Basically I’m looking for photos like the birds-eye view on Bing Map. It would be perfect if I could use screen shots from Bing Map for my game, but I don’t think it would be allowed under their usage terms.
I’ve been searching for hours now for good open source aerial photos, so far the pickings have been pretty slim. Any ideas? It would be really nice to just find a usable map (close enough and with an angled view), so all the pictures i got would be the same perspective.
|
|
|
Levgre
23 posts
|
Topic: Game Programming /
Looking for advice on strategy map - tile array vs other methods
Basic description of the game+map -
An isometric city map, like simcity. However, the player does not build anything. They just click on buildings to open up menus for interaction options.
So I’m deciding my programming approach for the main map (generating the map, and player-map interaction).
So far I’ve learned about using an array such as this (1s would be walls, 0s are floors).
myMap = [ [1,1,1,1,1,1,1,1],
[1,0,0,0,0,0,0,1],
[1,0,1,0,0,0,0,1],
[1,0,0,0,0,1,0,1],
[1,0,0,0,0,0,0,1],
[1,1,1,1,1,1,1,1] ];
However I’m not sure if I should use an array. My game does not have a character you move, there is no need for walls. The player just has to select buildings on a city map. So I could just have a large backdrop (mapsize might be 3600×3600 or so).
I read that tiles are partly used because each tile is a small file size. However, I’m not sure if performance would be an issue for a turn-based game with a static map. Would splitting a 3600×3600 map into large sections work well? (like 6 600×600 bitmaps)
|
|
|
Levgre
23 posts
|
Topic: Game Programming /
Best way to construct in-game menus for a turn-based strategy game?
I’ve gone through a couple books now (Foundation Game Design With Flash mainly), and started watching online tutorials.
It seems the best route towards game construction is to find the proper technique for the task.
So for a turn based game I want to make pop-up menus with a variety of clickable options, including..
Tech tree
Building info
Character info
Then of course option menu
If I dived into it I’d probably make a movieclip button that contained a variety of buttons within?
Is there a program/template I should use instead? I downloaded Flash Develop, so far. I haven’t done much with it yet.
|
|
|
Levgre
23 posts
|
Topic: Game Design /
Making a great strategy game
I am currently designing a strategy game with the intent to publish it on Kongregate. Before I went too deep into designing features and balance, I thought figuring out the “goals and philosophy” behind those choices would be prudent. So I will start, and I hope I will gain insight from others by posting here instead of writing in my notebook :)
MAKING A DEEP/COMPLEX GAME
Strategy game players want to work their brain. They want to plan ahead, solve problems, and be creative. However providing all this become increasingly harder to overcome as you increase depth. Below are a variety of ideas to consider. Each one can impact the other, and must be simultaneously kept in mind.
Depth needs variety! Picking one of 3 equally similar and successful options is not deep. Make the strategies play out differently. Adopting any of the 3 strategies should be a meaningful choice which determines how they must play the rest of the game.
Tediousness is bad! No one wants to play like an accountant, even if it requires problem solving and attention to detail. A player should not be expected to micro-manage too many aspects, or constantly calculate figures. This will cause more game losses due to boredom than from poor tactics.
On a similar note, choices should require attention/thought proportional to their importance. If it is a war game, reward them for diverting most of their attention towards battle. Don’t punish them if they don’t check the weather forecast for each region… if you want weather to be central to strategy, supply the details in simple and clear notifications, not in menus.
Similarly, DON’T punish players for obscure variables they cannot easily be aware of! Either supply the figures and describe clearly how they pertain to the game , or make them behave realistically/intuitively. Extensive trial and error is not clever nor rewarding, and players should not have to use it extensively to succeed.
Realism can be bad! In real life, most situations are determined by the intangibles such as bravery, passion, timing, or luck… However, strategy games are essentially long equations/decision trees. Generally you want to immersion to be your main focus, and adding a certain level of realism does benefit this.
Imbalance is bad! You may give an illusion of many divergent strategies, but the smart players (and perhaps eventually most players) will realize only 1 or 2 of them are actually good.
Randomness is good! It is one of the easiest tools to force the player to think, adapt, and strategize. However, randomness easily throws off balance. It will force the player to take the safer routes to be successful. Or alternatively, force them to take the highest risk/reward early to gain an early advantage which they can leverage.
So, the impact of each random event must be limited, so players does not have to plan too far ahead to avoid the impact of a possible event. However, a lot of low-level, tedious randomness will bore the player and make them gloss over events/results. A way to balance these two extremes is to have major random events that don’t just PUNISH or REWARD the player, but presents a choice. In this way you will maintain the current game state and balance, but add exciting randomness.
Well that’s it for now… hopefully this wasn’t too off-base. It was hard to add examples sometimes, as I am trying to analyze the higher, more obscure level of design. I hope to get some wisdom from other designers!
|
|
|