Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - cbass

Pages: 1 2 3 [4] 5 6 7
Help/FAQ / Re: Inventory items and such.
« on: 2006-01-25, 06:53:48 PM »
Maybe you had "disable player edits in map editor" unchecked in the options dialog, and got the inventory when editing a map and then saved the project afterward unknowingly.  Not sure if not cheching that option would do that since I've never unchecked it before.

Help/FAQ / Re: good map editor required
« on: 2006-01-23, 10:25:12 PM »
for some reason, it wont let me edit my post above.

Anyways, im relinking posting the script since I have fixed a few bugs.  I tried to add a few more features (Axis lock and tile snap) but it seems to be impossible to do from script since the darn engine always overwrites any changes to the mouse position every frame.  I guess we've lived without these features for this long and noone's seemed to complain, I guess we can live without em some more.

I thought of some other stuff like hotkey tile or tilematch selecting but that stuff can wait  8)

Help/FAQ / Re: good map editor required
« on: 2006-01-23, 06:51:07 PM »
I decided to make the run-time script we have been talking about.  just copy to your folder gamedev.exe is in ("c:\program files\gamedev")

From there, it will work for any project.  Each time you load the map editor, the script will connect and display the message for its commands:

C - copy (also cancels copy and returns to tile placement, to the last tile you were using I might add, which is awesome :) )
T - Bring up menu and tile list (works just like right click now except that you dont have to hold down right click)  you still have to use right click to select
S - Enables and disables scroll lock for the mouse
D - Deactivates and reactivates the script (clears message, disables all commands except D to reactive the script and disables scroll lock if activated.)

I haven't tried to make the script error out yet, but I plan on using it myself now as it does add some conviences to the map editor, so I should hopefully find any errors in it.

News and Announcements / Re: SGDK 2.0 Status
« on: 2006-01-22, 11:18:58 PM »
Good point.

I agree with getting a complete working version up and running as soon as possible.  One thing I hope you do, however, is have a long running beta, call it a beta so you don't always have to worry about backwords compatibility (keeping old projects working on the new version)   when adding features and changing stuff.  (i imagine this could be a time consuming  problem, but maybe you have a simple way of doing it)

I'd hate to get stuck with something that everyone agrees is less than what it can be, but noone wants to change since they don't want to go through the hassle of manually updating their current project.

Help/FAQ / Re: good map editor required
« on: 2006-01-22, 10:31:14 PM »
lol, bluemonk put it better than me, but I think you get the point.

I never thought of linking to a project through COM, and importing all the data directly, and resaveing.  This is probably BY FAR the easist method.

Help/FAQ / Re: good map editor required
« on: 2006-01-22, 10:26:47 PM »
Some specs on the map file format would be really appreciated so I can write a conversion utility...

The things I find difficult about the built-in map editor are listed below.  These aren't criticisms but simply things that don't fit my personal preferences:

1. The only major problem I have is not having both the map and the tiles on the same screen.  It makes map-making very tiresome.

2. A small problem that could be solved easily is having to right-click and then choose the "copy" facility.  A keyboard shortcut for this would be a huge improvement.

3. I would prefer it if the map didn't scroll when I move the mouse to the screen edge.  I don't know about anyone else but I'd much rather use the keyboard for scrolling (which I know you can do but you can't de-activate mouse scrolling).

I might just have to get  used to the map editor, SGDK is great in every other way and there's not really much competition...

A conversion utility would be possible, but probably not worth the effort.  If you are really interested, SGDK is open source so you could probably just look at the .Save method of the Map class module (Map.mod)  You don't even need VB 6 to do this as I believe .mod files are text based.

If all you're worried about is tile placement, all that is is a 2d byte array for every layer.   you could possibly use a different utility to place tiles (make sure 2d grid is same size as layer)  and if they are in the correct format, you could paste them into an xml file where the tile byte array is.  If they aren't in correct format, a utility to reformat the array might be easier to make than a whole file conversion.  This would take some pretty serious testing, but its worth a try.

Also, with a design time script, I think you could do 2 and 3 pretty easy, but 1 would be somewhat difficult and would probably be beyond the power of a design time script.  I'd try to make the design time script for you, but I'm making leaps and bounds of progress on a game and don't want to lose momentum.

