Page 6 of 16 FirstFirst ... 45678 ... LastLast
Results 51 to 60 of 158

Thread: turn based games

  1. #51

    turn based games

    Quote Originally Posted by K4Z
    It will be interesting to see how the fantasy and sci-fi will come together.
    A huge battlemech with a plasma launcher would easily kill a little man with a bow. However this could be ballanced by making the obviousily weaker characters cheap to buy/hire, and cheaper to buy equipment for. Also with a lower points value as discussed before, like 1 battlemech would equal 5 bowmen, etc. (lol, good luck bowmen )
    LOL :mrgreen:

    Ok, i've just started to download the newer blender.

    Send the template to kas6666@hotmail.com. I'd like to test out the gui aswell.
    Well done

    Instead of sending it to you, i'll publish it so anyone can see it.
    I've made a zip with everything: sources, models, analisy, docs, etc.
    You should be able to compile src given that you have JEDI-SDL.
    Don't be scared by the num of units, most of them are not used in the gui demo (are generic src i use for every project).
    Also, i like to keep units small and have many of them

    download
    (linux and windows executable included)

    Here are new models i forgot to publish last day

    The mighty one wheel scouter

    The trashcan-robot

    A simple bat (need more details, maybe)

    A vampire!
    If you save your data in a proprietary format, the owner of the format owns your data.
    <br /><A href="http://msx80.blogspot.com">http://msx80.blogspot.com</A>

  2. #52

    turn based games

    HaHa, those models are awesome. Now I goto just spend some time understanding blender a little better. I can import/export to/from blender and lightwave really easily, so I could whip up some models in lightwave pretty quick and import to blender for you to work with.


    However I could not get the Gui demo to run. Under XP and 98, turn.exe just runs and closes, outputting exceptions in the dos box. After a bit a mucking around I got the source to compile under Delphi7, but once run it spews out a heap of exceptions, and cannot find car0.png (although the path is correct), and closes.
    I will try it out under Mandrake later tonight, may just be a compatibility issue?

  3. #53

    turn based games

    Quote Originally Posted by K4Z
    HaHa, those models are awesome. Now I goto just spend some time understanding blender a little better. I can import/export to/from blender and lightwave really easily, so I could whip up some models in lightwave pretty quick and import to blender for you to work with.
    Ok! To learn Blender, i suggest the official documentation, that unusually is very readable and easy to follow.
    Blender has an interface on its own, but it's good for heavy use

    However I could not get the Gui demo to run. Under XP and 98, turn.exe just runs and closes, outputting exceptions in the dos box. After a bit a mucking around I got the source to compile under Delphi7, but once run it spews out a heap of exceptions, and cannot find car0.png (although the path is correct), and closes.
    I will try it out under Mandrake later tonight, may just be a compatibility issue?
    Probably that's becouse of FPC. It's executables have some problems with certain opengl drivers, i've noticed.
    The one you compiled with delphi was good, you just have to move from /turn/src/ to /turn/, becouse it must reside in the same directory of "media" (you can set delphi exe output directory).

    bye!
    If you save your data in a proprietary format, the owner of the format owns your data.
    <br /><A href="http://msx80.blogspot.com">http://msx80.blogspot.com</A>

  4. #54

    turn based games

    Quote Originally Posted by {MSX}
    you just have to move from /turn/src/ to /turn/
    Yeah, I had done that. But I traced the problem to the libpng1.dll, causing all kinds of exceptions. So, I converted all the png's in the media directory to bmp's, and changed the source to load bitmaps instead. And now it compiles and runs perfectly, under all OS's, and compiles under Delphi7 and FPC.

    (I'm still trying to get it to load png's, bmp's aren't my favourite format to use )

    So yeah, pretty awesome so far. Nice code, and incredibly easy to work with, creating new windows, edit boxes and buttons.

    Good job {MSX}


    I've started modeling some weapons in Blender, like bows, swords, axes, etc. Although horribly different to all the 3d packages I've used before, I'm starting to really like Blender .
    BTW, how do I use the export.py script?

  5. #55
    Co-Founder / PGD Elder WILL's Avatar
    Join Date
    Apr 2003
    Location
    Canada
    Posts
    6,107
    Blog Entries
    25

    turn based games

    For some free models try this thread: http://www.pgd.netstarweb.com/viewtopic.php?t=1656

    You know... that lighting issue would e difficult in a way... in a spirted engine, you'd simply have to darken each sprite depending on how dark that spot was. But for a textured map, you may have to either be a bit more restrictive with the camera, or maybe perform some kind of darkening or alpha effects on less than fully visible character models.

    Might have to read up on lighting a bit more to get this system perfected.
    Jason McMillen
    Pascal Game Development
    Co-Founder





  6. #56

    turn based games

    Quote Originally Posted by K4Z
    Quote Originally Posted by {MSX}
    you just have to move from /turn/src/ to /turn/
    Yeah, I had done that. But I traced the problem to the libpng1.dll, causing all kinds of exceptions. So, I converted all the png's in the media directory to bmp's, and changed the source to load bitmaps instead. And now it compiles and runs perfectly, under all OS's, and compiles under Delphi7 and FPC.

    (I'm still trying to get it to load png's, bmp's aren't my favourite format to use )

    So yeah, pretty awesome so far. Nice code, and incredibly easy to work with, creating new windows, edit boxes and buttons.

    Good job {MSX}
    Thanks I hope you can make it work with PNG since i hate BMP
    Maybe the problem could be a broken/old version of the dll? (shooting in the dark).

    Are you interested in writing some code for the game too ?

    I've started modeling some weapons in Blender, like bows, swords, axes, etc. Although horribly different to all the 3d packages I've used before, I'm starting to really like Blender .
    BTW, how do I use the export.py script?
    Well the export is a little experimental (it's a dirty copy of the one i use for funkycars). Anyway, it works like this:
    - In blender, create a new text-type window and load the script.
    - Remember to set the PATH variable on the beginning according to your system (and remember to double the slashes on win: 'c:\\dir\\dir')
    -Then you can run it with the apposite command. It should create a set of file:
    -one for the scene ( <scenename>.model )
    -one for each mesh ( <meshname>.mesh )

    Currently it doesn't export a whole model (it just creates a list of mesh), nor it handles animations (i don't think i'll do them in blender)

    There are a number of things to keep in mind while modeling things that you want to export. Maybe i'll write some hints later. Mainly, remember that two objects can share the same mesh, so when you have to have a "reference" copy to a mesh, use ALT-D instead of SHIFT-D to duplicate.

    I'll work on the exporter to make it a little more fault tolerant and usable.. Why don't you post your models in the while ?
    If you save your data in a proprietary format, the owner of the format owns your data.
    <br /><A href="http://msx80.blogspot.com">http://msx80.blogspot.com</A>

  7. #57

    turn based games

    Here's the new export.py that should work:
    Code:
    #!BPY
    
    """
    Name&#58; Export to XML
    Blender&#58; 228
    Group&#58; 'Export'
    Tip&#58; 'Export MSX.'
    """
    
    # Exporter by &#123;MSX&#125;
    # Released under GPL
    
    import Blender
    import sys
    from string import *
    
    PATH = "c&#58;\\enter\\your\\path\\"
    
    
    
    
    def dumpFace&#40;fi, num, a,b,c, auv, buv, cuv&#41;&#58;
    	fi.write&#40;"	<FACE id=\""+`num`+"\">\n"&#41;
    	fi.write&#40;"		<A>"+`a` + "</A>\n"&#41;
    	fi.write&#40;"		<AU>"+`auv&#91;0&#93;` + "</AU>\n"&#41;
    	fi.write&#40;"		<AV>"+`-auv&#91;1&#93;` + "</AV>\n"&#41;
    	fi.write&#40;"		<B>" + `b` + "</B>\n"&#41;
    	fi.write&#40;"		<BU>"+`buv&#91;0&#93;` + "</BU>\n"&#41;
    	fi.write&#40;"		<BV>"+`-buv&#91;1&#93;` + "</BV>\n"&#41;
    	fi.write&#40;"		<C>" + `c` + "</C>\n"&#41;
    	fi.write&#40;"		<CU>"+`cuv&#91;0&#93;` + "</CU>\n"&#41;
    	fi.write&#40;"		<CV>"+`-cuv&#91;1&#93;` + "</CV>\n"&#41;
    	fi.write&#40;"	</FACE>\n"&#41;
    
    
    # dumpMesh -- the object dumper f&#58; File, o&#58; NMesh
    def dumpMesh&#40;o&#41;&#58;
    	if o.block_type == 'NMesh' &#58;
    		filename = lower&#40;o.name&#41; + '.mesh'
    		print&#40;'Exporting ' + filename + ' mesh'&#41;
    		fmesh = open&#40;PATH+filename, 'w'&#41;
    		fmesh.write&#40;"<MESH>\n"&#41;
    		mesh = Blender.NMesh.GetRaw&#40;o.name&#41;
    		# add face UV if it doesn't have
    		mesh.hasFaceUV&#40;1&#41;
    		# header
    		fmesh.write&#40;"<NAME>" + lower&#40;o.name&#41; + "</NAME>\n"&#41;
    		
    		# Vertex Coordinate header
    		fmesh.write&#40;"<POINTCOUNT>" + `len&#40;mesh.verts&#41;` + "</POINTCOUNT>\n"&#41;
    		
    		# Verticies
    		fmesh.write&#40;"<POINTS>\n"&#41;
    		i = 0
    		for vert in mesh.verts&#58;
    			fmesh.write&#40;"	<VERTEX id=\""+`i`+"\">\n"&#41;
    			fmesh.write&#40;"		<X>"+`-vert.co&#91;0&#93;` + "</X>\n"&#41;
    			fmesh.write&#40;"		<Y>" + `vert.co&#91;2&#93;` + "</Y>\n"&#41;
    			fmesh.write&#40;"		<Z>" + `vert.co&#91;1&#93;` + "</Z>\n"&#41;
    			fmesh.write&#40;"		<NX>"+`vert.no&#91;0&#93;` + "</NX>\n"&#41;
    			fmesh.write&#40;"		<NY>" + `vert.no&#91;2&#93;` + "</NY>\n"&#41;
    			fmesh.write&#40;"		<NZ>" + `vert.no&#91;1&#93;` + "</NZ>\n"&#41;
    			fmesh.write&#40;"	</VERTEX>\n"&#41;
    			i = i + 1
    		fmesh.write&#40;"</POINTS>\n"&#41;
    
    		# faces
    		faces = len&#40;mesh.faces&#41;
    		i=0
    		data = ""
    		colordata = ""
    		fmesh.write&#40;"<FACES>\n"&#41;
    		for face in mesh.faces&#58;
    			if len&#40;face.v&#41; < 3&#58;
    				# discard
    				faces = faces - 1
    				print 'Face discarded'
    			elif len&#40;face.v&#41; == 3&#58;
    				# Already a triangle, add it to the data, do not change the count
    				# reset face uv if it doesn't have
    				if len&#40;face.uv&#41; == 0&#58;
    					face.uv = &#91;&#40;0,0&#41;,&#40;0,1&#41;,&#40;1,0&#41;&#93;
    				dumpFace&#40;fmesh, i, face.v&#91;0&#93;.index, face.v&#91;1&#93;.index, face.v&#91;2&#93;.index, face.uv&#91;0&#93;, face.uv&#91;1&#93;, face.uv&#91;2&#93;&#41;
    				i=i+1
    			else&#58;
    				# this one is a quad
    				# Break it up into two triangles
    				# Hence one additional face
    
    				# reset face uv if it doesn't have
    				if len&#40;face.uv&#41; == 0&#58;
    					face.uv = &#91;&#40;0,0&#41;,&#40;0,1&#41;,&#40;1,0&#41;, &#40;1,1&#41;&#93;
    				
    				faces = faces + 1
    				dumpFace&#40;fmesh, i, face.v&#91;0&#93;.index, face.v&#91;1&#93;.index, face.v&#91;3&#93;.index, face.uv&#91;0&#93;, face.uv&#91;1&#93;, face.uv&#91;3&#93;&#41;
    				i=i+1
    				dumpFace&#40;fmesh, i, face.v&#91;1&#93;.index, face.v&#91;2&#93;.index, face.v&#91;3&#93;.index, face.uv&#91;1&#93;, face.uv&#91;2&#93;, face.uv&#91;3&#93;&#41;
    				i=i+1				
    		fmesh.write&#40;"</FACES>\n"&#41;
    		# Now I can write the the correct face count
    		fmesh.write&#40;"<FACECOUNT>" + `faces` + "</FACECOUNT>\n"&#41;
    		fmesh.write&#40;"</MESH>\n"&#41;	
    		# Close the file
    		fmesh.close&#40;&#41;;
    
    
    def findTexture&#40;mesh&#41;&#58;
    	for face in mesh.faces&#58;
    		if face.image&#58;
    			s = split&#40;face.image.filename, "/"&#41;
    			s1 = split&#40;s&#91;len&#40;s&#41;-1&#93;,"."&#41;
    			return s1&#91;0&#93;
    	return "none"
    
    
    def DumpObject&#40;f, ob&#41;&#58;
    	textu = findTexture&#40;ob.data&#41;
    	meshname = lower&#40;ob.data.name&#41;
    	print "Dumping mesh "+meshname+" texture&#58; "+textu
    	dumpMesh&#40;ob.data&#41;
    	f.write&#40;"		<BLOCK>\n"&#41;
    	f.write&#40;"			<MESH>"+meshname+"</MESH>\n"&#41;
    	f.write&#40;"			<TEXTURE>"+textu+"</TEXTURE>\n"&#41;
    	f.write&#40;"			<POS>\n"&#41;
    	f.write&#40;"				<X>"+`-ob.LocX-ob.dLocX`+"</X>\n"&#41;
    	f.write&#40;"				<Y>"+`ob.LocZ+ob.dLocZ`+"</Y>\n"&#41;
    	f.write&#40;"				<Z>"+`ob.LocY+ob.dLocY`+"</Z>\n"&#41;
    	f.write&#40;"			</POS>\n"&#41;
    	f.write&#40;"			<ROT>\n"&#41;
    	f.write&#40;"				<X>"+`ob.RotX+ob.dRotX`+"</X>\n"&#41;
    	f.write&#40;"				<Y>"+`ob.RotY+ob.dRotY`+"</Y>\n"&#41;
    	f.write&#40;"				<Z>"+`-ob.RotZ-ob.dRotZ`+"</Z>\n"&#41;
    	f.write&#40;"			</ROT>\n"&#41;
    	f.write&#40;"		</BLOCK>\n"&#41;
    
    def DumpModel&#40;f, scene&#41;&#58;
    	f.write&#40;"<MODEL>\n"&#41;
    	f.write&#40;"	<NAME>"+lower&#40;scene.name&#41;+"</NAME>\n"&#41;
    	f.write&#40;"	<MESHES>\n"&#41;
    	
    	# Go through the objects and export them
    	for ob in scene.getChildren&#40;&#41;&#58;
    		print &#40;ob.getType&#40;&#41;&#41;
    		if ob.getType&#40;&#41;=='Mesh'&#58;
    			DumpObject&#40;f, ob&#41;
    	f.write&#40;"	</MESHES>\n"&#41;	
    	f.write&#40;"</MODEL>\n"&#41;
    
    
    scene = Blender.Scene.getCurrent&#40;&#41;
    filename = lower&#40;scene.name&#41; + '.model'
    print&#40;'Exporting ' + filename + ' model'&#41;
    fout = open&#40;PATH+filename, 'w'&#41;
    DumpModel&#40;fout, scene&#41;
    fout.close&#40;&#41;;
    print&#40;'Model exported!'&#41;

    Remember that it doesn't give any feedback when it runs correctly (you just find the files where you asked them).
    Maybe i could add a blender GUI in future
    If you save your data in a proprietary format, the owner of the format owns your data.
    <br /><A href="http://msx80.blogspot.com">http://msx80.blogspot.com</A>

  8. #58

    turn based games

    Maybe the problem could be a broken/old version of the dll? (shooting in the dark).
    It's weird the same dll works with other projects to load png's though. I dunno. I'll get hold of an older copy then.

    Are you interested in writing some code for the game too ?
    I'm still pretty new to the 3D GameDev scene, but sure, I'd like to help with coding were I can. I've been learning a lot from your Funky Cars demo, It's awesome.

    Here's a render of a couple of weapons I've just finished.

    In this pic there's a short bow, a long bow, and two different katana's.
    The models, and the render, were made in Lightwave. Probly a little hard to see them exactly(from the smoothing, shadows, and AntiAliasing), so I'll do one up with one of your models holding them in Blender.

  9. #59

    turn based games

    That new export script works better now. I've been experimenting with it a little bit, and I (sort of) managed to replace the car with the bat model in the gui example.

  10. #60

    turn based games

    Well done Your weapons look nice! Are there low poly? I couldn't tell from the screenshots.

    I've currently developed some more of the gui system, with a login screen and a prototype of the "offgame" section.
    I'm posting something this evening.

    About the code, you could maybe start with some improvements to the GUI, if you understood how it works.
    I'll find you something to do

    I've almost decided to create a custom editor for animations. Using blender for that is overkill, and the exportation is also difficoult..

    I'll post back this evening

    bye!
    If you save your data in a proprietary format, the owner of the format owns your data.
    <br /><A href="http://msx80.blogspot.com">http://msx80.blogspot.com</A>

Page 6 of 16 FirstFirst ... 45678 ... LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •