LoveWars prototype/demo

Show off your games, demos and other (playable) creations.
User avatar
bartoleo
Party member
Posts: 118
Joined: Wed Jul 14, 2010 10:57 am
Location: Savigliano

LoveWars prototype/demo

Post by bartoleo »

I'm working on a Strategic Turn-based Game like Advance Wars
I'm using a project structure similar to fistfulofbeef (thank you LÖVE-Party Copyright (c) 2010)

Map is random
You can drag the map (left button), zoom (mouse wheel) and select cells
I'm looking for a tileset (now I use the one used in the tileset example)
My goal is:
implementing loading maps from file (I looked Tiled ... but... format file is not so 'easy')
implementing battles with 2 human players (initially on same pc, next via network)
implementing AI cpu for human vs CPU ... for this I think i could use Lua ;)

feel free to say anything... feel free to contribute... no problem
lovewars.JPG
lovewars.JPG (100.36 KiB) Viewed 5933 times
Bitbucket project:
https://bitbucket.org/bartoleo/lovewars/overview

actual download
https://bitbucket.org/bartoleo/lovewars ... ewars.love (actually broken, for some reason my files uploaded are not visible... or bitbucket not accepting .love extension... why?)
https://bitbucket.org/bartoleo/lovewars ... s.love.zip rename it to lovewars.love (broken too... now doesn't accepts zip...)

lovewars.love attachement updated 20 oct 2010
Attachments
lovewars.love
(148.81 KiB) Downloaded 314 times
Last edited by bartoleo on Tue Oct 26, 2010 8:52 am, edited 13 times in total.
Bartoleo
User avatar
TechnoCat
Inner party member
Posts: 1611
Joined: Thu Jul 30, 2009 12:31 am
Location: Denver, CO
Contact:

Re: LoveWars prototype/demo

Post by TechnoCat »

I love Days of Ruin for DS. Looking forward to seeing the completion of this.
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: LoveWars prototype/demo

Post by bartbes »

Cool, I'm looking forward to an Advance Wars inspired game!
spirulence
Prole
Posts: 8
Joined: Tue Sep 21, 2010 8:27 pm

Re: LoveWars prototype/demo

Post by spirulence »

(shameless plug)

If you're looking for some place to start from when loading maps and tilesets, you can use some code that I devised for this purpose for a 2D platformer I'm making.

The level files live in a directory called "levels" and have an extension of ".level". Use level.lua to load them. They are objects: call "level.load" to create one and ":draw()" on the returned object to draw it to the screen.
The level files look like this:

Code: Select all

local _ = 0
local level = {
	{_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _,},
	{_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _,},
	{_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _,},
	{_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _,},
	{_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, 1, 1, 1, 1,},
	{_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _,},
	{_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, 1, 1, 1, _, _, _, _,},
	{_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _,},
	{_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _,},
	{_, _, _, _, _, _, _, _, _, _, _, _, _, _, 1, 1, 1, 1, _, _, _, _, _, _,},
	{_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _,},
	{_, _, _, _, _, _, _, _, _, _, _, 1, 1, 1, _, _, _, _, _, _, _, _, _, _,},
	{_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _,},
	{_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _,},
	{_, _, _, _, _, _, _, _, _, _, _, _, 2, 1, 1, 3, _, _, _, _, _, _, _, _,},
	{_, _, _, _, _, _, _, _, _, _, _, 2, 1, 1, 1, 1, _, _, _, _, _, _, _, _,},
	{_, _, _, _, _, 1, _, _, _, _, 2, 1, 1, 1, 1, 1, 1, _, _, _, _, _, _, _,},
	{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,},
}

level.tileset = "basic1"

return level
Tilesets are made up of a tileset file and an image, specified in the tileset file. I put them in a directory named "tilesets" and always give them the extension ".tileset" to set them apart. The tileset is loaded automatically with the level, using loadtileset.lua.
The tileset files look like this:

Code: Select all

local tileset = {
	size = 50,
	margin = 2,
	image = loadImage("tilesets/basic1.png"),
}

