Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 30 Nov 2012
Offline Last Active Today, 08:45 AM

Topics I've Started

Am I overengineering

29 December 2014 - 05:23 AM

I am just starting working on a RPG. (Well actually, I have been working on it for 6 months, but I had to restart some time ago, using different technology). Anyway, I had just finished building a system to give monsters turns depending on there speed and that type of stuff, when I wanted to start working on the combat system. But for the combat system, I think I will need a HUD first, so I can debug the players HP and level and stuff, and I would need a HUD later anyway, so I thought I would do it right away. I wanted a message system similar to old games like nethack that you could read back from to see what happed in the past, and I thought I might need other off screen elements like inventory or a detailed examine/encyclopedia window later. I didn't want this to get all to complicated, so I decided to split the screen in 4 sections, that I call windows, one big one to show the screen, one for stats, one for log lines, and one for inventory. The problem was that all drawing and main stuff was handled by one class called "Isometric_Rendered", that also called the level generators "Generate Level", stored the level, kept track of all objects in the world (different from level in this case), passed all events on to the player object, managed when AI got turns, drew the debug log while loading to show progress of level generator, and a whole lot more stuff. Taking out the render world code and placing it in a "Window"class would be easy enough, but the renderer, of course, needs access to the level data. So I Thought I would build a world object that took out this part of the main classes responsibilities. But then, would every level have its own world object, or would there be one global world object, or should I just assume there is only one level as long as there is only one level, and worry about that part later when I actually have multiple levels?


So does anyone have any comments on the way I am doing this?


(I realize that this is a horrible run on paragraph rant, but if you don't like the post but have nothing to say about my problem, I would rather that you PM me then that you post about that, I know some people on this form who like to go around posts and complain about peoples grammar, but could those people just PM)

Ask if there is anything I can clarify.

The art is temporary, until by artist has time

Slow performance on A*

15 October 2014 - 02:55 AM

For my level generator, I need to connect my rooms with passageways. I don't want pasageways to run straight thew other rooms, or crash straight allong walls, turning a whole row into doors, wich looks ugly, so I decided to use a more complicated algorithm to find the path for the paths:

        weightsgrid=Grid([self.rowsize, len(self.data)/self.rowsize],-1)
        while weightsgrid[pointb]==-1 and tries<100:
            for coords in weightsgrid:
                if weightsgrid[coords]>=-1:
                    if weightsgrid[coords]!=-1:
                    for adj in getadjacent(coords):
                            if weightsgrid[adj]>0:
                                #print "Did SOmething"
                        except IndexError:
                            #Can forget about this error since we don't care about values outside the grid
                    if len(posible)>0:
        if not function:
        while walkposition!=tuple(pointa) and tries<len(self.data):
                             key=lambda x: weightsgrid[x] if weightsgrid[x]!=-1 else 8388608)
            except IndexError:
                print walkposition
            #print tries
        return l

note that the class that generates subclasses grid, so self is also a grid object. The function works mostly well, but takes 2 or 3 seconds to run (least is 0.1 second, most is 5 seconds) and since I need to run it 19-38 times each time I generate a level, it becomes kinda unacceptable. Since I am doing this to learn, in the future I might need to use a similar system to for enemy movement, so I want to know what I am doing wrong.
Just in case you need it, this is the rest of my generator function:

        print "0}GENERATING ROOMS"
        for i in range(numrooms):
            while not ok:
                for room2 in rooms:
                    if ((room[0]<room2[0]+room2[2]+3) and #room.right>room2.x and room.x<room2.right
                        (room2[0]<room[0]+room[2]+3) and
                        (room[1]<room2[1]+room2[3]+3) and
                        #print room,room2
                if not ok:
                    #print "tries: ",tries
                if tries>1000:
                    print "failed after",tries,"tries"
            if tries<=1000:
        print "Len(rooms)=",len(rooms)           
            #print [x,y,width,height,floormats]
        print "0}Bordering rooms!"
        for room in rooms:
            for i in range(room[0],room[0]+room[2]+2):
                for j in range(room[1],room[1]+room[3]+2):
                    while not ok:
                        if (i==room[0] or i==room[0]+room[2]+1 or #x position
                            j==room[1] or j==room[1]+room[3]+1):
        print "0}Connecting rooms!"
        for room1 in rooms:
            room2s=[random.choice(rooms) for i in range(timesperroom)]
            for room2 in room2s:
                if room1!=room2:
                    print "Running a*! ({0:0>2}/{1:>2}) time: {2}".format(timestried,totaltimes,datetime.datetime.now()-lasttime)

edit: I see people don't get my problem, so I am going to post a few screen shots to show what I mean:

Attached File  gamedev1.png   74.75KB   0 downloads

these are my rooms, but I need to connect them. So I run A* and I get:

Attached File  gamedev2.png   73.96KB   0 downloads

this is great, except that it takes 5 minutes to run!

Level Design in Visual Stuido 2013 & XNA

21 May 2014 - 10:07 PM

So, I am working on a RPG, and I need a level editor. I first wanted to make it a separate program, with the game consisting of a engine, the game, and a level editor. The advantage of that was you could reuse the engine and the level editor to make more games. The problem is that the level editor should be able to import its own graphics without opening Visual Studio, but there doesn't seem to be a way to load external images. Yesterday I go the idea that instead of a separate program, the level editor could be a visual studio extension. The problem with that is I would need to update it many times while I already started using it, and I don't know if that would work.

This seems like a common problem, how do you do your level editing?

My sci-fi RPG game design

17 May 2014 - 08:21 AM

(sorry about the misspelling in the title) MOD EDIT: fixed the title spelling, I think :)

