• Advertisement


  • Content count

  • Joined

  • Last visited

Community Reputation

1662 Excellent


About suliman

  • Rank

Personal Information

  • Interests
  1. Im aware of the folly of using char arrays The problem is my projects are already very large and there is alot of work with rewriting all the functions that use char arrays to instead use std::string (which I get the impression would be the best replacement).
  2. Ok the issue at hand is these functions: sprintf(help1, "Risk of hostilities: %d %%%%%%%%%%%%%%%%", www.ambushRisk[ambushMood][0]); sprintf(help2, "Risk of hostilities: %d %%%%%%%%%%%%%%%%", www.ambushRisk[ambushMood][1]); sprintf(help1, "Risk of hostilities: %d %%%%%%%%%%%%%%%%", www.ambushRisk[ambushMood][0]); sprintf(help2, "Risk of hostilities: %d %%%%%%%%%%%%%%%%", www.ambushRisk[ambushMood][1]); gui.setPopupChoicesMouseover(gui.popupHolder.pos.x + 40, 610, help1, help2); void gameGUI::setPopupChoicesMouseover(int x, int y, char * c0, char * c1) { if (x){ popupHolder.popupHelpX = x; popupHolder.popupHelpY = y; } if (c0 && c0[0] != 0) { sprintf(popupHolder.answerMouseover[0], c0); } if (c1 && c1[0] != 0) { sprintf(popupHolder.answerMouseover[1], c1); } } 1. So first a sprintf to format the input. 2. Then a sprintf when I "store" the input (in setPopupChoicesHelp) in the gui class 3. Then another sprintf when the stored char array is sent to the drawing function to draw the text to screen when hoovering the button in question. And that function can also take "..."-parameters so I need a sprintf there as well It seems every step doubles the amount of %-signs I need so I end up with an actual %-sign in the "end function."
  3. Dune2 had no restrictions. You could build a 10x10 wall. It looks ugly with too thich walls and destroys some of the balance for defences that I have planned. They have a system for this in the game "they are billions" but i dont know how they implemented it. Double-walls would be like (This is thickness 2, each X is a tile of walls): XXXXXXX XXXXXXX So you should be allowed to fill gaps if they looked like this: XXXOXXX XXXXXXX or: XXXOXXX But not build like this (which would be triple-thickness). The bold X:s are examples of gaps (if they were gaps) were walls would be disallowed to place (and the others would not be allowed to be placed like this either) XXXXXXX XXXXXXX XXXXXXX
  4. Is that python? But if I have a gap in the wall (five walls, one tile with no wall, five walls) that will prevent the player from refilling that gap in the wall since to the left and right it is now "five walls thick". Even though the wall is just one tile thick... Or when I build a line of wall tiles, the direction im building from will always have lots of wall tiles in the row: Building from left to right: wall wall wall (try to build another wall but already 3 wall tiles to the left).
  5. Hi! I'm making a tile-based strategy game. I need some way to prevent the player from building too thick walls. I might want to limit it to single or double thickness. I DON'T want the player to be able to just fill in any amount of tiles to make a super thick wall. Think Dune 2 or warcraft 1 or similar = each tile can house a "wall-building" which is 1x1 tiles big. Just making a simple rule like: "do not allow placing a wall if two/five adjacent tiles already is walls" doesnt work (for single/double thickness limitation). Any idea?
  6. It becomes formatted many times since I send it to a function that is sometimes the "end-function" (drawing to screen) and sometimes not (forwarding the string to another function). Maybe I should count the "extra parameters" (sent with the syntax "...") and only do formatting on the "char *" if there are any. Would that make sense? Now I always do the formatting regardless (i'm using va_list, va_start, va_end).
  7. Hi! Depending on how the char array is passed I need to add many many % signs to actually get an % in the final place it is used. For example here i need 16 (!) signs since every pass it converts half of them each time it is passed (i got lots of nested functions that use an char array). Any way around this? It's kind of annoying to need to figure out how many % is "the right amount" for any given situation. sprintf(tempText, "Risk of hostilities: %d %%%%%%%%%%%%%%%%", www.ambushRisk[mood][0]);
  8. Cool ideas! Im leaning towards a randomly generated grid of "city blocks" (on a square grid of tiles) such as apartments, scarse homes, park, police station, hospital on a rather well populated city map. You explore and unvail tiles and chooses which ones to investigate/loot from. This will reduce the scale of the gameworld and I will then probably skip driving around in vehicles entirely. Similar to how rebuild 3 works (but far less cluttered!) see pic below. So I could even use famous locations like manhattan for game worlds /scenarios. Some tiles could spawn portals that needs to be destoyed to stop spawning of enemies. Once a tile has been fully looted no more resources are found there (unless it's some special resource node). Expeditions (groups of 1-5 survivors) would walk in realtime and spend time in locations, but needs to get back to base to unload loot and refill food and ammo. Also nighttime should be more dangerous (orcs gets more active!) so better stay indoors then! The main colony would be a tile in the middle of the city, but other bases ("outposts") could be built in other tiles (to better access resource nodes or act as safe havens when exploring/looting as you suggest).
  9. Hi! Are you interested in making the characters for this game? It's almost done in terms of features but I still do alot of balancing and tweaks. You will have lots of design freedom, but the characters need to somehow convey their function (splitter, exploder, normal soldier, quick and weak runner etc) The units are all placeholder art for now and not animated. The view is pure topdown so all units can be rotated ingame, there is 6 monster types (zombies) and bandits, the player and (evil) marines! The engine is in 2d so the units can be either modelled and exported to spritesheets (i can deal with that) or handdrawn. See the pic below for a quick idea, or download and try the game from this thread! At minimum the character needs a walking animation and an attack animation (for melee characters). Death animation is not strictly needed. https://www.gamedev.net/forums/topic/696272-want-feedback-on-topdown-survivalaction-game/
  10. Plz download and try it! Hunger road is a single or local co-op (player 2 shares keyboard or uses controller) game about looting, shooting and travelling across an continent and escape with a space rocket! Zombies, bandits and the evil government will hunt you down and you need to always be looking for guns, ammo, fuel, food and medical supplies. If your ride breaks down you need to find a new one, all while your grandma encourages you over the radio. Now with nice bluegrass music and extra flamethrowers! - Too hard, too easy? - Any bugs? - Any suggestions for improvements? Download link (50 MB file, just unzip, no install needed. Requires directX)
  11. Scripting Designing interesting Quests

    The problem is there is usually so MANY quests that they get bland and feel like shores. Maybe try to make fewer, larger quests that can seem more unique or worthwile can work? I felt the witcher 3 side-quests got boring pretty fast as well. But im not normally to focused on story in games anyway.
  12. Scripting Designing interesting Quests

    I also agree that Micheals answer that text to a boring quest is still a boring quest. Autogenerated / trivial quests are typically hard to do anything about. It fills MMORPGs with some content, but people do them for the loot and xp as you said. No simple solution to this... In guild wars 2 you dont even talk to someone and (skip) the quest text. You just enter an area and "tasks" show up in your HUD and you start killing and collecting. Streamlines but doesnt really solve anything in my opinion.
  13. Hi! I got an idea for a game inspired by: Dead of winter (boardgame) Fallout shelter State of decay (the colony management part) Retro and modern X-COM (the colony management part) Day R Survival Rebuild 3 You run a colony of survivors. But instead of zombies or postapoc radition-freaks portals have opened and fantasy creatures invades the land; Orcs, trolls, skeletons, dragons etc. Because fun setting! There is some main mechanics: Manage the colony and build facilities like living quarters, infirmary, farm, crafting workshop, generators etc Manage scavaging expeditions ("supply runs") to get resources and new survivors Defend the colony against attacks Resources would be something like: Food and water Fuel (for generators, driving vehicles and some traps) Medicine (to heal wounded survivors) Ammo (to shoot. melee weapons doesnt require ammo. For some traps) Materials (to build facilities and traps) Tools (to repair stuff, weapons and equipment) Electronics (for hi-tech stuff like solar panels) Morale/hope. If too low the survivors will flee your colony into the wilderness. It's realtime. Time can be compressed or paused. You assign survivors to jobs like contruction, farming, crafting or send them on supply runs. Supply expeditions will find locations like "gas station" that has high chance of fuel and "drug store" that often has medicine. You can choose where to go and what to risk. Combat The monsters will periodically attack your colony, and may attack you when you are out on supply runs. This is simplified and also in realtime (paus to give orders). The overhead time/colony will pause during fights. Monsters get closer in lanes and your guys defend (front row with melee weapons, back with ranged weapons). Weapons have different efficiency in different ranges. If they ambushed you they start closer to you or start even right in your face. Skeletons are hard to shoot but weak against blunt weapons etc. Monsters have mostly melee weapons but can have bows, javelins etc. You can build barricades and traps in the lanes. The colony starts with one "entrance" but gets more as it grows in size. You need to split your defences as enemies can enter in all entrances at the same time. Questions: How to make the base building fun and vivid? Do you simply expand? (you are in some sort of wilderness or small town). Do you need to "gain more land" somehow? I liked in modern XCOM how you dig out new area for your buildings but that doesnt work here. Is scavanging done on an actual map or just abstracted (like in fallout shelter)? If real map, how do I not make the player run out of places to visit? What is the goal or end? Just survive against increasing attacks? Find the evil wizard, raid his stronghold and close the portals once and for all? Thanks! Erik
  14. It's called hge engine. I will not be able to replace it, to deeply nested in it with my projects:) Alot to take in, I will start with valgrind when I have the time. Thanks for all your help!
  15. It's a dll (the engine). Im not sure about debug build but I dont think so, it should be the release version of it, but it's no longer in development. I cannot reproduce the exception that's another problem. Typically it works fine, then suddenly the exception hits me... Not at all like when I mess up and make myself a null-pointer exception, then the problem is always retracable (and can be detected in the debugger as such since the variable actually IS null at the crash-point).
  • Advertisement