here is an example design time script: (edited from bluemonk's original creation distributed with SGDK)
Code: [Select]
' This is a generic map editing template script
' It connects to the map editor whenever it comes up.
' To customize the script to your own purpose, edit
' the second section (script number 1) in this file.

' ======== INITIAL STARTUP SCRIPT (Number 0) =========
Sub Project_OnEditMap(M)
   Set HostObj.TempStorage = M
End Sub

HostObj.SinkObjectEvents ProjectObj, "Project"


#Split == MAP EDITING SCRIPT (Number 1) ============

Dim Rndm,totalclearcount
Dim MpEd
Set MpEd = HostObj.TempStorage
HostObj.TempStorage = Empty

Sub MapEd_OnEditInit()
   MpEd.DisplayMessage = "Map editing script connected, use" & vbCrLf & vbCrLf & "F-frame," & vbCrLf & "A-All" & vbCrLf & _
     "C- Clear = " & vbCrLf & "4-left" & vbCrLf & "6-right" & vbCrLf & "8-up" & vbCrLf & "2-down"
End Sub

Sub MapEd_OnKeyPress(KeyAscii)
   Dim TileWid, TileHgt
   Dim Tmr, TmOut
   'Dim Lyr0Dat, Lyr1Dat, Lyr2Dat,clear,totalclear
   dim LyrDat, LyrBelowDat
   Dim IntTemp
   dim YStart, YEnd, XStart, XEnd, PerformScan, SolidityChange
   'On Error Resume Next

   'MpEd.disp.drawtext keyascii & " " & mped.editmode,20,20

   If MpEd.EditMode >=9 Then Exit Sub

   HostObj.ScriptTimeOutSeconds = TmOut + .5

   TileHgt = MpEd.theMap.MapLayer(0).TSDef.TileHeight
   TileWid = MpEd.theMap.MapLayer(0).TSDef.TileWidth
   'Set Lyr0Dat = MpEd.theMap.MapLayer(0).Data
   'Set Lyr1Dat = MpEd.theMap.MapLayer(1).Data
   'Set Lyr2Dat = MpEd.theMap.MapLayer(2).Data
   set LyrDat = MpEd.theMap.MapLayer(MpEd.EditLayer).Data
   If KeyAscii = Asc("f") Then 'frame only
     YStart = Int(MpEd.YOff / TileHgt)
     YEnd = Int((MpEd.YOff+MpEd.theMap.ViewHeight) / TileHgt)- 1
     XStart = Int(MpEd.XOff / TileWid)
     XEnd = Int((MpEd.XOff+MpEd.theMap.ViewWidth) / TileWid)- 1
     PerformScan = true
clear =false
   'elseif keyascii = Asc("a") then 'all of layer
   '  YStart = 0
   '  YEnd = MpEd.theMap.MapLayer(0).Rows-2 '54
   '  Xstart = 0
   '  Xend = MpEd.theMap.MapLayer(0).Columns-1
   '  PerformScan = true
   ' clear =false
   elseIf KeyAscii = Asc("c") Then 'clear
     YStart = Int(MpEd.YOff / TileHgt)
     YEnd = Int((MpEd.YOff+MpEd.theMap.ViewHeight) / TileHgt)- 1
     XStart = Int(MpEd.XOff / TileWid)
     XEnd = Int((MpEd.XOff+MpEd.theMap.ViewWidth) / TileWid)- 1
     PerformScan = true
     clear = true
   elseif keyascii = asc("6") then
     if MpEd.XOff+640<(MpEd.theMap.MapLayer(0).Columns-21)*32 then
     end if
   elseif keyascii = asc("4") then
     if MpEd.XOff-640>0 then
     end if
   elseif keyascii = asc("2") then
     if MpEd.YOff+480<(MpEd.theMap.MapLayer(0).Rows-16)*32 then
     end if
   elseif keyascii = asc("8") then
     if MpEd.YOff-480>0 then
     end if
     PerformScan = false
   end if
   if PerformScan = true then
     if clear=true then
       For Y=ystart to yend
         For X = xstart to xend
           select case lyrdat.tilevalue(x,y)
             case 25,222
           end select
       For Y=ystart to yend
         For X = xstart to xend

              Select Case LyrDat.TileValue(X,Y)
                Case 208,209,210,211,216,217,218,219 'draw cave faces from sides
                  select case lyrdat.tilevalue(x,y+1)
                    case 201, 220, 221, 228, 229,208,209,210,195,198,206,192,193,194
                    case else
                  end select
                case 1
                  select case left(MpEd.theMap.Name,3)
                    'case "Cav"
                    '  lyrdat.tilevalue(x,y)=222
                    'case "Twn"
                    '  lyrdat.tilevalue(x,y)=25
                    case "Cst"
                  end select
                case 0 'draw ground on blank tiles
                  select case left(MpEd.theMap.Name,3)
                    case "Cav"
                    case "Twn"
                    case "Cst"
                  end select
                Case Else
              End Select
              'If Err.Number <>0 Then Exit For
             'If Err.Number <>0 Then Exit For
     end if
     'If Err.Number <> 0 Then MpEd.DisplayMessage = Err.Description
   End If
'        Tmr = Timer
'     If Err.Number <> 0 Then MpEd.DisplayMessage = Err.Description
'     If Timer-Tmr > TmOut Then MpEd.DisplayMessage = "Script Timeout at tile " & X & "," & Y
'     HostObj.ScriptTimeOutSeconds = 2
'     End If
End Sub

Sub MapEd_OnEditComplete()
End Sub

HostObj.SinkObjectEvents HostObj.AsObject(MpEd), "MapEd"

To link it, make a shortcut for the command insert this into the "Target" of the shortcuts properties:
"C:\Program Files\GameDev\gamedev.exe" "[.gdp full path]" /e "[script.vbs full path]"
(note im using the default gamdev.exe path, change as necessary)

Projects / Re: Screen Shot Topic...
« on: 2006-01-22, 08:00:33 PM »
Hey Orion,

If you would, could you link to some of your preferred tutorials and communities.  I used to visit one which seems to of disappeared, "pixilation".  and the only tutorial I have read seems to have too, but was written by this "tsugumo" guy, which I think was an excellent tutorial.  Most of my art I would still consider "Programmer art" but at least its good programmer art   ;)

News and Announcements / Re: SGDK 2.0 Status
« on: 2006-01-22, 07:58:44 PM »

Orion, yes I did forget about that while writing that post.  I have used it quite a bit.  One problem I ran into with it though is when I want to delete the sprite and activate and EOP function it won't quite behave how I wanted, my EOP function activates a series, one of which is a "delete sprite" but deletes the last one made not the one that is at the end of its path. (any way around this, i cant think of one).  Also, I wish the was a OSR_[SpriteName] (On sprite remove) which activates a functions of that name just before a sprite is removed no matter what the reason for the removal.  I think i mentioned this in another post, and this is the SGDK2 thread so Ill quit talking about it  :-X ;)

]Every sprite instance that can exist must be defined at design time.  You can't create an unlimited number of a certain type of sprite.  (However, you will be able to "Activate next inactive sprite in category" to achieve a similar effect)

Right now I am working on a game that has 1 "Initial instance" spite, the player.  All other sprites are created by tile interactions and special functions, and those with paths are always "follow path relative to starting point".   This is mainly to make sprite creation as easy as tile placement (looks like your doing this "out of the box" in SGDK 2.  Would be nice to have an options for when to activate sprites: "When playersprite comes within 500 pixels", "At beginning of Map", "When player collides with sprite", "On Rule ACT_[SpriteDef]*"

Anyways, I can see how dynamic sprites would still be possible with the system you described in the quote above, but will we still have as much freedom with dynamic sprites?  Can we still change properties of sprites or definitions at run-time via "Script" or otherwise? (I like to change anything and everything at run-time, Especially graphics)

And on Paths.  I have an idea just come to me, take it or leave it.  Since you will have path points, special functions, Sprite Instance starting points, and now areas.  Maybe to make map creation easier you should just allow the creation of "Points" in the Map GUI.  They would have names, and an X and Y and be indexed by the layer.  They could be used for anything: Path Points, Special function corners, Sprite instance start positions, and area corners.  When making them in the map editor you could type the name and start clicking and it would auto-update the name for you at each point "EnemyPath00,EnemyPath01...."  You could also have buttons to "Create Path from last points of same name", Create Area from last 2 points", etc, that would either auto-create or open the appropriate dialog so you could edit the newly created object.

Some benefits of this method include: The ability to edit individual path points easier and append path points, the ability to edit locations of areas easier, easier way to select destination of "teleport player" special function, easier way to implement "move tiles" special functions

The real benefit would come for being able to select these points "by name" from any other dialog where appropriate: Sprite Instance/Definition for rules or path locations, Special function/Rule/Area for areas of functions or targets (Transport, move tiles, etc).  They could also be used for easy map navigation in the design GUI, have drop-box "Scroll to Point...."

A huge list of points could become unruly and difficult to navigate so you could "hide" points after you make the appropriate path, area, etc.  So the list only contains what you want it to contain (the stuff you are working on, the most recent stuff" with an options to "view hidden points" available.
Another problem might be for novices that want to make paths and area "the old fashion way", but you could still keep those options available, an just auto-name and auto-hide the points of paths and areas made in this manner.

Also, I'm not sure how you would implement it, but having "relative points" might be a good idea as well.  "Left of, Right of, Ballistic projectile series01, Ballistic projectile series02, TopLeft of screen. etc"  These would all be useful for things like shooting players, shooting enemies.  Some of these could be pre-defined as well.  Might make things easier to select points by name rather than having to worry about coordinates at every level of design (especially for those new to the kit :) )"

...Steps off soapbox.  ;)

Also, thanks for keeping us involved in this process.  Hopefully we all get a better engine and development environment out of it.  8)

