• Advertisement

andrewoid

Member
  • Content count

    7
  • Joined

  • Last visited

Community Reputation

127 Neutral

About andrewoid

  • Rank
    Newbie
  1. Hi guys, so I am a programmer who has developed a handful of games. Currently I have a personal challenge for myself that I am making nearly 100% of the graphical and musical content for my games. Now so far I have gotten along pretty well using GIMP to create all my sprite 2D graphics, but I have actually made no music or sound for any of my games yet. So here I am asking, what tools should I use to get started? I've done a bit of research and I really like the look of[url="http://www.image-line.com/documents/flstudio.html"] FL Studio[/url] and am considering buying the express edition. However I dont know what else is out there that is simular and more cheaply available. What would you recommend for a guy who is just starting out learning to compose game music?
  2. So what the error is saying is that you cannot make a GUI element an action listener, in this case JPanel. At a quick glance, the rest of your code seems ok, but there are multiple lines where you are trying to add your panel as an action listener, from what I can see is the following lines: [source lang="java"] attack.addActionListener(panel); exit.addActionListener(panel); lightning.addActionListener(panel);[/source] And there are a few other simular problems in your UpgradeMenu method. You need to change it to something like (element.addActionListener(this);). You will get another error which I spotted though: [source lang="java"]panel.add(panel);[/source] This is just rendundant, you cant add something to itself [img]http://public.gamedev.net//public/style_emoticons/default/tongue.png[/img] I think you probably wanted to do the following: [source lang="java"]this.add(panel);[/source] As[i] this[/i] is pointing to your Jframe which contains your various panels.
  3. I dont like how everything is stemming off Level extends Scene. You might want to exhibit some form of inheritance in order to develop a heiarchy for the system. For example, Solider, Zombie, bulllet and Wall are all visible objects, so you might want to make a VisibleGameObject class with attributes like Sprite sprite and boolean visible. Then just extend VisibleGameObject for that class. The idea is it will save you repettive work which you would see across those objects. My next point would be to divide up the game into different scenes, it seems like you are running everything under a single scene in your diagram which I very much doubt would be the real case. Make a scene for Level, Menu, PauseMenu, Victory, Defeat. The idea of those extra scenes that I have mentioned is that it gives you the oportunity to present a menu for different functions. For example on Defeat you might want to present the option to either restart the game, or exit the game. Im only just begining to learn AndEngine myself, so sorry if my opinions are not appilcable.
  4. java null pointer exception

    Im struggling a bit to see where your two sections of code link together, but from what I understand you need to do the following: [list=1] [*]After your initial file conversion, store the result of the conversion to a File object, or as a string. [*]For your second bit of code, pass the File object or string as an argument to the method, then make convertedFile equal to it. [/list] Now I THINK all you need to pass is selectedFileHolder but that depends on what FileConvertObject.doWork(selectedFile) is returning. If that is the case then just do [source lang="java"]File convertedFile = selectedFileHolder;[/source] For more info you can check http://docs.oracle.com/javase/1.4.2/docs/api/java/io/FileWriter.html On the null pointer matter, remember if you are passing a variable as an argument it will in most cases result in a nullPointerException if the variable has not been set. If your getting exceptions, check the variables of your arguments first and then see what you can do to set those.
  5. java null pointer exception

    Cornstalks is right, according to your code FileConvertObject is null when the exception is hit. On your first line initialise the variable and you should be fine. Should be something like: [source lang="java"]private FileConvert FileConvertObject = new FileConvert(argumentsRequiredForConstructor);[/source] Either that, or make the FileConvert class static if you only ever need one instance of the class.
  6. Planning - What do you use?

    I use several different methods, depending on who I am working with. I mostly stick to Cacoo and my tablet though. [b]Cacoo/UML[/b] ([url="https://cacoo.com/"]https://cacoo.com/[/url]) - Ill usually use Cacoo when I am trying to document my architecture formally. UML is great if you are trying to convey ideas to different people as many software engineers understand it and it gives a good overall picture of your system. Generate only diagrams which are useful for you however. When not doing documentation for accademic projects I mainly stick to Class and Activity diagrams. For large projects, Component diagrams are highly useful. [b]HTC Flyer/Tablet[/b] - A tablet can be great for quickly capturing ideas for later reference. My HTC Flyer comes with a stylus like the more famous Samsung Galaxy Note, so it makes drawing out plans for menus or quick scetches for what a UI looks like easy. Drawing on a tablet also means its really easy to share with others, either digitally or by passing the tablet around physically.
  7. Im not too sure about implementing trees to prioritise collision detection, but what I will say is on an update, first check if the triggering object is moving or has moved. If true, then do a collision detection. This should cut down processing for stationary objects like barells, while constantly checking things like bullets. However if the barrel is moved at some point, then you would do collision detection for it to make sure it doesnt clip a wall for example. 6677's suggestion to check for collision on every Nth update is very risky. If you check for a collision on a bullet on every 5th update for example, then the bullet could have passed through a very thin wall in the time between every 5th update.
  • Advertisement