Recent posts by Ace_Blue on Kongregate

Flag Post

Topic: Game Programming / Google Code Jam 2014

On the plus side, Hello World Open only starts in a couple more days, and you still have some time to register. HTH

 
Flag Post

Topic: Game Programming / [Unity C# - Sight Cones] - Uzzbuzz's Questions

Originally posted by uzzbuzz:

I figured I’m going to need a lot of help with unity over the next few months at least, so rather than create a bunch of topics I’ll just have one that I’ll edit.

Please don’t. Whenever you have a problem, check if the question has already been answered in another thread. If it has not, create a new thread for your problem and please put some keywords about the problem in the topic, so the people who come after you with a similar problem will see the thread and find the same answers you’ve been given there.

Once your questions have been answered to your satisfaction or you’ve found a solution, go back and edit your thread title to indicate that the problem is resolved. In an ideal world a mod would then lock the thread, but we don’t live in a moderated forum, so oh well.

For instance:
[AS3] How do I get a MovieClip to rotate around an arbitrary point?
[Unity] Ranged AI rushing the player instead of shooting
[AS3] Variables set to public, other classes still can’t access them [Solved]

Are all acceptable subject lines, while

I have a problem
What is this error message?
Code doesn’t compile

are totally unhelpful.


Moving on, I don’t do Unity, but here is some help with the cone vision. If the OverlapSphere detection is quick, you can get away with using that. I’m assuming that, when the overlap occurs some function you’ve designed gets called. If you want to restrict detection to a cone, all you have to do is test, right when you enter the function, that the player is within the enemy’s cone of vision.

For that all you need are two vectors: The vector that marks the direction the AI is facing, we’ll call it a, and the vector that goes from the AI to the player, which we’ll call r. I’ll assume r connects the eye of AI to the center of mass of player.

Player is visible if and only if the angle between a and r is less than the angle of the AI’s vision cone alpha. What you want to keep for comparison is not alpha, though, but c=cos(alpha). The reason for this is that a.r = ||a|| ||r|| cos(ar). The norms of a and r you can calculate easily, and in case you don’t know, a.r = a_x r_x + a_y r_y + a_z r_z so it’s very easy to compute as well.

That means you can get the cosine of the angle between a and r (let’s call it d) without using any trig function, and only one call to a sqrt function. After that all you have to do is compare d to c and check that it is greater (player is inside the cone). If it’s not just bail out of the detection and pretend it had failed.

I hope this helps.

 
Flag Post

Topic: Kongregate / Upcoming Badges!

I don’t think the game is good enough for an imp, but if you’re going to make one then 10 bosses seems low. It takes completing the game just to attempt the endless insane runs, so only a small number of players have even tried it. 13-15 bosses sounds more appropriate, as people will get better at it over time and those who really want the badge will practice more and more.

 
Flag Post

Topic: Game Programming / Is self-promotion of games acceptable in this forum?

Originally posted by saybox:

GiTD has never been a programming contest. You don’t need programming skill to enter (Stencyl entries are accepted), and we vote based on gameplay, graphics to some extent, and polish. I don’t think anyone ever won a GiTD solely through their code being the best… I don’t think anyone has ever even gotten votes based on programming skill alone.

1) Stencyl tricks people into thinking that they’re not actually programming because they’re clicking on drop-down menus, but they are. It forces the user to break down their process into elementary operations and encode them in a way that makes a computer execute them in the way they intended. That’s programming, no matter how limited Stencyl is.

2) GiTD is a programming contest. Pretending it is not is disingenuous at best. Cooking contests aren’t decided based on who has the spiffiest recipe, judges sample the final products and make their decision based on how they look, smell, feel, and taste. Likewise programming contests aren’t judged on who has the 1337est coding skills, but based on how the final product looks, feels and plays. In more algorithm-oriented programming contests it would be how fast and reliable the final product is, but still it’s not about what the source code looks like. To try to disqualify GiTD from the Game Programming forum because the entrants program games, or whatever your exact point is, makes no sense.