return tileset
I've written a little more about the approach at my blog: http://spirulence.tumblr.com/post/11706 ... and-levels http://spirulence.tumblr.com/post/11706 ... 1-in-depth


Hope some of this is useful!
Attachments
level.lua
Code for loading levels.
(1.65 KiB) Downloaded 204 times
loadtileset.lua
Code for loading tilesets.
(1.29 KiB) Downloaded 214 times
aliases.lua
Dependency for level.lua and loadtileset.lua
(215 Bytes) Downloaded 201 times
User avatar
bartoleo
Party member
Posts: 118
Joined: Wed Jul 14, 2010 10:57 am
Location: Savigliano

Re: LoveWars prototype/demo

Post by bartoleo »

thank you for info & code
what I'm missing now is a AdvanceWars (or similar) tileset
Bartoleo
User avatar
nevon
Commander of the Circuloids
Posts: 938
Joined: Thu Feb 14, 2008 8:25 pm
Location: Stockholm, Sweden
Contact:

Re: LoveWars prototype/demo

Post by nevon »

Get hold of a good artist and tell them to get to work. Or create a shitty tileset yourself and make it easy to replace the tiles if you manage to find an artist later on.
fwoop
Prole
Posts: 4
Joined: Fri Jun 25, 2010 3:59 pm

Re: LoveWars prototype/demo

Post by fwoop »

spirulence, if you use lua's double square bracket notation for strings, then you can get a nicer looking way to represent your levels:

Code: Select all

local level = [[
........................
........................
........................
........................
....................1111
........................
.................111....
........................
........................
..............1111......
........................
...........111..........
........................
........................
............2113........
...........21111........
.....1....2111111.......
111111111111111111111111
]]
Of course then there's some string parsing involved, but once that part is coded the rest is nicer imo.
User avatar
Simtex
Prole
Posts: 39
Joined: Sun Dec 14, 2008 5:31 am

Re: LoveWars prototype/demo

Post by Simtex »

nevon wrote:Get hold of a good artist and tell them to get to work.
This. Artists have low self esteem due to attending art schools and always having their parents tell them to get a real job. Use this to your advantage to create a dependent relationship where they fulfill your every whim. Remember, BDSM is a type of love too.

This had been your independent game development tip for the week.
User avatar
arquivista
No longer with us
Posts: 266
Joined: Tue Jul 06, 2010 8:39 am
Location: Insert Geolocation tag here
Contact:

Re: LoveWars prototype/demo

Post by arquivista »

fwoop wrote:spirulence, if you use lua's double square bracket notation for strings, then you can get a nicer looking way to represent your levels:

Code: Select all

local level = [[
........................
........................
........................
........................
....................1111
........................
.................111....
........................
........................
..............1111......
........................
...........111..........
........................
........................
............2113........
...........21111........
.....1....2111111.......
111111111111111111111111
]]
Of course then there's some string parsing involved, but once that part is coded the rest is nicer imo.
Hmm... Thanxs for this tip. I could use it too in the Roguelike project (http://love2d.org/forums/viewtopic.php?f=5&t=1942)
--------------------------------------------------------
To Do: Insert Signature Here
--------------------------------------------------------
spirulence
Prole
Posts: 8
Joined: Tue Sep 21, 2010 8:27 pm

Re: LoveWars prototype/demo

Post by spirulence »

fwoop wrote:spirulence, if you use lua's double square bracket notation for strings, then you can get a nicer looking way to represent your levels:

Code: Select all

local level = [[
........................
........................
........................
........................
....................1111
........................
.................111....
........................
........................
..............1111......
........................
...........111..........
........................
........................
............2113........
...........21111........
.....1....2111111.......
111111111111111111111111
]]
Of course then there's some string parsing involved, but once that part is coded the rest is nicer imo.
Interesting. I hadn't thought of doing that. I just implemented it and I have to agree, the levels are now far easier to edit by hand. The only potential pitfall is that it's now harder to have more than 36 tiles in a tileset. I hope that won't be a problem in the project I'm using it for.
Post Reply

Who is online

Users browsing this forum: No registered users and 10 guests