• Content count

  • Joined

  • Last visited

Community Reputation

199 Neutral

About javasirc

  • Rank
  1. Ive been trying to get a scripting system integrated into my game, to change variables and access object information. Im using C# Visual Studios Express 2012, Monogame, and XNA GS 4.0. I installed Lua, but got an error saying its not compatible with XNA 4.0. I tried NLua and IronPython, but i cant figure out how to get them to work. Ive been experimenting with Reflection and CSharpCodeProvider to compile code. Ive successfully loaded and compiled simple "scripts" that have no interaction with my actual game.   Im trying to load a script, and have the script change variables within my game. I have no idea how to allow the script to get my game's variables or classes so it can change/access them. Is it possible to have a script change any game variable? With Reflection? Does anyone have any code examples or sites that can teach me how to create my own script engine? Most of my google results come up Unity related, so im having a hard time figuring this out. Is there a step-by-step tutorial for setting up NLua with C# XNA 4.0? Im becoming very frusterated with this scripting stuff.
  2. EPA Declares Wind Turbines Illegal

    A problem with a cage around the turbine, since the wind is so strong at that height, it can push and birds against the cage and they will be trapped until the wind dies down. Once they are pinned against the cage it will be hard for them to break free. If they managed to to fall below the cage, they can still have injuries such as broken wings.
  3. Thanks so much for the replies. I tested it out on my calculator and paper and it works. I remember doing Vectors in high school and failing that subject. I guess i should have paid more attension in class. I have one more question reguarding the direction the character is moving though. If the character is moving Up+Right (not at a 45 degree angle, but when the direction is (+x, -y)... let me show an equation: Current point: A=(1,-2) and destination point: B=(8,-8) so the vector is (8 - 1, -8 - -2) = (7,-6) The amount added to the character's X coord is: (7/sqrt((7*7)+(-6*-6)) * 0.21 = .224 The amount added to the character's Y coord is: (-6/sqrt((7*7)+(-6*-6)) * 0.21 = -.408 To test if the character is moving at 0.21 points per frame, sqrt((.224*.224) + (-.408*-.408)) = .465, which is not correct. However if i make the negative number positive by multiplying it by -1, it works as shown: (7/sqrt((7*7)+((-1*-6)*(-1*-6)))*0.21 = .159 (6/sqrt((7*7)+((-1*-6)*(-1*-6)))*0.21 = .137 And to test it: sqrt((.159*.159) + (.137*.137)) = 0.21 which is correct. I know its easy to determine if the character is moving UpRight, DownRight, DownLeft, DownRight, as i already do for my method to figure out what degree/direction the character is travelling, but is it nessessary to do this, or is it possible to use one equation reguardless of what direction the character is going?
  4. Ive recently began another attempt at being a game developer. In my previous years of development, i had never implemented any moveable NPCs. I have only done main character movement with WASD on the keyboard, which is simple to implement. I am stuck on making a character/NPC move from one point to another. Example: Start from point 4,13 heading to destination point 18,6. With a movement speed of 7 points per second at a frame rate of 30 per second = 0.21 points per frame. Simply adding speed to x or y doesnt work when the character is moving at a non-straight up, left, down, or right direction. I did a bunch of googling but i can only find basic WASD keyboard movement. Can anyone help me or point me to a resource that can teach me?
  5. Concerned about learning game dev in c++

    Thanks for the replies. Im probably going stick with C# for now and try switching to SlimDX, which mumbo brought up. I dont plan on being a professional programmer, so i guess its not that important for me to do c++.
  6. Concerned about learning game dev in c++

    The main reason i wanted to switch was because i dont feel like C#+XNA is the programming that ive dreamed of. When i think of game programming, i think of starting with a blank file and going from there (aside from using an API to access hardware). C#/XNA doesnt give me the professional feeling, and it feels like im holding Microsoft's hand. I have a lot of mystery behind the framework it starts me with when i make a new program, because i dont know what happens behind the Draw(), Update(), and Initialize() functions. Take these for example, when i start a new Game project in XNA: GraphicsDeviceManager graphics; ContentManager content; I have no idea what they do aside from letting me load images and draw them. And theres GameTime gameTime which i dont know much about. All i know is it keeps track of the amount of time that passed, and gives me functions to retrieve that time. But id still rather program that type of thing myself and create my own libraries with those functions, so i know whats going on. And another reason i want to do C++ is i hear people talking about it being more powerful because its a lower level language, and its the "industry standard language". I dont know whats more powerful about it, but it makes me more attracted to it. I dont want to make a game fast, i want to thoroughly learn a language that i can do a lot of things with, and feel confident with it. I should have mentioned that i have used c++ before. I learned it in 10th grade but i wasnt the best at it. I watched a long video tutorial recently, and coded as i relearned, and i did fine. I know the syntax and such to c++ but i never used an API/library with it. I also have a stack of c++ books that ive accumulated since i started programming. I guess the main reason i want to do c++ is because it seems like a more professional language and i do all the programming. And not knowing exactly what the .NET framework and XNA does leaves me with a lot of mysteries, which kind of pushes me away and makes me lose interest in it.
  7. I currently program in C# with XNA. Ive been programming off and on for years. I recently completed a Minesweeper clone. Im thinking about switching to C++, and probably using DirectDraw. My main concerns are that C++ will be hard to get things working, such as creating a window, getting DirectDraw to work, drawing graphics, and espcially developing a loop for the game. In C#/XNA, i downloaded and installed them, and was given the entire base/framework for creating a game (it had Update, Draw, Initialize, Graphics/Content objects, and all that other stuff. All i had to do was learn the functions. With C++, all im given is the 'main()' function. I know i have to get DirectDraw and get that working, but i have no idea how. When i do start programming, i have to set up a window to draw in. No idea how. Then i have the game run at a cirtain framerate so it doesnt consume 100% CPU. No idea how. I was never challanged with any of the basics to game development, only the "content side" because C#/XNA was so mindless and easy. So can anyone explain to me how DirectDraw is set up (the theory of how a library works, not step-by-step directions), and how setting a framerate works? XNA was simply install and it works. Ive tried to use DirectX and C++ many years ago, but i gave up because i didnt know how it worked.
  8. Im using a file database i programmed a year ago, rather than a real database. The storage formats i shown in my first post were just examples so people can understand whats being stored. In my file database it would look like: ######Gnomerogue00790104000000000000000500000014 ########Javasirc00430034000000020000000600000006 It reads a line, or just a series of bytes, depending on what needs loaded. Im just not sure how to manage the stash, inventory, ect. Should the stash, inventory, and gear be a Containers, and be placed in a single storage that only stores container data? So Gnomerogue's stash ID could be 0, Inventory ID 1, Gear ID 2, each weapon gets its own container for sockets, Bags that can be placed in the stash/inventory gets its own container, and so on? -------List of Stored Containers-------- [0]Gnomerogue's stash container [1]Gnomerogue's inventory container [2]Gnomerogue's gear container [3]Item ID 7's container thats in Container [1] (Gnomerogue's inventory) [4]Javasirc's stash container [5]Javasirc's inventory container [6]Javasirc's Gear container And then give the character data a container ID for the stash, inventory, gear ect?
  9. I started designing the technical side to an online rpg, which will save player's characters, items in stash, items in inventory, and items equipped on their char, as well as other stats. But im trying to decide one of the following: 1) If i should store the stash, inventory, gear, and all other character variables at once place ("Master Saved Character Database" which would contain every variable needed to restore a character into gameplay, in that one line of data) 2) If i should store the character stats (strength, experience, level ect), ID to their Stash, ID to their Inventory, ID to their Gear ("Gear" is what the character has equipped) in one place, And have a separate storage for all character's stashes (which stores a series of Item IDs), another storage for all character's Inventory, and another storage for all character's equipped gear. The last RPG i was designing used the first method which seemed messy. Of course i have minimal experience designing the technical sides of storing saved data. Method 2 is what im currently leaning towards, because its stored in a more organized fashion. In addition if a character's data became corrupt, that character's stash/inventory/gear will remain intact. The downside to #2 is that i have to access multiple storage databases to load one character. ---------------------------- Method #1 would look something like: [0]NAME=Gnomerogue,LEVEL=79,STRENGTH=104,STASH=07,03,15,79,00,00,INVENTORY=... [1]NAME=Javasirc,LEVEL=43,STRENGTH=34, STASH=02,60,62,00,00,00,INVENTORY=... ---------------------------- ---------------------------- Method #2 would look something like this: CharacterList [0]NAME=Gnomerogue,LEVEL=79,STRENGTH=104,STASH_ID=0,INVENTORY_ID=5,GEAR_ID=14 [1]NAME=Javasirc,LEVEL=43,STRENGTH=34,STASH_ID=2,INVENTORY_ID=6,GEAR_ID=6 ... StashList (Lets assume the stash holds 6 items, to make this simple) [0]07,03,15,79,00,00 [1]00,00,00,00,00,54 [2]02,60,62,00,00,00 ... ---------------------------- PS Im not sure how a character will end up with a different ID than the Stash, Inventory and so on.. but lets just assume it can happen (maybe i make a command like "CreateNewStash" and its not linked to any character.. i dont know) There are other object-based variables such as spellbook, actionbar-setup, and so on but i did not cover that, just discussing the idea of design. So the question is, which method is better to use in an online game that has to support a lot of characters? Which does WoW and other MMOGs use? Or do they use a completely different design?
  10. An RPG with a lot of ambiance?

    I appreciate every replying to me. I checked out the games on Youtube, and i think Risen is what i was looking for. Although i like isometric locked view, and hack'n'slash, it still looks very nice. Fortunately its on Steam, and it has a downloadable demo! So ill be able to play it soon. As for Diablo 3, i will definitely be playing it, but i know it will leave out most of the characteristics that made Diablo 1 and 2 so good.
  11. An RPG with a lot of ambiance?

    I dont know if im supposed to post this here, but its the Lounge so i guess its the best place. I was wondering if anyone knows of an RPG (singleplayer or multi) that has a lot of ambiance. By ambiance i mean good sound and visual detail not associated with gameplay. For example, your in a dark dungeon. The music playing is scary. You can hear (and see) rats running around looking for food, and water dripping from the ceiling. You enter another room of the dungeon, and some bats fly out the door, and the sound plays accordingly. When you proceed to a "trap" location, lets say a few zombies will pop out from behind a box, warning music plays as you get closer. Just like you hear in the Jaws movie, when the shark is getting close to a swimmer. You know something is about to happen, and the sound puts you in the "frightened" mood. The best game i can think that is like this is Diablo/Diablo 2. It seems like most of the modern day games consist of the same old character classes, skills, and emotionlessly hack'n'slashing the same monsters found in every other rpg. So can anyone please tell me a few modern games that have a detailed ambient setting that will create a, preferably frightened, mood?
  12. After playing Evony for a few months, i began designing my own RTS MMO similar to Evony. In case you never played Evony, here are some features: 1) The map is seamlessly scrollable. 2) Instead of sending a pack of troops to march across the map, Evony uses a time-based system. You send your troops on a march to a specified location, with a mission. The troops are not displayed on the map. A progress bar shows you how long until the mission completes. Although Evony uses cities with buildings inside (one city, one tile, N number of buildings), im going a different route. Instead of using cities, every building in the base will be buildable on square tiles on the map, like other RTS game such as Age of Empires. I havnt named the game yet, nor have i decided if i will begin programming it, but heres a detailed description: Graphics There arnt many graphics to the game. There are no troops being animated walking across the map. All buildings will have 3 state animations; Building, Built, and Destroyed. Artilary units do have a map graphic, which i will talk about later. Also, all units will have an icon graphic for in barracks/airport to train. Mission Types I will list the mission types before mechanics, so you get a better idea on how they work. Attack - Sends units to attack the target hostile building, in hope of destroying it. Intercept - Sends units to intercept the incoming hostile attack. Reinforce - Sends units from one building to another, and they do not return. Transport - Sends units from one building to another, leaving the resources and returning back. Scout/Spy - Sends units to gather info from the building, such as what it has stored inside, and what mission its on. IE If an Airport has 2 Stealth Fighters inside, it will include that there are 2 Stealth Fighters in the spy report. Move - Moves the Ground units to the specified location. When the mission is over, the units do not return home. Instead, the convert into a Battery. Note that units cannot be sent to another location once converted. However they may be recalled back to where they deployed from. Recon - Sends units to gather Battery/Ground Unit info within a radius of tiles. This reports all Batteries within X tiles of the targeted location. Artillery - Only executable from a Battery. The player selects where they want the Battery to Artillery Strike. The attack is almost instant, depending on distance, but there is a recharge time after each strike. I might add more missions, such as a Capture mission to capture enemy buildings. Mission Mechanics The mission mechanics will work very similar to Evony's. You fill in some info to create a mission and send it. The progress bar pops up, and you get the result when its done. One major mechanic thats not in Evony is the Move and Artillery missions. I added these mainly for strategic gameplay. Theres not as much strategy as id like in sending fighter jets over and over. In Evony, when an attack is sent by an enemy, you may not get much information about the attack depending on research and Beacon Tower level. In this game i plan on doing something similar, but not exactly the same. Since this is a modern war game, i will implement radar stations. When an attack is sent from an enemy, it will not have a warning until it is in X distance of a radar station. The area is increased depending on researched technology. Still, the distance is pretty large. Fortifications and Combat Defensive Fortifications will be another prime feature to the game. In Evony, you had fortification spaces on your city's wall, which you filled with Traps, Archer Towers, and other things. When your city comes under attack, the enemy must beat your defending troops and wall defense. Then you get to take some resources with you. In this game, you may build Fortifications. I havnt decided which of the 2 ways it will be implemented. Idea 1: It will work as a single building that has multiple defenses combined (missile launcher + machine gun) and defends other buildings. Idea 2: Each defense takes its own tile on the map. The Fortifications can be set to defend other nearby buildings. When an attack hits a building it is defending, the fortification will get first hit in attempt to destroy the attacking unit(s). Technology and other unit defenses, such as anti-rocket lasers, or a jet using shaft to detour the missile) will also have effect on the outcome of battles. Attack range may also be implemented to allow attacking units to have first hit without dealing with fortifications. Structures (buildings) Command Center - This is the primary base. Players can build multiple, but limited amount of them. Once every Command Center is destroyed the player loses. War Factory - Produces and stores ground units, such as tanks and Humvees. Airport - Produces and stores air units, such as Stealth Fighter and Spy Jet. Shipyard - Produces and stores space units, such as Spy Satellite, Space Station, and Cruiser. Missile Silo - Produces and stores missiles, which will be listed below. Science Lab - Allows research of advanced technologies. Armory - Allows unit upgrades and bonuses. Nuclear Plant - A power producer that supplies power. Solar Plant - Produces power that is supplied by Solar Satellites. If you have no Solar Satellites in orbit, the Solar Plant is useless. Communications Station - Allows spy satellites to send spy data and reports for you to view. Refinery - When built on an Oil tile, it produces fuel. Steel Production - When built on an Iron tile, it produces steel. Titanium Production - When built on a Titanium tile, it produces titanium. Crystal Production - When built on a Crystal tile, it produces crystal. Rocket Base - Produces and stores rockets, which will be listed below. Solar Field - Produces power. Only produces during the day, if day/night cycles are implemented. Radar Station - Allows incoming enemy attacks to be seen when they come in range. Missiles (from Missile Silo) Ballistics Missile - A missile that can be launched to a long-distance target. They can also shoot down Space Stations. Anti-Ballistics Missile - A missile that can be used to counter Ballistics Missiles and Nuclear Missiles. Anti-Satellite Missile - A missile that can be used to destroy enemy satellites, including spy and solar. Nuclear Missile - A missile that can be launched to a long-distance target. It has a huge effect on what it hits, and a lesser effect to buildings in X range. All players will be alerted when a Nuclear Missile is launched. All players will receive a report once the mission ends, either resulting in being destroyed by ABMs, or the destruction and location it hit and was launched from. Rockets (from Rocket Base) Craft Interceptor - Executes an Intercept mission against the incoming attack. Ballistics Rocket - Operates like the Ballistics Missile, but has a lesser effect and a much smaller distance. Also cheaper than the AB, and useful for close enemies. Can also be launched at Batteries. Ground, Air, and Space Units Im not going to list all of these units, but there are transports, spy units, attack units, interception units, satellites, helicopters, and various tanks, aircraft, and spacecraft. The Space Station The Space Stations is a space unit, but is different than the others. It acts as a Shipyard as it can produce spacecraft (not including more Space Stations). It also has an onboard Space-to-Ground missile platform, which can send Ballistics Rockets to the surface of the planet. Distance still applies to the Rocket, but ignores surface to space distance. Number of Space Stations in command will be limited, probably depending on technology research, or Armory upgrades. The Goal of the Game The overall goal is to conquer the entire world. Players can create/join alliances and work together. I want there to be a lot of strategy in the game, not just hammering the enemy with thousands of troops. Unit production buildings (War Factory, Airport, Shipyard) will only store a few units. The number of units storable in each can be increased by technology research or the Armory. Thats the basics of the game. Im not sure how much fun it would turn out, or how many people would play it. Thats why im asking everyone's opinion on this type of game, as it has few graphics and uses progress bars for missions and combat in general. If anyone has any feedback, opinions (good or bad), questions, or comments, please reply!
  13. Ive been doing a little research on making a 3d model have bone animations. I read stuff about keyframe animations, bone animations, and skeletal animations. I dont understand the difference between any of them or how they work. So i started designing my own class to handle animations using multiple 3d models (or meshes whichever it is) to make an animated character. So far how my design works is i will have a file, weather it be script, xml, or some custom file, which contains filenames to each model associated to the character. It will also have IDs for each bone, and other bone data. Each bone has a Starting Point, which is where it connects to its parent bone. Bones have multiple Pin Points, which is where more bones connect at. There will be one "Mother" bone, which would be the torso, that other bones will connect to using the Pin Points stated above. The Mother Bone is the bone that is first given the display information such as transformation and rotation. The Mother Bone will pass this information down to other bones connected to it. The next bone, lets say an 'upper left arm', will retrieve the point info it needs (from the Mother Bone), and its Starting Point will be set to that point. And the next bone can attach to whichever bone it needs to pin to and so on. I dont know how well this design will work. The main thing i dont like is that a single character will have a number of mesh files associated to it (head,torso, upper left arm, lower left arm, and so on). If theres a better way to make a 3d character animate, please tell me. And im sorry if my explanation to my design was confusing.
  14. I have no intension of doing it by hand! My original plan was to take 3D models, and move them around certain degrees (16 times in a 360 degree circle) for each animation frame of each action, in a viewer and create a texture 2d, and put that into the tile library for that item. But even that will take a long time. I think i will be doing it in 3D. Im going to have to do a lot of learning tho. I have absolutely to idea how to create animations for a 3D object. Ill probably do all objects as 3D models, and just do the landscaping and static structures such as buildings as hand-drawn 3D. The game world will remain 2D, similar to Diablo 2, but objects will be 3D so i can create items faster and with better management.
  15. Over the last year or so (off and on), ive been designing many aspects of my game, along with programming some of them. After hours of figuring out how im going to allow items to be shown on a character, i thaught i had a good way. But the problem is, it takes far too much disk space, and memory. Ill start by explaining the basic graphics of my game. First of all, character images are based on their race. Character classes will not have their own character image. Instead they will have default items assigned to them. Each character class will be given a race, chosen by the player when they create their character. The reason i am doing it this way, is because i want some races to be leaning forward (Undead, for instance), and some to be standing straight up (Humans), and some to be tall or short (elves and goblins, respectively). I will be using 16 directions of display. North, NNE, NE, NEE, E, and so on. Lets assume every animation will have 5 frames. 16*5 = 80 frames just to cover the directional animations of 1 action. Then theres Swimming, Attacking, Casting, Dying, Standing, Running, Walking. Thats 80 frames PER action that EACH race can do. If i have 15 actions, each race will consume 1200 images in its file. Lets say i have 25 races (including Mobs/NPCs), thats 30000 images total. Thats a lot of space that gets taken up on the hard drive. I have 5 player races so far. Then when players go into dungeons, more races (from mobs) will be loaded. Thats a ridiculous amount of memory. But thats only the beginning. Now, in order for every time to fit perfectly on each character race, action, and animation frame, it must be in the same format as the race image. So one item will have to fit perfectly on EVERY race, match every direction, and every action. That comes out to a single item taking up 1200 images per file, and 25 files per item. Therefore one item takes up 30000 images, spread throughout 25 files. This will simply not work. Every player, and character, will have their own set of items. If a player is around 15 different players who each have different items, and are all 5 different races, that comes out to be 90000 images. Thats way too much, not only to hold on disk and memory, but id have to have 9000 people working on the item graphics. The only other way i can think to make items display on characters is to do 3D. I attempted to program in 3D once, a few years ago, and failed miserably. Anyone have ideas or suggestions? And anyone know how Blizzard pulled this off in Diablo 2?