In the end, it doesn’t really matter. The total absence of mod reaction tells me all I needed to know: Spam away boys! This forum is unmoderated.

This thread is now about giraffes.

 
Flag Post

Topic: Game Programming / Is self-promotion of games acceptable in this forum?

Originally posted by saybox:
But IMO that should include regulars asking for feedback, games in progress, GiTD threads, etc. I don’t like the idea that regulars get special rules just because they post here more often.

Really? That’s strange to me. This forum would be a very unusual community if people who have been active members for years, helping others without asking anything in return, were treated as if they were complete strangers when they ask for a favor. So yes, I have a problem with people making an account just to post a link to their game and ask for “feedback”, and I don’t have a problem with a regular posting a link to their game and blatantly asking for views and ratings so their game has a chance to get exposure.

If you think that’s weird then you’re the weird one, because this is the way of the world: People who are part of a group, and give to the group, can expect to get a better treatment when they ask something from the group than some stranger who just wants a quick handout.

As for GiTD, it is a game programming contest. In what bizarro world doesn’t it belong in the Game Programming forum?

 
Flag Post

Topic: Game Programming / Is self-promotion of games acceptable in this forum?

Recently there has been a slew of threads created in this forum for the sole purpose of promoting a new (sometimes “upcoming”, i.e. vaporware) game. I’m getting tired of systematically flagging those threads as spam, especially since I do not see much action being taken against the threads. So I’d like to hear from our mods: What is the official stance in the Game Programming subforum regarding self-promotion. Acceptable or not?

 
Flag Post

Topic: Game Programming / GiTD #39 - Congratulations Zoib!

Alright Zoib, you want more feedback? I’ll give you more feedback! ;p

First of all, jumping. It’s great that the player has the option to jump. but right now it serves basically no purpose whatsoever. You want to make the game more interesting, add obstacles the player has to jump over.

Then, running. Is there ever a reason not to run? Either make an endurance bar that depletes as the player runs or give them a reason to toggle running on and off. If there is none then let the player run full speed, full time, without having to constantly press a key.

As for what to add to the map to make it more interesting, I say obstacles. Puzzles, blocked ways that need some sort of key to open, and if you’re going to allow the player to fail, then pit traps with spikes at the bottom and dart launchers in the walls. Also, interactive elements. You want to make sure the player knows how to interact with the world, and the best way to teach them that is to start them in a small, enclosed room they can only get out of by interacting with something. Make sure they have clear instructions on how to do it. Follow that with a forced linear passage where they again have to interact with things to progress but no longer have the instructions. Finally, drop them into the game proper. Make sure they regularly have to interact with stuff so they don’t forget. Teaching players is just like training dogs. ^^

Another suggestion: Yours is a 3D game that basically makes no use of the third dimension. Remember Pitfall! (the 1982 video game. Sorry, that ‘!’ in the URL makes linking directly a pain in the neck.)? You may not have been born, but I think the game would gain a lot as a hedge maze with underground parts. Another option would be to add ladders (or trees) on the walls in strategic places to allow the player to use the top of the walls as a secondary maze layout, which would allow for one-way shortcuts and spatial puzzles.

Extra wallsets. You want to reward the player for exploring? Eye candy is a perfectly valid reward. Have different textures in different parts of the maze, it will also allow the player to identify more readily where they are and not get lost so much even without a map.

Speaking of map, did you know that nothing is stopping your players from taking a screen shot of the map at the title screen and use it anytime they want during the game? Why not simply make it an in-game feature instead? If you want to limit how often the player gets to look at the map, you can steal a feature from one of my all-time favorites games: The Fairy Tale Adventure. In that game, the player sometimes finds ‘bird totems’ on the ground or as loot from enemies. Each totem can only be used once, and it gives a bird’s eye view of the area around the player. Implementing something like that would not only give you control of how often the player gets to see the map and how much of it they see, but it gives you a natural reward to give out.

