Wednesday, 07 January 2009
 
  Home arrow Forum  
Main Menu
Home
News
Forum
Documentation
Download
Links
Administrator
Login Form
Welcome, Guest. Please login or register.
January 07, 2009, 05:12:17 PM
Username: Password:
Login with username, password and session length

Forgot your password?
Snowball battle game
DSLua Community
Welcome, Guest. Please login or register.
January 07, 2009, 05:12:17 PM
1724 Posts in 316 Topics by 10130 Members
Latest Member: Noupsdofsow
DSLua Community  |  DSLua - Best scripting language for Nintendo DS  |  Home-brew/Hacks/Games/Projects  |  Snowball battle game « previous next »
Pages: [1] 2
Author Topic: Snowball battle game  (Read 5388 times)
angor
Waxing Crescent
**
Posts: 55


WWW
« on: April 18, 2006, 10:32:46 AM »

Blog with this game development
http://snowballbattle.blogspot.com/

The idea:
2006/04/18 07:32
I am just starting to program a game in LUA for the DS. The intention is to program a simple but adictive game to learn how the system works and later try something more complex (like a RPG or similar...).  The concept i have in mind is something simple:
- 1 or 2 players playing in the same DS against several DS controlled NPCs
- distance fighting (snowball battle)

Update (2006/4/21)
Still in early alpha status, but first screenshot released

Update (2006/4/24)
Snow ball collisions detected and score updated accordingly

Update (2006/4/25)
First beta version released (v1.0)!  Limited funtionality but fully playable. Download it and have fun!

Update (2006/4/26)
Version 1.1 released. Two human players can now play in the same DS and the game speed can be controlled!

Update (2006/4/28)
Version 1.2 released. New background and basic sound. Players and npcs can now walk and throw balls in diagonal.

Update (2006/5/2)
Version 1.3 released. Now with music and cleverer npcs!

Update (2006/5/15)
Version 1.4 released. Finally the game starts getting a friendly commercial-like look!
- Great graphics update and text removal: splash screen, animated menus, results screen
- New game mode added: time limited match

Angor


* 20060428 snowball battle (v1.4).gif (154.12 KB, 524x818 - viewed 203 times.)
* 20060428 snowball battle v1.4 (beta).rar (189.13 KB - downloaded 2523 times.)
« Last Edit: May 14, 2006, 06:49:00 PM by angor » Logged
waruwaru
Administrator
Waxing Crescent
*****
Posts: 94


« Reply #1 on: April 18, 2006, 05:13:55 PM »

Hello Angor,

angor wrote:
Quote
a) how can i load a background image (no tiles)?


There is no convenient ways to do it in 0.4 without tiles.  DSLua currently doesn't have anyways to load a picture and use it as a background.

Quote

b) if i use tiles, how do i generate the .map file?
(i can convert a bmp to .pal and .raw, but no idea for the .map


As part of the DSLua's zip file, you should find a processMap.bat.  Which uses gfx2gba to convert a bitmap into a .pal, a .raw, and a .map file.  Give it a try.

Have fun!
Waruwaru
Logged
Zhen
Waxing Crescent
**
Posts: 57


WWW
« Reply #2 on: April 18, 2006, 09:14:32 PM »

angor wrote:
Quote
a) how can i load a background image (no tiles)?

I think that is a better idea to use tilemaps as background image. If you create the backgroung with tiles you can save a lot of space.
 
Quote
b) if i use tiles, how do i generate the .map file?


In the GBFS flavour distribution there is not processMap.bat file. If you didn't found it download the  CF flavour distribution.

Zhen
Logged
angor
Waxing Crescent
**
Posts: 55


WWW
« Reply #3 on: April 18, 2006, 09:53:25 PM »

Quote
a) how can i load a background image (no tiles)?
Zhen wrote:
I think that is a better idea to use tilemaps as background image. If you create the backgroung with tiles you can save a lot of space.


As far as i understand, the tiles concept was meant to save space as you mention. I thought the way to do it was:

1) To create a bitmap with the tiles (bricks, floors, etc..) to be used in the construction of the background image (similar to the map_examplescrn.bmp)

2) To create a map file to indicate how to place the tiles and create the background image (i.e. like the text map files they use in the SMM for PSP to build the map levels)

The problem here is that the .map in not generated by me, but automatically by gfx2gba.exe! So, how do i build the background image? Maybe i am wrong so i would appreciate any comment here...

Angor
Logged
Zhen
Waxing Crescent
**
Posts: 57


WWW
« Reply #4 on: April 19, 2006, 12:08:39 AM »