Off-Topic / Re: can yall help wit dis thin abou math...
« on: 2006-01-21, 02:17:16 PM »
god at math?
need help with derivatives?

now you're being a little contradictory. ;)

Help/FAQ / Re: media clip
« on: 2006-01-21, 02:13:00 PM »
well, i dont know about midis, but wavs are better than mp3's because when you loop them they dont have that 1/2 a second of silence at teh end (or however big it is)

I'm kind of a noob on wav's.  The only ones I've ever dealt with are when ripping a cd and getting a large 30+meg file for a few minutes of audio.  Without knowing anythng more, the only place I would use waves in a gamedev project would be quick <2 second sound effects.  Any large files that would be looped (background music) I would most likely have as midi, or possibly mp3.

An option for good sound quality is to release 2 versions of the game, 1 with wav's and 1 with mp3's and midis.  One would be a massive download, and the other would be more manageable but with less quality of sound.

News and Announcements / Re: SGDK 2.0 Status
« on: 2006-01-20, 04:11:47 PM »
I like to see you're putting a lot of thought into the sprite system to balance ease/speed of design and how much power/options to give the designer :)

I tried thinking up solutions or idea for some of your problems mentioned above but I'm kinda stumped on some of them too.  But I did come up with a couple ideas to throw out about the new sprites system.

Idea/suggestion about paths.  Since in 1.x they are a series of points, then you added in delays (integer).  Maybe could could add in references to rules/(special functions) at points in a path (again could be integers referencing a rule index).  It could be like adding in delays now except you would select from one of 2 drop downs, for global rules and for definition specific rules, or type in the number manually.
The rules could do stuff just like special functions act in 1.x.  Create sprites, delete sprites, play media, etc.  You could even do stuff not possible in 1.x: change sprites maximum speed, jump to a different point in the path, create if-then-else statement like commands that can give the sprites "intelligence" rather than just following a simple path.
This could make it easier for the intermediate designer to make smarter and more advanced sprites.  In 1.x it can be frustrating that non-player sprites can never activate functions except on collisions, this could solve that. ;)

