Advertisement Jump to content
  • Advertisement

blesseddisciple

Member
  • Content Count

    17
  • Joined

  • Last visited

Community Reputation

111 Neutral

About blesseddisciple

  • Rank
    Member

Personal Information

  • Interests
    |programmer|

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. blesseddisciple

    Dynamic monster object generation help

    What I meant was that my monster class has an instance variable like so, monster.alive.. So, if I reference monster.alive in my code it will be looking at whatever object is currently set to monster variable. Then, once the new object is assigned to monster, monster.alive looks at the new object and the old reference is gone correct. Just verifying I understand correctly.
  2. blesseddisciple

    Dynamic monster object generation help

    In my monster class I have a boolean 'alive'. Basically the only time 'fighting' is activated is when a character moves to a new room and the room contains a monster. A new monster is rolled and alive is set to true. The fighting continues until alive=false. Then fighting is set to false. Then normal room actions continue. I also have things like monster.'level', a boolean for 'magic' type, and other stats. I reference these in my main method. So if I replace the old monster object with a new one, that means the monster.alive (etc.) will stop pointing at the old object entirely so it can be destroyed by GC, correct?
  3. blesseddisciple

    Dynamic monster object generation help

    Yeah, i guess i just wish there was a keyword like monster=deallocate(); or something so that I knew for sure it was emptied before reassignment. But as slow as a,text based game runs, shouldn't be an issue I guess.
  4. blesseddisciple

    Dynamic monster object generation help

    Sweet, I was hoping that might work but i was worried about the first class object being stuck in memory after reassigning the variable to a new class object. But if the previous "new Monster()"s will get cleaned up since they are no longer bound to a variable then it should work fine. I'm not the greatest at memory managment
  5. Hello everyone, I need some help with my Java text-based dungeon crawler. My issue is that i want to spawn a monster with random specs every time a player enters a new room, pending an encounter roll. I am trying to figure out the best way to do this, logic wise. Should I (can I) just recreate the same object each time like, Monster monster=new Monster(); and have the class constructor use random number modifiers to construct the object each time. Is there a way to destroy the object so I can remake it with the same variable name? Any help is appreciated here. Thanks
  6. blesseddisciple

    Sick of Javascript bugs, going back to Java

    I feel you on all of that. I am not bashing JS either, but I just get so frustrated sometimes with it. I will use for still for front-end web stuff just because it's so convenient and I already know it fairly well, but for personal projects/games I will use Java and possibly C# when needed, since they are basically the same language just different framework/implementations. For advanced games I will probably do Unity with C# but I don't plan on much of that I just enjoy designing engines/concepts for games on a low, hand-coded level.
  7. blesseddisciple

    Sick of Javascript bugs, going back to Java

    I'm not trying to sound abrasive, just giving my opinions as well.
  8. blesseddisciple

    Sick of Javascript bugs, going back to Java

    To flesh out our arguments, let's say I present a programming obstacle, nothing too time consuming. You program it JS and again in Java, (or I can in Java but then we introduce different programming styles/approaches), and then we compare which one looks/functions more efficiently and with less trouble. Does that sound fair? You literally just admitted that they threw together some stuff to make it act like something it's not. You may not see that as a bad thing, but you can't blame others for not agreeing with you on that point.
  9. blesseddisciple

    Sick of Javascript bugs, going back to Java

    I'm not disagreeing with the fact that Javascriot is a beautiful language, for web scripting. I use it regularly for web apps, it just seems like it really suffers on the object/Class structuring conpared to other languages ive used. I have been programming since QBASIC, and literally never had issues with C#, Java, VB, QB64, Python. But for some reason everytime i turn around while developing a jscript game something doesnt work the way it should in every other language. I'm not bashing javascript, just merely saying im done making games with it. Personally, I love node.js I cant blame you for assuming it's my poor coding skills. In fact, it is, but only to the point that things that are easy in other languages act buggy in js unless you know all the little tricks to make it work right. Classes for example, trainwreck in js. Not my fault.
  10. blesseddisciple

    Java's Weaknesses in Game Creation

    I am moderately experienced with Java and I love the language, it is the most popular (arguably) language in the world, has rigid but proper and effective structure, great support and libraries, and honestly the speed thing is a non-issue for 95% of applications. If you are using heavy 3d rendering or very heavy sprite movement densities, you might have some slow downs but even still, tests have shown Java to be very close to C++ in most performance situations. It's true C++ is faster, but honestly, the difference isn't affecting much. I myself am just going back to Java for games after having left HTML5/JavaScript browser development. I find returning to Java to be refreshing as the language is structured in such a way that it almost forces me to program well, and quickly tells me when I don't! Instead of some other languages making me debug for 9 hours over a missed parenthesis. Let me know how your development goes if you decide to stay with Java and I will help where I can.
  11. blesseddisciple

    Shooting a ball in java

    Honestly, for a basic 2d game, there is no need for an engine. You just need to use some critical thinking and some programming skills and you can easily hand code your formula for a bullet trajectory. Basically how a bullet works is that it is fired at max force and min. gravity effect. As the shot line (let's say coordinate x) increases, the the fall line (say coordinate y) increases. The trick is that with each increment, the x velocity slows down more sharply, and the y velocity increases more sharply. Many ways to code this, just get creative and think about what needs to happen at the beginning, end , and each step of the bullet life. The biggest factor is how far you want the bullet to travel at max distance, use that to figure out your algorithm for controlling velocity and bullet drop. Regarding 2d games, you didn't say whether it is FPS, top down, side scroller.. But, regardless, you can easily do almost anything you need by simply using the AWT library. Drawn graphics, sprites, etc.
  12. So I have a decent amount of JavaScript experience now and decided I was gonna lower my head and start cranking out some 2d games, partly to learn, partly to have fun. Afterall, HTML5 canvas is such an easy and enticing medium. I love the JavaScript implementation of it. But after literally struggling for a week to get basic game functionality working I have had enough of the little stupid bugs that pop up with JavaScript. Don't get me wrong, I still love the language for scripting. I'm just not going to spend 20 mins coding and 5 hours debugging just because the language is crap. I've decided to return to my previous endeavor, Java. I like Java a lot and the only reason I haven't pursued more in the way of game development is just for the fact that Java is limited to mobile or PC apps that may never see the light of day unless it's hosted on some obscure Java game hosting website that is populated with 2,000 half developed games that no one will ever care about. BUT, still, I enjoy hand coding and I know C# but don't feel like using Visual studio and I really don't wanna hand code C# on the .Net or whatever. I use Visual Studio for business apps (ASP.NET) but I don't wanna build a game with it. So, does anyone have any points to share about why moving to Java for game development is not smart? Besides the whole, "Java is slow" thing. I mean things that might make it harder in JAva to make games vs. in other languages. Please share your thoughts.
  13. Thanks for your reply, sorry i wasn't clear enough. What i need help with is how to store the tile x and y coordinates for each tile i loop through so that i can use them for reference later when doing collision detection. Basically i have to know if the characters x and y coordinates are touching any tiles x and y, what type of tile it is (0,1,2) and then calculate movement/collision based on that. Im assuming i need to create some kind of array of objects and store the values as the for loop moves through tiles. Im used to java where class objects are drastically easier to implement.
  14. I am designing a very simple 2d tilemap engine with HTML5 canvas and Javascript. I have two for loops to run through map coordinates and then draw to canvas a tile based on what the said coordinate value is. While doing this, I also need to able to assign an incrmenting var/class/type or whatever with dynamic parameters such as that tile's x, y, and number values. Something like the following pseudo theory: for loop ++ , for loop++ counter++ sprite[counter]{ x=someNum; y=someNum; value=someVal; } Thanks for any help! Jscript_GameTest.html
  15. blesseddisciple

    Help Deciding On New Language

    Thanks for your reply, Alberth. I appreciate the information you provided. As far as compiled goes, I just want a language that doesn't make it overly complicated to create an executable. Basically, I want to know that if I make a cool game I can save it to a disk on pop it in a different PC 5 years from now and it will run with having to download a bunch of old outdated stuff. I want portability, not for commercial purposes, just more for personal archiving.
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!