When gfx2gba.exe create the map+tiles using a bitmap, it can optimize the repeated tiles. So you can crate a bitmap with similar areas and gfx2gba will optimize it in a map+tiles output.

But you are right, it will be better to have a map editor.

Zhen
Logged
angor
Waxing Crescent
**
Posts: 55


WWW
« Reply #5 on: April 19, 2006, 02:05:39 AM »

So what you are saying is that gfx2gba.exe chops the background in tiles the size you specify in the command line and then, tries to find the tile repetitions? Then it makes sense (though i also would like to have a map editor...

Angor
Logged
waruwaru
Administrator
Waxing Crescent
*****
Posts: 94


« Reply #6 on: April 19, 2006, 04:04:12 AM »

angor wrote:
Quote
So what you are saying is that gfx2gba.exe chops the background in tiles the size you specify in the command line and then, tries to find the tile repetitions?


Yep, you got it.  gba2gfx is pretty good at finding all the repetitive blocks (even the one that is flipped horizontally/vertically).  You can always use something like Mappy to create your map, and it can export the map as a BMP when you are done.  In later versions, I plan to support some kind of map format directly so you don't have to do the convert. Smiley

Waruwaru
Logged
waruwaru
Administrator
Waxing Crescent
*****
Posts: 94


« Reply #7 on: April 19, 2006, 06:40:08 AM »

Zhen wrote:
Quote

In the GBFS flavour distribution there is not processMap.bat file. If you didn't found it download the  CF flavour distribution.


Oops, sorry about that, here are the missing files.  Just put them in the same directory as PACK.BAT

processGfx.bat
Code:

bingfx2gba -p%1.pal -t8 %1


processMap.bat
Code:

bingfx2gba -m -p %1.pal -t8 %1


Post edited by: waruwaru, at: 2006/04/19 03:40
Logged
angor
Waxing Crescent
**
Posts: 55


WWW
« Reply #8 on: April 19, 2006, 09:14:32 PM »

Thanks for the Mappy tool link. That is just the tool i needed Smiley

By the way, do you know any good place of free nice tilesets to use in the game?
Logged
Öhr GmbH
Waxing Crescent
**
Posts: 64


« Reply #9 on: April 27, 2006, 12:45:11 PM »

wow! awesome! never thought that this is possible in dslua yet Shocked

tipp:
put the graphics and so on in an extra folder like /content like i did. its easier to see wheres what Smiley
Logged
angor
Waxing Crescent
**
Posts: 55


WWW
« Reply #10 on: April 27, 2006, 02:43:56 PM »

Gute Idea, Öhr GmbH! Danke!

I will put the files in separate folders since is becoming annoying to look for the .lua script everytime
And if you liked the game, get ready for the new version i am testing! Smiley

Angel
Logged
Öhr GmbH
Waxing Crescent
**
Posts: 64


« Reply #11 on: April 28, 2006, 05:32:51 PM »

kannst wohl auch deutsch oder biste einer? Roll Eyes

if you want a new script(or musicfile/image) with your first loaded script in an extra folder, do this:
Code:
dofile("thatsafolder/luascript1.lua")
if you want to load a other script(or musicfile/image) after you loaded the script in the folder, you have to add the "folder/"if its in the same folder again.
lua uses always the position of the first loaded script, so...
uhh and i think special letters like þ╝Ä•ô and so on doesnt work, unfortunately...
Logged
angor
Waxing Crescent
**
Posts: 55


WWW
« Reply #12 on: May 01, 2006, 03:42:49 PM »

Ich bin nich Deutsch aber ich can ein bishen Deusch sprechen! Smiley

Thanks for the information about the "dofile" command. I was missing an "include" type of command since the snowball game code is growing lately and it would be nice to split it in smaller chuncks

Angor
Logged
waruwaru
Administrator
Waxing Crescent
*****
Posts: 94


« Reply #13 on: May 01, 2006, 04:24:36 PM »

Ich bin nich Deutsch aber ich can ein bishen Deusch sprechen! Smiley

Thanks for the information about the "dofile" command. I was missing an "include" type of command since the snowball game code is growing lately and it would be nice to split it in smaller chuncks

Angor

You might want to take a look at require as well.

Waruwaru
Logged
angor
Waxing Crescent
**
Posts: 55


WWW
« Reply #14 on: May 02, 2006, 03:16:55 AM »

I take note of the "require" command. Thanks Smiley
Logged
Pages: [1] 2
« previous next »
    Jump to:  



    (C) 2009 DSLua

    DSLua - Best scripting language for Nintendo DS home-brew!