I like how you absorbed the 1.x version of templates into 2.x definitions to make things simpler.  I do however like the idea of keeping something like templates but only as a design time element, to speed up sprite creation.  Since it looks like you are creating more options for definitions, maybe you should allow the designer to save pieces of a definition, say the states/graphics/frames, some or all of the rules or parameters, path, as a template.  Then at any time during designing a new or editing an old definition, the designer can load data from a list of templates that only affect whatever is stored in the template.  Example, when making a new sprite they can load the rules and some parameters from the "enemy1" or "bullet" or "platform" template and grab the graphics from a different one, then load the movement parameters from the "top down" template, and finally select the path themselves.  I was thinking of this as an optional advanced option, but it could possibly be of benefit of those new to the kit by pre-loading many of these templates into either a new project or keeping the SGDK global and have templates like "Platform", "Left bullet", "right bullet", "Player".  So the new designer could just load up these pre-made templates, add in the graphics and starting path and be done with a sprite without having to fill in every advanced option him/her self.

Now that definitions are global, there will be a lot to keep organized, it would be nice to add in ways to sort them by different properties.  Trying to select from a small list box that you can only see a few of the definitions in and not even be able to read the full name really is tough.  I  see that the current version has an expandable window size which is nice, I just hope you aren't designing the interfaces with lower resolutions in mind :)  If you are, i envision something like a button that opens a new window that has basically a spreadsheet of all the definitions that can be sorted by any reasonable property.  Double clicking on one would load that sprite def into the main window.  Another cool option would be selecting multiple definitions and batch changing properties/setting for all of them at once.  Examples: (up all the sprite movement speeds 1 or 2 steps to speed up the action), (after finishing a top down map, select all the definitions used in that map and put gravity to "0")

I'm sure some of this stuff you are implementing in another way, but I just thought I would get these ideas out there if you haven't thought of them yet. :)

General Discussion / Re: stupid question
« on: 2006-01-17, 06:20:55 PM »
Yeah, both the sprite additions and/or adding another event would destroy any hope for backwards compatibility.  If i ever find the motivation to do it I probably will, although my solution might not be as elegant and i may not even attempt to offer backwards compatibility.

I couldn't recreate the "overflow" hard crash, which occurred when adding tiles to a tile animation.  I did recreate a slight problem when renaming a special function it won't auto update the name in the "If save exists" list-box of the Save/Load Game option if the renamed function was selected before.  Pretty minor problem as I don't think this particular special function is used that often, let alone its target renamed.

General Discussion / Re: stupid question
« on: 2006-01-16, 05:57:58 PM »
Yes speed is pixel's per frame.


Ahhh, let me guess what you're doing.  you must be creating a path with a certain frame delay that delays exactly one animation sequence and then does something (Deletes spite or raises an event at end of path)  Hense you need the exact length of an animation in frames.  I think we determined this formula once before and its pretty helpful to have, and lots of games use or could use this.  Thanks for figuring it out.

Speaking of which, Bluemonk, if you ever make another 1.4x version I have a few suggestions about sprites.
you should have this as one of the autodelete options "Delete sprite after 1 animation sequence"
Also, let us activate special functions or raise events on any of these autodelete options.  I have found this a very hard thing to do with script.  (We have a "OnCreateSprite", why not an "OnRemoveSprite"?
There are also several bugs I found dealing with the IDE, but I haven't had time to try to reproduce them.  One of them was pretty nasty and closed the application  without letting me save my work.  If you want me to try to reproduce these before you release another version, give me a buzz.

Off-Topic / Re: Starcraft...
« on: 2006-01-12, 10:56:54 PM »
oops sorry :-X

 ;)  You know, for all I've played that game, and for how much I like game design, suprisingly, I haven't messed with the map editor all that much.  I started to make a single player campaign, but never finished it and probably lost it.  I have also edited other maps I have downloaded to make them more playable, but that's where my experience with it stops.

You should zip up some maps you created and post em :)  I would be interested in playing some fresh maps.

On a side note.  I still have a couple hundred maps from when I first started playing up to now.  Sure most of them suck, or are near identical copies, but thats ok.  I always remember to back them up every time I have reformated.

Off-Topic / Re: Starcraft...
« on: 2006-01-12, 06:01:36 PM »
I played Star war galactic battlegrounds for a while too.  It was pretty fun.  Although isn't it based on Age of empires?  I guess I never played Command & Conquer before so maybe those are similar too.:)

Pages: 1 2 3 [4] 5 6 7