I’m not sure about the dehydration mechanic. Having a strict time limit to ‘hop’ between fountains can quickly become a pain, and it also puts a barrier on exploring, since finding a new fountain is a huge gamble if it is located more than half a full tank away from a known fountain. But if fountains are too close together then they defeat themselves. I’d go with a health bar and dangers.

Note: I had no problem with the mouseturn mechanic. It works basically like any modern FPS, and it’s responsive. I don’t understand the hate on that front. :/

 
Flag Post

Topic: Game Programming / GiTD #39 - Congratulations Zoib!

Find the lost trolls: I like that the game is very straightforward to play. There is never any question what the player is supposed to do. On the downside, there is only one thing to do, no way to lose, and no challenge. Start the game, click 6 times, win. Repeat? No thanks. 1/5

Mapworlds: Make the movement tile-based and the game would be highly reminiscent of Dungeon Master, an all-time classic! It is atmospheric and relaxing; I like that there does not seem to be any pressure on the player to do anything but explore. Unfortunately, for all there is to explore, there is not a lot to see. All too often, the player finds themselves in a maze of twisty little passages, all alike and it is very hard not to get bored or frustrated by the monotonous scenery. You could alleviate some of that pain by making the map available at any time by pressing a key (I’d suggest Z or X for defaults) and/or shrinking the map so that there is no longer any ‘dead space’ in it. If you made it clearer what is expected of the player, you could have a good game on your hands, provided you also add some failure condition to make it feel more like a game and less like a toy. 5/5

Note: The ratings should not be taken personally. The voting scheme pretty much forces the voters to maximize the rating of the game they like best and minimize the rating of the other one so their vote packs as much punch as possible. I think just asking people to vote for one game as their favorite would have been wiser.

 
Flag Post

Topic: Game Programming / Shadowmode Token and User id?

Can you upload it to Kong and test it in preview mode only?

 
Flag Post

Topic: Game Programming / Selecting a target with a mouseEvent

I would handle all that stuff one level up. Characters are just a bag of stats, all they need to know is what pertains to them alone. Ideally, they should not be aware that anything exists outside of themselves. Whatever you’re using to handle mouse clicks, let’s call it the BattleScreen class, knows about who is there, heroes and foes. Assuming it is some sort of interactive DisplayObject to which characters have been added, it also knows whenever a party member or foe gets clicked through the magic of event bubbling. But even if that’s not the case, nothing is stopping a character that has been clicked from dispatching a custom event as a result, event that the BattleScreen knows to listen for.

So clearly, the BattleScreen is the ideal class to handle who attacks whom by detecting and keeping track of the various mouse clicks. It is the class that should tell all actors what to do when something gets clicked. If you try to make actors handle their own clicks, you run into trouble, like for instance highlighting a character when it gets clicked, but having no way of making it un-highlight itself when its target has been clicked, because target and character don’t know about each other.

 
Flag Post

Topic: Collaborations / Let's Make Bank w/ Apps

This line puzzles me: “There will be a fair split, which is most likely going to be 75:25 (you:me); this is after profits have been calculated.”

Stop me if I’m wrong but profits are what is left of the generated revenue once all costs have been subtracted. In this case there are two types of costs: The costs of developing the app, incurred by the developer, and the costs of promoting the app, incurred by you.

You have just mentioned that the developer will get nothing to compensate him/her for the costs of developing the app, so I can only conclude that you expect:
_ Full compensation for your costs of promoting the product while your partner, who actually does all the real work, gets nothing.
_ 25% of what is left of the revenue after you’ve already been paid, just because you’re such a swell guy.

Let’s say I make an app and partner with you to sell it. I work on the app for three months, you promote it for one month. The app ends up selling enough copies to generate $10,000 of revenue. If you charge nothing for spamming Facebook in my name, you get $2500, I get $7500, so we’re both getting $2500 a month for our efforts, when I did all the work of developing the product and you… erm, spammed the internet? That doesn’t seem very fair, but it gets worse.

