CuriousGaming
560 posts
|
Topic: Game Programming /
Collision detection fail
100 objects should be okay, as long as you’re not using AS2.
How are you doing your collision detection? If your squares are square, and your character is square, you only need to check if rectangles intersect. You can do this with a set of 4 simple if statements, and that’s very fast, even if you have to do it 100 times each frame.
The built in functions of Movieclip for collision detection aren’t very good.
|
|
|
CuriousGaming
560 posts
|
Topic: Game Programming /
GiTD [#32] Voting finished! [imp2]
1. MrHasuu. Splendidly Bizarre. I take my hat off to you.
2. Collectron. I like the art and the feel of the controls. Needs more content though.
Lots of other great entries too.
|
|
|
CuriousGaming
560 posts
|
Topic: Kongregate /
Is there a reward for reaching certain levels?
Developers can get the users level from the API. So someone could make a game that would reward higher level users in some way. Not sure why a developer would want to make a game like that though.
|
|
|
CuriousGaming
560 posts
|
Topic: Game Programming /
TypeError: Error #2007: Parameter hitTestObject must be non-null.
Looks like the the if(this.hitTestObject(Game.ship)) statement can’t see Game.ship
Make sure you’ve made the ship object static, as page 2 of that same tutorial. Also check if your main class is called ‘Game.as’ and your ship Movieclip is called ‘ship’. Uppercase/Lowercase matters.
|
|
|
CuriousGaming
560 posts
|
Topic: Game Programming /
GiTD [#32] Entries and Discussion
Voting didn’t work out so well. Partly because the people who vote aren’t necessarily the same as the people who would enter. And most people can count the votes and figure out the theme a long time before the event starts.
|
|
|
CuriousGaming
560 posts
|
Topic: Game Programming /
Uploading first game
Don’t worry about getting paid. That’s the easy bit.
First work out how you’re going to make enough revenue to hit the $25 threshold.
|
|
|
CuriousGaming
560 posts
|
|
|
|
CuriousGaming
560 posts
|
Topic: Game Programming /
How relevant are game ratings?
I think there is often some rating manipulation going on – when Dungeon Blocks emerged from Under Judgement it was rated at 2.6. It’s gone up to 3.3 now, which is about where it should be, so a lot of the early ratings must have been quite low.
If someone has 100 dress-up games and they want to get on the front page, they can improve their chances by downvoting all the other releases 100 times. Sometimes Kong catch it, sometimes they don’t.
As for how important ratings are, I found this interesting:

|
|
|
CuriousGaming
560 posts
|
Topic: Game Programming /
Google Code Jam 2013
Originally posted by jonathanasdf:
“accidentally fell asleep and woke up 12 hours later”
I’m going to use that one next time I miss a deadline at work.
|
|
|
CuriousGaming
560 posts
|
Topic: Game Programming /
Google Code Jam 2013
I qualified. Anyone else?
|
|
|
CuriousGaming
560 posts
|
Topic: Game Programming /
GiTD [#31] Winners Announced!
I’m going to give 2 points to SayBox’s Super Duper GiTD Entry
and 1 for [Feartehstickman]Wizard Element Defence
|
|
|
CuriousGaming
560 posts
|
Topic: Game Programming /
Keyboard
What error are you getting?
|
|
|
CuriousGaming
560 posts
|
Topic: Game Programming /
S2 Question - Variable Reverting to onLoad() value
I can’t see anything wrong with this code, but I’m not familiar with AS2 or timeline programming.
Put a trace in your OnLoad() function and make sure it’s not running when it shouldn’t.
|
|
|
CuriousGaming
560 posts
|
Topic: Game Programming /
How would you do this
Some code from dungeon blocks
Like most of my gamejam code, it’s a hacky, nasty mess. But it should give you an idea.
Edit I’ve added some comments. It still probably doesn’t make any sense.
public static var directions : Array = [new Point(0, -1), new Point(1, 0), new Point(0, 1), new Point( -1, 0)];
private function scoreOnSingleTile(t : TileInfo) : void
{
var hitRoof : Boolean = false;
tileArray.clearScores();
//this sets scored = false for every tile
var spaceTiles : Array = [t];
t.scored = true;
var borderTiles : Array = [];
var scoringTiles : Array = [t];
while (spaceTiles.length > 0)
{
//go through every tile in the badly named spaceTiles Array
for each (var d : Point in directions)
{
if (spaceTiles[0].y + d.y <= 0)
//look at the first tile
{
hitRoof = true;
//check if this is a tile adjacent to the ceiling. If it is, this space is not enclosed
}
var testTile : TileInfo = tileArray.tile(spaceTiles[0].x + d.x, spaceTiles[0].y + d.y);
//look at each tile adjacent to this one
if (!testTile.scored && !testTile.blocked && spaceTiles.indexOf(testTile) == -1)
//if it hasn't already been checked, and it's not filled in, and it's not already in the array
{
spaceTiles.push(testTile);
//add to the list of tiles to check. When it gets checked, it will get added to the scoringTiles array
}
}
spaceTiles[0].scored = true;
//never check the same tile twice
scoringTiles.push(spaceTiles[0]);
//add this tile to the list of tiles inside the enclosed shape
spaceTiles.splice(0, 1);
//remove the first tile from the array of tiles to check. It's just been done
}
//if (!hitroof)
//do something with scoringTiles...
The scoringTiles array is the inside of the shape.
|
|
|
CuriousGaming
560 posts
|
Topic: Game Programming /
Cant use arguments in my function ?
Do you have a movieclip called BuildMap?
|
|
|
CuriousGaming
560 posts
|
Topic: Game Design /
[Questions] Difficulty settings
I would agree with Ace about B being superior to A. The first time you play a game, when choosing a difficulty at the start, you have no idea how hard the game is going to be for you – there’s no way to make an informed choice. Needing to restart the game to change the difficulty is really annoying.
|
|
|
CuriousGaming
560 posts
|
Topic: Game Programming /
Refocus the game?
Originally posted by FlashGrenade:
stage.focus = stage;
what exactly does that do?
is there any benefit to it?
The displayObject which has the focus receives all the keyboard events. Users can change the focus by clicking on objects or tabbing through them. If you have a game with both mouse and keyboard controls, you need set the focus to the object which has your keyboard event listeners on it. Or the keyboard won’t work.
|
|
|
CuriousGaming
560 posts
|
Topic: Game Programming /
[Q] VB Array Question
I would use breakpoints and console.writeline to find out what your program is doing and where it’s going wrong. Are all the RangeX variables 0? Does the salesList Array get populated? I can’t see where you add items to the salesList Array.
This might be a problem too
Dim sales As Double = salaryTextBox.Text
Converting a string to a double without casting – if you’ve turned strict mode off, I don’t know what VB does here. Does it set sales as indefined/NaN?
|
|
|
CuriousGaming
560 posts
|
Topic: Game Programming /
Remove statistics
You can hide stats from players by un-checking ‘display in leaderboards’. I don’t think they can be removed.
|
|
|
CuriousGaming
560 posts
|
Topic: Game Design /
[Questions] Difficulty settings
Grind to win is bad. Grind to let the player adjust the difficulty level? Good.
|
|
|
CuriousGaming
560 posts
|
Topic: Game Design /
[Questions] Difficulty settings
I’ve found that easier games tend to get higher ratings. A lot of our players aren’t the hardcore gamers like us, who play video games so hard that now we make our own just for the challenge of it. Casual players like to finish games too, and see all the content.
<cynical> Make a game play easy, appearing difficult. Then have an announcer loudly praise the player’s skill (‘M-M-M-Monsterkill!’). Instant 5 star game. </cynical hat>.
Letting the player adjust the difficulty is the best policy. But it helps to be canny about it. Setting the difficulty to easy feels like losing. Experience/upgrades are good. By letting the player level up and buy +5 boots, they are effectively setting the game difficulty to easy, but in a way that lets them feel they have beaten the game.
|
|
|
CuriousGaming
560 posts
|
Topic: Game Programming /
Google Code Jam 2013
That looks so much easier than doing a game jam.
|
|
|
CuriousGaming
560 posts
|
Topic: Game Programming /
Unity3D Hunger and Player Health
This is really basic stuff. I think you should have a go first, and if you get stuck, then come back to the forum and ask questions about any specific problems you’re having. We aren’t here to write your scripts for you.
I think the shootorial on Kong had health bars in it? I know it’s a different language, but the principles are the same. You could start there.
|
|
|
CuriousGaming
560 posts
|
Topic: Game Programming /
HTML5 games
You will get a share of Kongregate’s ad revenue, but you will need to pay your own hosting costs.
Making advertising revenue from html5 games is difficult because they are easy to reverse engineer.
|
|
|
CuriousGaming
560 posts
|
Topic: Game Programming /
[Q]Cannot Access Method Of Null Object Reference
You need to give the button an instance name. You can do it in code as SumGato describes, or enter one in the Properties of the object in the Flash IDE.
|