Hello people, its almost my summer holiday, and in my holidays I usually work on big projects. I have a idea for a RPG that I am going to make and I want to know what you think. I might not finish it, so don't be disappointed if i end up with half the features that I listed here.


So the basics are like a normal RPG. You have many skills, you can train in them, and you can go on quests.


The first thing that is unique is that you don't know what skills exist until you have trained in them. That way, there can be a large amout of skills without every player needing to train fully in every one of them. The skills will be grouped into categories, and you get prizes for having level something at every skill in a category. Skills can be part of more then one category. You also have a level in each category witch is usually your highest level of the subskills, but in some, a custom formula is applied. entire categories can also be in other categories, and if that is the case, the category is called the skill, and the others are "Subskills" that are not in your normal skill list, but by clicking on the parent skill. For example, if mining metals and mining gems uses a different technique, then they would be separate subskills of mining, but for most purposes, you only care about your skill in mining.  Here are a few ideas for skills:

Mining & Smiting: same as in other RPGs

Electronics: build devices

Piloting: Riding vehicles, has many sub skills. Because driving spaceships is hard

Farming: this will probably be a one-place skill, and you need to return to this again to harvest your crops

Nanotechnology: allows you to build nanobots in labs

Combat: Divided into defense, strength and accuracy,  covered later on

Knowledge: this will be the most important skill, it increases whatever you do and is needed for most quests

A skill about making cloth

Thieving: pickpocketing, lock-picking, and other related gunk




(any more ideas, people?)


combat will be turn based. probably for melee style weapons walking into your enemy will do attacking, for ranged it will probably be WASD if arrow keys are for moving.

Weapons will deal a certain damage type (they can also deal more then one) and armor will be more protective against certain damage types (eg. Iron armor will be weak against electric, but strong against laser). There will be no real distinction between melee and ranged except for the range

here are a few ideas for weapons:

Normal: swords, arrows, clubs, classic weapons, don't do much damage against more modern armor

Electric: metal swords and arrows can be statically charged so they do more damage, though they need plastic handles to be used in this way, there are also devices that zap large amount of electricity to a enemy, but do no normal damage

Laser: laser guns for ranged, and maybe a type of light saber for melee

Heat: if a item is really hot it can do small amounts of heat damage. Plasma weapons deal large amounts

Radioactive: This is also a "extra" to weapons that mainly deal normal damage. it has a delayed effect.

Bioweapon/Nanobot sending microscopic stuff into your opponents body. this damage is not done much in combat, but "needle darts" can do it, gas bombs can sometimes deal this type of damage

Gas: send a poison gas at your enemy, for defense, it only effects the helmet/mask, Also used in traps

note that for electric, gas, heat and radioactive, the user needs to protect himself against it also, especially for radioactive, this is a big down side for using it, since you need to wear full anti-radioactivity armor.

combat won't be as important as it is in some RPGs, you can stay out of combat a lot of time if you want to. Dieing will return you to your latest checkpoint, or at a save point.


The game will be isometric 3d, like my last game (see my signature), but this time I will use XNA instead of python. Tell me if I have forgotten some important information. I need to finish my final design by next week, so please reply fast.

Best physics and game engine

09 January 2014 - 05:54 AM

I don't know much about how this is done, so if I am asking a stupid question, just redirect me to the answer.


In C#, I recently hacked my way into displaying graphics on the screen. It was a bit slow, especially the collision checking. I wondered if there was a better way of doing using a game engine of some sort. Now I have a idea for a game that needs physics (I probably am not going to make it, but just in case) Can someone redirect me to a place that has information about this stuff, like a nice table that lists each of there features or something?