If you charge $2000 for that month of advertisement, now there’s only $8000 of profits to divide, so you get $2000 and I get $6000. You finish your single month of work with $4000 while I get $6000 for 3 months of work. You get paid twice as much as I do.

Clearly this kind of ripoff can’t be what you meant, so could you please clarify?

 
Flag Post

Topic: Collaborations / (Paid) LF artist and programmer for simple small games

Alright, I made a sprite sheet for you according to your specs. Each sprite is 20×32 pixels* and each animation is 8 frames, on its own line, meaning some frames are duplicates but it will make the programmer’s job easier. The animations are, in order:
Idling facing right.
Idling facing left.
Walking right.
Walking left.
Running right.
Running left.
Sliding right.
Sliding left.
Turning from right to left.
Turning from left to right.
Jumping right.
Jumping left.
Falling right.
Falling left.
Attacking right. (In case you want to make the game more complex eventually, I can remove it if you don’t want it. No charge.)
Attacking left.

As you can see, the character I created for you matches your specs exactly (completely gray box with no details) and I work quite fast. If you wish to use this sprite sheet as is you only have to pay me $50. If you’d like changes (e.g. bigger box, different shade of gray, different aspect ratio, extra animations) contact me and we can discuss prices.

*: I chose the width of the box based on the golden ratio, to make it as aesthetically pleasing as possible. If you would prefer a thinner or fatter box I could remake the sprite sheet to those specs, but of course it will cost more.

 
Flag Post

Topic: Game Programming / GiTD #39 - *Lost*

Lost, eh? Roll out the Malaysian airplane games! ^^

 
Flag Post

Topic: Collaborations / game-design adviser (unpaid)

I’m guessing that on a typical day that “game design adviser” goes to work to feed his/her family, since the position is unpaid and even in the (incredibly unlikely) event that the OP’s project would ever make money they’re kept out of that pool as well.

Edit: OP please change “(free)” to “(unpaid)” in your topic, it’s misleading. Free implies that you’re offering something for free, not that you want free stuff.

 
Flag Post

Topic: Game Design / alternative ads besides mochi!

I don’t mean to be insulting, but I am very dubious.

Granted, I know nothing of CPMStar and how their service works, but the whole setup of your post still looks like a sham to me. Why does everyone in this thread have the same sponsorship code? Shouldn’t it be unique to each user? It looks like a ploy to get people to register their games under your account so you will be receiving their ad revenue.

Maybe it’s more innocent that that, and you’re just trying to get people signed up on CPMStar using you as a sponsor so you’ll get a cut of their earnings or some sort of bonus? If it’s a cut then the system reeks of multi-level marketing, never a good sign. If you’re just in it for referral bonuses then I guess it’s OK. After all, if anyone (like me!) learns of CPMStar through you maybe you do deserve the referral bonus.

In any case, I’m not saying what you’re doing is shady, and I’m not saying it’s not, but some clarification would probably be a good idea.

 
Flag Post

Topic: Game Programming / Blitting with alpha

I wouldn’t be surprised if indeed pre-rendering your particles at a range of transparencies beforehand and using copyPixels() on the closest one to what you need on-the-fly turned out to be the fastest method. Depending on the size of the particles the extra memory requirement could very well be trivial. A 32×32 particle drawn side-by-side 11 times (alpha = 0 to alpha = 1 in 0.1 increments) on a bitmapData should take up less than 50kB of memory, so if you only have one particle type it’s probably the way to go.

 
Flag Post

Topic: Game Programming / GiTD #38 - *Minimalism*

Originally posted by archipel1:

The game is based on karuta, the memorization period is here to help you have a better score.
I don’t know about the sound effect, maybe it surprised you because there is no music in the game.

