The Dark Ages (A game)

Post your own tutorials, guides and demos.

Post » Thu Oct 14, 2010 11:16 pm

Basicly, I've started making a game similar to Age of Empires. At first, it's going to be a lot like Age of Empires, but I'll individualize it once I finish setting up the basic game. This is only version 0.01, so obviously there's not much too it yet. Also, before anyone says it, I know the graphics are awful. I'm just starting a thread so that I'll be motivated to complete it.
All or most versions can be found here:
[url:20ps6rgo]http://www.box.net/shared/k1q0rpb89z[/url:20ps6rgo]
Most recent:
[url:20ps6rgo]http://www.box.net/shared/x2ynnfdcsh[/url:20ps6rgo]
B
2
G
2
Posts: 48
Reputation: 746

Post » Fri Oct 15, 2010 6:07 am

Age of Empires is a great game. It would be cool to play a similar game made in Construct. Anyways, good luck on your project and keep us updated!
B
3
G
3
Posts: 23
Reputation: 946

Post » Fri Oct 15, 2010 7:38 pm

Thanks! It may take a while, but as long as I stick with it I can finish it.
B
2
G
2
Posts: 48
Reputation: 746

Post » Fri Oct 15, 2010 7:49 pm

Hi there, I like the demo very much. :wink:

I wonder, if you(Or anyone else) could briefly explain to me,
how you made the Layout scroll, when the cursor is at the edge of the window?
I'm quite new to Construct, so I would greatly appreciate it.

I wish you good luck with the project.
B
4
G
2
Posts: 10
Reputation: 720

Post » Sat Oct 16, 2010 1:38 am

I can tell you how I made it scroll, though it's probably not the best way. Basically, I placed four sprites(invisible on start) in the shapes of rectangles around the edges of the screen on my second layer(note:this was the menu layer, the first layer was the game) and set its scroll x/y rates to 0. I also added another sprite(also invisible on start) and gave it the "Center view on me" attribute. The last object I added was the MouseKeyboard object. Finally, on the event sheet, I placed conditions so that when the mouse was over the sprite on the right side of the screen, the sprite(with the attribute) would move right, etc. If you need any clarification, feel free to ask. Also, I believe most of the steps are described in the Help forums. Though, I don't think the whole process is described there.

Edit: You'll probably have to limit the movement so that the sprite won't move farther than the screen can move. Something that's not included yet in my game. That's why occasionally it will seem that the sprite isn't moving even though it is, it just moved farther than the screen so it takes a while for it to get back.

Edit2: As opposed to using a sprite to center the screen on, you can use Scroll x/y, something I wasn't sure how to do at first. Anyway, on the event sheet, have when mouse over right sprite, System: set Scroll to X ScrollX + 10, etc. I'm still working on how to not use sprites on the sides.

Edit3: I worked it out :D . Here's the event sheet roughly:

C:System-Compare: MouseX > ScrollX + 200
A:System-Scroll to X: ScrollX + 10

C:System-Compare: MouseX < ScrollX - 200
A:System-Scroll to X: ScrollX - 10

C:System-Compare: MouseY > ScrollY + 200
A:System-Scroll to Y: ScrollY + 10

C:System-Compare: MouseY < ScrollY - 200
A:System-Scroll to Y: ScrollY - 10

The values 200 and 10 should change depending on the size of your application. Also, it probably only works for one layer.
B
2
G
2
Posts: 48
Reputation: 746

Post » Sat Oct 16, 2010 9:14 am

Ah, I see. Thank you very much for the detailed response. :D
Once again, I wish you good luck with the project.
I hope to see more of it in the near future.
B
4
G
2
Posts: 10
Reputation: 720

Post » Tue Oct 19, 2010 9:02 pm

For anyone interested in making the screen scroll based on mouse position, I made a python alternative.
[code:a4lnsttt]#Scrolling
scrollx = System.globalvar('scrollx')
scrolly = System.globalvar('scrolly')
scrollratex = 10
scrollratey = 10
if System.MouseX > scrollx + 305:
System.ScrollX(scrollx + scrollratex)
if System.MouseX < scrollx - 305:
System.ScrollX(scrollx - scrollratex)
if System.MouseY > scrolly + 125:
if System.MouseY < scrolly + 140:
System.ScrollY(scrolly + scrollratey)
if System.MouseY < scrolly - 230:
System.ScrollY(scrolly - scrollratey)[/code:a4lnsttt]
I'm using it in my game and it works fine so far with two layouts. The reason why I used global variables was because I was unable to find a way to get the scroll position in python. Anyway, I made my own grass background texture for the game! I'll upload the next version once I get a dragbox selection tool added.
B
2
G
2
Posts: 48
Reputation: 746

Post » Fri Oct 29, 2010 11:04 pm

Sorry for taking so long, but I've been a little busy. Anyway, new graphics, a drag selection tool, slightly improved path finding(will be much better), and different effects are the main changes. I know that deselecting a group of units doesn't work well, if at all, and that there are no actions for groups of units. I will try to fix those, make groups form formations, and improve the path finding in the next version. Version is available here:
[url:brbqpnsl]http://www.box.net/shared/x2ynnfdcsh[/url:brbqpnsl]
B
2
G
2
Posts: 48
Reputation: 746


Return to Your tutorials & example files

Who is online

Users browsing this forum: No registered users and 1 guest