Virus Sector (development thread)

Post your Construct-made creations!

Post » Sun May 16, 2010 8:57 am

It's the zombie apocalypse.

Yes, I know. It's been done a million times. But it's been done a million times as an arcade gorefest.
I have a vision for a zombie survival game, where survival is the main focus, not seeing who can shoot the most targets. I envision a large open world, a city sprawling with infected but also full of much needed supplies. The city is surrounded by smaller suburbs of houses and backyards, and a dense forest surrounds this, scattered with hidden shacks for hiding out in. There is a day and night system, with I am Legend style infected who are vulnerable to sunlight, making day the time to scavenge for supplies and night the time to barricade yourself in, or fight the zombie hordes. There are vehicles, many weapons, an RPG style leveling system, and co-operative split screen play. This is the world I have planned for Virus Sector.

*cue dramatic music*

OK, so some history. I was actually working on another zombie game a while back which I also had a development thread for. The project fell over, mainly because I was focused heavily on visual things like lighting and effects, and doing all those instead of creating a working game first. I have high hopes for this project, as it's neatly planned out this time and I'm going to try to get all the main gameplay elements done first, so I can see what I'm working with.

I made this development thread for 3 reasons:
1. To showcase the game I'm making
2. For my own motivation
3. To get help from the Construct community when I get stuck.

Now here's the cap: [url:1syghohe]http://dl.dropbox.com/u/7129504/Virus%20Sector.cap[/url:1syghohe] (updated with dropbox link, lets hope it works this time)

Controls:
Arrow keys: Move
Press TAB to cutaway the buildings, to see behind them
Press T to speed up time.

A screenshot:

It's still not totally as detailed as I want it to be. This is just a basic image to give you the idea of what it will look like.
B
3
S
1
G
3
Posts: 105
Reputation: 1,312

Post » Sun May 16, 2010 4:44 pm

Hi. The link to your .cap file is bad, so I could not see what you were doing for timekeeping.

However, it's fairly easy to pad a number out with zeroes to two digits. Here's an example that assumes you have a Text object for display, and use the Date object for the current time:

[code:2o3x8c7e]+ System: Every 1000 milliseconds
-> Text: Set text to Date.GetHour & " : " & Right("00" & str(Date.GetMinutes), 2)[/code:2o3x8c7e]

It simply converts the minutes to a string with str(Date.GetMinutes), concatenates that onto the string "00", then returns the rightmost two characters with the Right() function.

In this case, you'd probably just need "0" in place of the "00", but the two leading zeroes would be needed in case the minutes string ever returned an empty string, depending upon how you keep time.

If you don't know of it, there is a page on the Wiki with a list of helpful functions for use in expessions, such as the str() and Right() functions used above:

[url:2o3x8c7e]http://sourceforge.net/apps/mediawiki/construct/index.php?title=System_Expressions[/url:2o3x8c7e]
B
3
S
2
G
2
Posts: 187
Reputation: 1,449

Post » Sun May 16, 2010 9:32 pm

Ugh, that's the second time dropbox hasn't worked for me. I'll upload it with mediafire instead, check the first post again.
B
3
S
1
G
3
Posts: 105
Reputation: 1,312

Post » Sun May 16, 2010 11:10 pm

Ah, so if you replace the expression in your clock display event with the one below, it should work fine.

[code:3p2f39y4]global('Hour') & ":" & Right("00" & str(global('Minute')), 2) & " " & global('AMPM')[/code:3p2f39y4]

Anyway, Dropbox seems to work quite fine for me. Just in case you didn't know, make sure you put the file in your 'Public' folder within the Dropbox folder, and after it syncs, use the right-click context menu for Dropbox -> Copy public link, which copies it to the clipboard for pasting wherever.
B
3
S
2
G
2
Posts: 187
Reputation: 1,449

Post » Sun May 16, 2010 11:51 pm

Thanks, that works perfectly :)

I'm going out now, but when I get back I'll get started on some more game mechanics stuff. Next, I think I'll get started on weapons and items. Then I'll update the cap.
B
3
S
1
G
3
Posts: 105
Reputation: 1,312

Post » Mon May 17, 2010 9:10 am

Update!

I've completed the day and night effects, and done some more sprites. The effects look quite nice, and really add to the atmosphere. I've updated the .cap in the first post, and also updated the screenshot.

To see the effects more clearly, press T to speed up the timescale.
B
3
S
1
G
3
Posts: 105
Reputation: 1,312

Post » Mon May 17, 2010 10:54 am

Just a reminder: There already is a sytem expression for padding, called ZeroPad. Instead of
[code:3v2hg9o8]global('Hour') & ":" & Right("00" & str(global('Minute')), 2) & " " & global('AMPM')[/code:3v2hg9o8]

you can simplify by
[code:3v2hg9o8]global('Hour') & ":" & ZeroPad(global('Minute'), 2) & " " & global('AMPM')[/code:3v2hg9o8]
Image
B
23
S
8
G
10
Posts: 1,820
Reputation: 8,242

Post » Mon May 17, 2010 11:15 am

Thanks for the tip tulamide :) I've updated the code.
B
3
S
1
G
3
Posts: 105
Reputation: 1,312

Post » Tue May 18, 2010 5:55 am

Ok, no update today but I am stuck. I'm trying to create quite a complex calculation and I haven't the slightest idea how to put it into an event.

What I want is: To find the nearest "zombiebox" sprite which is overlapping "player1cone" sprite, AND is in line of sight of "player1box". When found, "player1" creates a sprite, "bullet", and bullet sets it's angle towards the sprite "zombiebox".

Any idea how to put this into a single event?
B
3
S
1
G
3
Posts: 105
Reputation: 1,312

Post » Tue May 18, 2010 6:40 pm

Just make an event like you described it.
B
79
S
24
G
54
Posts: 4,746
Reputation: 40,755

Next

Return to Your Creations

Who is online

Users browsing this forum: No registered users and 1 guest