3,804 Forum Posts by "Sam"
At 7/30/13 05:08 PM, Toast wrote: for a pretty long time I'd pretty much just cook some rice with the rice cooker and throw in some pan-fried frozen food.
This is pretty much what I eat. Pasta/rice/potatoes with chicken.
besides that i'm taking great pleasure in constantly learning more Korean. It might not count as a hobby because I don't actively spend too much time on it.
I've decided to stop being so lazy and try to take my hand at another lanugage - I feel like it's one of the best skills someone can have. Once you've got Korean down, what does that make you? Like... quadrilingual?
in other news, I'm returning to europe to pursue studies next month after a 2 year sojourn in korea. feels a bit awkward saying this like an announcement, because i really haven't shared much of my life with you new regs. i feel like sam is the only one still here to whom this would be relevant at all.
Guess you'll have to start training me in Starcraft 2 again <3
At 8/1/13 01:02 AM, FlyingColours wrote: I'm Grade 8 at the moment. I'm mainly working on the Pathétique sonata and the Revolutioanry étude (really hard - I can only manage the first four bars so far), but I also play smaller pieces I'm already familiar with or I can sight-read easily (Chopin nocturne No. 2, Rondo Alla Turca, etc.).
That's really impressive man. Grade 8 is an achievement on any instrument. I'd like to start doing grades again for guitar, particularly for the theory side of it. I only managed to do Grade 3 and then decided I'd rather self teach. I feel I could easy get to Grade 6, I think the only advanced technique I struggle with is sweeping.
My hobbies are pretty limited once you take programming and technology away :( How depressing...
At 7/30/13 12:25 PM, theCodeCat wrote: The others seem to have explained most of the more technical stuff already so I would just like to add that OOP is really just an approach to organizing your code. Stuff like private/public or setters and getters are just there to make it easier.
If you are just starting out, then I would recommend that you start by focusing on breaking your projects into meaningful objects. Once you've got the hand on that, start using private/public modifiers and try to have as many object properties marked as private, and only then start worrying about getters and setters.
This is a very good point.
There's a knack to being able to break things down into objects. I think the approach to how you learn it is key. For example, I found OOP really easy to pick up when it was put into a game environment because I could see what an object might be, and see that there were many objects of the same class. And now, it tends to be (for the most part) clear what main objects I'll need for a project.
I had a burst of creative juices yesterday and drew up loads of concepts. Really eager to make a start on it but I've got a few things to wrap up first.
At 7/25/13 03:37 PM, milchreis wrote: Why do you have to rely on somebody like that for a computer.
At 7/27/13 04:26 AM, 64base wrote: Hey guys I want to use this car to travel to work but I'm afraid that the engine may explode from some sources. Is it possible to still travel to work with a car without the engine? Thanks for the help
At 7/24/13 04:53 PM, milchreis wrote: So he does not allow Java, because it's insecure.
But he allows you to do Flash.
On a windows machine, I guess.
lol?
I think we've established that it cannot be done - and Java is necessary to run Flash Develop.
You can use the code tags (noted to the left of the post box) to preserve code formatting which makes it much easier to read. At first glance I can tell you that you don't need to have a listener for each key, you can do what you're trying to with a single listener. It's much better to do it with one listener for various reasons. First collate all those functions and repost the code and I'll take a better look.
At 7/18/13 11:02 PM, VanDiest wrote: http://www.newgrounds.com/dump/item/a0f9a026cb741b1c4e921e84 a863224d
hey guys im working on the basic movements and wondering how people feel about it. I'm going for a kinda fast paced hack n slash platformer. Arrow Keys to move, S to attack, You can use spacebar to jump instead of the up arrow key, and you can double jump. Also dont mind the graphics, they are just placeholders that I got off the internet.
I'm thinking of maybe adding a roll or dash key but I dont think its really necessary.
It's hard to judge when there's no context to the character or game. Personally I think he needs to feel more heavy, perhaps that's because of the graphics. Either way, his second jump is as springy than his first which feels slightly strange. The attacking, again, is hard to judge because the graphics are placeholders. As it stands, I would limit how fast he can attack (i.e. add a pause between attacks to stop him continuously attacking when mashing S).
At the end of the day, it's movement. It takes a lot of tweaking to get right in a game and will vary drastically from game to game. Once you have a solid idea for the game, and have some draft levels to play in, you'll be tweaking it endlessly to get it feeling natural. I'm happy to see I could go back into the first area after going down to the second area, it's good to see that's implemented already.
I heard hashtags are coming to NG this winter.
I was toying with the idea to make a level editor for a freelance project I was working on a few months back but deemed the time would be better spent elsewhere, so I started looking into alternatives. I ended up using the Flash IDE to build up my levels, and wrote a small FLJS script to export the data of all movieclips on the stage to an XML file (position, rotation, scaleX and scaleY). It was a pretty ugly looking XML file in the end but it did the job. Obviously, the XML was then embedded into my project and parsed for the level to be created.
It's pretty easy to create levels in this way, grid snapping in Flash made it a whole lot easier and the levels were never any bigger than twice the stage so I didn't run into any restrictions - but I can see that being a problem for larger levels.
At 7/10/13 08:08 PM, Donut345 wrote: And because then it gets glitchy, id have to reset a bunch of crap and move a bunch of shit and i already have a slight memory leak im trying to do this with least amount of codde.....So is it possible?
It shouldn't be glitchy once all the variables are set back to the values they need to be. It really is the most straight forward way of doing it.
At 7/10/13 12:28 AM, Luis wrote: NEVER take an unpaid internship. If a company is fucking serious about providing a learning value. then they'd pay atleast minimum wage to help you. what the fuck do these places think. that you can just live for free because youre a noob. i mean come the fuck on.
Over here, if you're under 19 and you take an apprenticeship, you get paid like £2.50~ an hour which is complete bullshit. I suppose at that age most people don't have to rely on themselves to keep a roof above their heads but even so, at that rate I'd feel like I was being exploited.
At 7/9/13 08:09 PM, Innermike wrote: I started to realize that I probably would make terrible use of time and just end up wasting copious amounts of time and money, I suck at being in education.
Good on you for realising this before you applied. Pretty much everyone I knew from my college course started uni and dropped out before their final year exams.
I decided it would just make more sense to spend maybe a year or two (or more who knows) doing something that isn't too mentally straining and build up an actual portfolio of work in any free time I have then go from there. I know it's not much of a plan but ech.
Freelance work might be something to fill your time and give you a start to your portfolio. It's good because once you get your foot in the door, your client list only grows. But not web design freelance. God, don't do that.
At 7/9/13 05:52 PM, MSGhero wrote: I need to find me an internship for next summer, sitting around all day is boring.
I've always been wary of internships for some reason. I'd feel like I was being exploited even though I know I'd benefit a great deal from the experience.
I find this quite interesting. Adobe docs:
A reference to a method's containing object. When a script executes, the this keyword references the object that contains the script. Inside a method body, the this keyword references the class instance that contains the called method.
Am I right to say that because an anonymous function doesn't have an object calling it, global is used?
This would be more suited in the Animation Forum.
To answer your question, most of the effects are probably made by the animator themselves, not found online to be downloaded.
Hasn't it only been CS6 that can save down to CS5.5 and CS5? I'm not sure.
I wonder how difficult it would be to write a piece of software to convert .flas.
Maybe this will give you some help.
package
{
public class Main
{
public function Main()
{
// Entry point
}
/* Notice how each function is completely separate */
public function thisIsAnotherFunction():void
{
// Code for this function goes here
}
public function heresAnotherFunction():void
{
// Code for this function goes here
}
}
}
At 5/24/13 12:58 AM, MSGhero wrote: I was making a website too, with absolutely no theme. I went to some website that had Javascripts and DHTML or something, and I would just copy and paste the code into my site to make it look nicer.
Pretty much me. I used to make websites about Diablo 2 when I was 11/12 on "ExPage", and would copy code from DynamicDrive for crazy effects.
At 5/1/13 02:04 PM, PSvils wrote: Mhm, my new idea is to have a full state system, and rather than changing states, I pop and push states. Then states also get a pause and resume function. This would make a pause menu really easy, since you can push it on top of the game state, the game state pauses, and the pause menu has focus.
This sounds similar to how we were taught to handle states when working with LEGO Mindstorm during one of my modules.
We were given an "arbitrator" object which was passed an array of behaviours. It looped through them and queried each state through a method to see if they should take precedence, if so, that behaviours action method was called. Obviously, if not, it would just continue to the next and see if that one wanted to take action.
I actually haven't thought about doing this for game states, but it would be extremely easy to create pause menus by giving it a higher priority than all other screens. Here a snippet from a slide for a graphical example of how we were taught it (probably wont be much use, but here it is nonetheless).
I can do the same, but only for the first year. I can list the other year modules too if you'd like, but have no personal experience in them:
Foundations of Computer Science
For the first semester, we were taught OCaml. This ranged from basic arithmetic functions, to recursive functions involving list manipulation. In the second semester, we focused on data structures, algorithms and implementing those algorithms. For data structures: arrays, lists, stacks, queues, sets. Sorting algorithms, and search algorithms along with their efficiency and complexity.
Software Workshop
Introduced us to Java. We were taught based on the assumption of zero knowledge of any programming language. I rarely attended this lecture because of this. The first semester was what you'd expect: data types, functions, loops, conditions etc. OOP was also touched on. In the second semester we put objects to more of a use with GUI applications using Swing.
Introduction to AI
This module was split into 3 sections: Probabilistic AI, Search and Machine Learning. Probabilistic AI was (I was told) very similar to how a friend of mine dealt with it for a maths course. We learnt variable dependence and independence, conditional probability and Bayesian networks. Search involved breadth-first, depth-first, best-first, tree construction and understanding heuristics. Finally, machine learning was all to do with learning algorithms, understanding entropy, constructing decision trees and binary classification.
Introduction to Soft Engineering
In this module, we essentially learnt how to plan a system and what steps are taken to allow a developer to take an idea and build it. We learnt how to construct UML class diagrams, test a system design through use cases and construct state machines.
Language and Logic
This module covered language syntax, semantics and pragmatics. To begin with, we were taught how to parse a sentence using grammar trees. We moved onto proving validity with truth tables and natural deduction and finally propositional and predicate logic.
Information and the Web
HTML, CSS, JavaScript and jQuery. We had to build basic sites based on a brief, beginning with just layouts in HTML and finishing with an interactive website using JavaScript. In fact, I think the only reason we used jQuery was to simplify the use of AJAX. We had to give a presentation at the end about a subject relating to the web. All in all, this module was the easiest.
Robot Programming
Essentially putting the majority of the techniques we learnt in "Introduction to AI" into practice. We programmed in Java to make LEGO Mindstorm robots solve problems. It sort of combined Software Workshop and AI. We weren't really taught much in this except how to go about writing the code for the robots.
Introduction to Maths for Computer Science
It's A-level maths. I had to take this because I didn't have an A-level or equivalent degree in maths.
At 4/28/13 05:22 PM, kkots wrote: Or use
yourNumber=1.73473423;
factor=2;//2 digits after the dot
result=substring(yourNumber,0,factor+2);
What about for numbers with tens..?
At 4/7/13 11:05 AM, chachon2 wrote:At 4/7/13 09:50 AM, Sam wrote: No, as you're only storing the coins. You don't need to store anything else in an array. It's easier to do it in an enter frame function as you will need to be constantly checking if the player is colliding with the coins, however, it's also possible to run the loop only when the players position is updated.Ok, I understand. It makes the code more efficient. Can you show me an example for update the player position? I'm very interested in it.
Well, in most cases the position of the character/player is updated through input from the person playing the game. So your code might look something like this:
if(Key.isDown(Key.RIGHT))
{
// move the character here
isMoving = true;
}
// all your other key input would be here
else
{
isMoving = false;
}
if(isMoving)
{
for(var i = 0; i < myCoinArray.length; i++)
{
if(character.hitTest(coin[i]))
{
// collect the coin code here
}
}
}
You know a collision between the player and the coin can happen only if one of them moved from their previous position. If the player is the only thing that can move then you only need to check if a collision occurs while the player is moving.
At 4/7/13 09:17 AM, chachon2 wrote: Thank you, Sam, for the quickly reply. Only 2 questions: Would be better to make 2 arrays for this? And, the for loop should be inside an onEnterFrame? Thank you in advance ;)
No, as you're only storing the coins. You don't need to store anything else in an array. It's easier to do it in an enter frame function as you will need to be constantly checking if the player is colliding with the coins, however, it's also possible to run the loop only when the players position is updated.
At 4/7/13 04:01 AM, nitokov wrote: bump,
I'm still interested in this, so i whant to have all games assets (art and sound) in swc file. Is that possible, is that good way of doing things?
It's the FlashDevelop workflow and I find it really organised. You can also export single movieclips to SWC by right clicking in the library.
I haven't coded in AS2 in a very long time so the best I can give you is the concept behind it. Implementing it really shouldn't be a problem though.
You have your array, and you push every new coin into the array. Run a for loop through the array and do the checks you need to do on the coins; in your case: the collision code.
Why is there no DotA 2 crew/club/thread?
At 4/2/13 12:14 PM, Sam wrote: NTH against Empire in a couple of hours.
Tell a lie, it's on the 4th. M'bad.
At 4/2/13 11:58 AM, MSGhero wrote:At 4/2/13 11:53 AM, egg82 wrote: Suggestions?Watch Breaking Bad or play Dota 2.
Or watch DotA 2!
NTH against Empire in a couple of hours.
At 3/31/13 03:07 AM, GeoKureli wrote: I think intellisense has removed capitalization as an issue entirely. also lowercase int and void is consistent because they are primitive datatypes, which affects how the == operator will work on the datatype. I'd like Boolean to be bool in flash, and Number to be float. but I assume they left it capitalized so people could move from as2 without hassle.
But what about String? There isn't consistency. HaXe, on the other hand, looked at AS3's primitive types and chose to capitalise. I don't see how intellisense removes issues whatsoever - it's there as an aid, not to fix anything. It doesn't make a language better because it's not a component of the language. Consistency issues should be dealt with by the designers of the language, not by third parties in hacky ways.
At 3/30/13 11:42 AM, egg82 wrote:At 3/30/13 09:35 AM, FlyingColours wrote: Oh my gosh... 'void' starts with a capital letter! I should definitely give it a try sometime.yeah, i'm thinking the reason AS3 (and Java, I believe) doesn't capitalize certain keywords is because we use them so often that it would be a massive pain in the ass to capitalize it every time. I'm totally okay with this line of thinking.
Really? I'd prefer consistency in a programming language over something as trivial as not capitalising some keywords.
At 3/29/13 11:43 PM, GeoKureli wrote: Couple questions
1: Has anyone used Haxe? Is it neat? is it useful?
HaXe is brilliant. While I've not done anything substantial it's a lot of fun to write in and when you first compile for a platform other than Flash Player, you feel like a wizard. Give it a go; if you know AS3 it's really simple to start writing in HaXe - for the first few "projects" I did, I kept this open on my other monitor.
At 3/27/13 11:59 PM, mandog wrote: I wish I could make flash
Don't we all?

