Jump to content


Vilvake

Member Since 01 Jul 2011
Offline Last Active May 09 2012 11:11 PM

Topics I've Started

CastleCraft

08 May 2012 - 06:05 AM

Hey everyone, I'm new to gamemaker, and besides a couple of projects that climaxed at me getting a guy to move around the screen, this is my first real attempt at a game.

I enjoy the city-building genre, especially when the game has a medieval theme. When I searched for this type of game at the sandbox, I couldn't find anything that seemed to be somewhat high quality. Now this may be due to the fact that gamemaker suites action games better than more long term experiences, but it is my goal to make a game that people will enjoy playing. I posted the WIP on the sandbox but I haven't gotten any response, so I came here.

My game is called CastleCraft. It involves building structures that produce resources, upgrading them, and (hopefully) in the future using them to build an army to conquer other castles.

Right now, there isn't much to the game to play, but hopefully someone can give me feedback on how I'm doing so far.

Basic directions-

Click on the grass, and then click on a building icon to the left to construct it.

Building a woodcutters hut next to trees give you a production boost, the same being with quarry's next to rocks, and the shop near the castle. The cottage will boost the production of nearby woodcutters, quarry's, etc.

You can also click on a building to upgrade it. I don't yet have costs in-game, but buildings cost 200 wood to build, and 100 wood to upgrade, adding 100 more to the cost each level. The castle costs 500 wood to upgrade the first time, and if you get around to upgrading again, costs 1500 stone and 1000 wood. Right now there's no combat or recruiting soldiers, the resource costs aren't balanced, stone isn't very important and gold is useless (shops produce gold), but I hope someone can give me feedback on the game so far, and recommend features they think would be fun to play!

Link to download- http://sandbox.yoyog...om/games/198039

Posted Image

Menu position depending on location

14 April 2012 - 12:36 AM

In the game I'm making, you can click a building and a pop-up menu appears above it.

For my buildings at the top of the room, if you click them, half of their pop up menu goes outside the room and is unusable. How do I make it so that if the menu object is created partially or completely outside the room, it will be created below the building instead of above?

Problem upgrading buildings

13 April 2012 - 05:14 PM

Hi, I'm making a game where you can build a kingdom, and one of the features is resources collecting buildings. But I have a problem....


You can upgrade buildings. The way it works is if you click something, it saves the id of the building to the variable global.lastclicked, and a menu pops up where you can hit "upgrade". But If you have enough resources to upgrade something more than once, sometimes it will with a single click!
example- a woocutter is lvl 1 and I hit upgrade. Sometimes it will jump to lvl 3 or 4 immediately. I'm guessing this is probably an easy fix...

click event for obj_upgrade
if global.wood >= 100{
    with global.lastclicked{
        if lvl = 1{
            lvl += 1;
                global.wood -= 100;
    }
  }
}

if global.wood >= 200{
    with global.lastclicked{
        if lvl = 2{
            lvl += 1;
                global.wood -= 200;
    }
  }
}

if global.wood >= 300{
    with global.lastclicked{
        if lvl = 3{
            lvl += 1;
                global.wood -= 300;
    }
  }
}

Checking last clicked single instance

12 April 2012 - 07:05 AM

Hi, I'm making a game where you can build woodcutter huts that will collect wood. I also want to be able to upgrade the huts... so my problem is this-

When you click on a woodcutter hut, a pop-up menu comes up that allows you to press an upgrade button. But I can't figure out how to only upgrade the last woodcutter hut I clicked, and not some random one across the room (if that makes sense)

thanks for the help

Weird woodcutter's hut creation problem

11 April 2012 - 02:32 AM

Hey everyone, I'm new to gml and would like some help.

I am working on a game where you build a city. I have it so that you can create a building and it will snap to a 64x64 grid. But for some reason, I can't place my woodcutters hut above another building. I can place one below another building, in which sometimes produces the same effect, but for some reason it doesn't work the other way around. The weird part is everything works fine for my cottage and it uses the exact same mechanics and code. I have been messing around with this for an hour, and I can't get it to work. Can a more experienced member help me out?

Thanks!

I uploaded the gmk file to gamemaker- Please look at my code!
My game

Controls- Just left click where you want to build something and click the building on the menu. Right click to destroy a building.

edit- Going back and playing the game again, where I can and can't place the woodcutter is very erratic. Sometimes I can't place it even if there is no other building below. It's pretty random :/