Having all cards visible seemed to defeat the point of the classic memory game, is all. and I definitely was not expecting sounds, I can tell you that. ^^

This theme was extremely hard, for me anyway. The way I approach GiTDs is that I try to make a game that, if someone who is not aware of the contest was asked what my entry was about, the GiTD theme would be one of the first three things they say. Getting a player to say that the game they just played is about minimalism seems incredibly hard.

 
Flag Post

Topic: Game Programming / bending bitmap data 90 degree?

All in all, it doesn’t really matter what the image shows. From what I understand of the OP, you have an image of width W and height H and you want to deform it so that… and that’s where I got stuck. After deformation, where is (0,0) supposed to be? What about (W,0), (0, H), and (W,H)? (W/2, 0), (0, H/2), (W/2, H/2), etc…? Once you know what the transformation should do to every point of your image, qualitatively, you can think about describing that mathematically, and the transformation you need to apply will flow from there.

 
Flag Post

Topic: Game Programming / GiTD #38 - *Minimalism*

Why is there a memorization period if you won’t hide the cards afterward? Oh and I clicked on a wrong card on purpose to see what it did, the unexpected sound effect made me jump about a foot above my chair. I can’t imagine playing the game with the cards hidden and that sound in my ears every 2 seconds.

 
Flag Post

Topic: Game Programming / Ask the player to reload the page

Very recently a really crummy game I won’t name suddenly became the most played game on the site. It has a very poor rating, in accordance with the low quality and depth of the game, but a bug in its development made it necessary to reload the page to replay the game. Since it is an action-type game in which a single game could last anywhere from a few seconds to a minute, the designer made quite a bit more cash than they should have based on game quality alone. They also got an inordinate amount of exposure. So yes, in theory, forced reloading is exploitable. And even after fixing the bug the game has remained inordinately visible.

 
Flag Post

Topic: Game Design / Simplistic game too simplistic?

Originally posted by overactor:

Well to be exact, the collision detection between the monster and the player is pixel perfect. (to be more complete, there is one point in the player that checks if it is inside the monster or not)

If the player is bigger than one pixel, then that’s not pixel perfect. Pixel perfect means collision if and only if any non-fully transparent pixel (not a specially designated one) of the player overlaps with any non-fully transparent pixel of the monster.

 
Flag Post

Topic: Game Programming / removeChild on enter_frame event

Assuming the coins don’t move on their own the collision detection with the coins could be made only when the player moves, not on every frame. Normally a test like that runs in O(N) time since presumably you only have one player that can collect coins, so it shouldn’t become your bottleneck until you have an awful lot of coins anyway.

 
Flag Post

Topic: Game Programming / Fantage

I know, I flagged that thing for removal almost as soon as it was posted but either we don’t have enough mods or they don’t care. :/

 
Flag Post

Topic: Game Design / Simplistic game too simplistic?

Originally posted by Draco18s:

Can it be a game of it cannot be won?

I don’t think so.

I’ve got one word for you: Tetris.

It can’t be a game if it cannot be lost. (Yes, Beyond: Two Souls is walking a very fine line. Actually, screw that: that thing is not a game, it’s just packaged as one.)

 
Flag Post

Topic: Technical Support / Incorrect number of favorited games

After Kongregate recently decided that my list of favorite games (not empty) should be taken out of my front page options in order to make room for my playlist (empty),* I decided that having a favorites list no longer made any sense, and emptied it. Yet, after removing every favorited game from the list, the little heart at the top still shows the number ‘2’ next to it. Clicking on it leads to my favorites page, empty, and crammed with the usual advertisers’ suggestions of potential candidates.

Has anyone else observed similar discrepancies between the length of their favorites list and the game count? Does anyone know how to fix it? It’s not hurting anything (especially since the fav list is now entirely useless) or generating any problems, it’s just grating, on a personal, OCD level.

*: That design decision, questionable as it was, is not the topic of this thread and is only mentioned for context.