The screenshots look much better than the ascii-levels IMHO
The screenshots look much better than the ascii-levels IMHO
Thanks Jonax
cheers,
Paul
Games:
Seafox
Pages:
Syntax Error Software
itch.io page
Online Chess
http://gameknot.com/#paul_nicholls
I must say I do do one thing very differently in terms of maps. I have a tendency to go towards developing a layered format which stores data in 2d csv array between meta style tags. Each array corresponds to each layer. Then there is a LOT of tags that define 'objects' so whereas floor, terrain, rocks, caves, walls and etc are defined as tiles in the 2d arrays, an object might be a person, chair, TV and others you can interact with. Also, each object has a script file so it can edit X,Y positions, the shown image and etc. The map itself also has a script file in case you want it to change dynamically. Quite a bit more complicated which I guess is why I have a right job in making editors to work with it all. Especially the 20th odd revision of this format. This map editor is indeed proving exceptionally tricky.
I like the touch where you store data as T, 0,1,W and etc... I might start doing that to replace my Integer tile codes once I get the latest revision optimised. It only does 35 odd fps when drawing a total 7,000 elements at 800x600 32bpp whereas earlier formats reached 175fps in equal element counts. Darn. Opengl Should give that a right change I hope.
I once tried to change the world. But they wouldn't give me the source code. Damned evil cunning.
Hey code_glitch, you do realise that I'm not actually going to use ASCII characters as levels in my final game? I am going to use my level editor that I wrote for The Probe earlier on...it uses binary files to load/save levels.
Good luck with your level editor dude
cheers,
Paul
Games:
Seafox
Pages:
Syntax Error Software
itch.io page
Online Chess
http://gameknot.com/#paul_nicholls
Ah, that does explain things a lot, guess you have some mighty small map files then since the engine seems to handle it all. I might have to give that a go to try and improve performance on mine. Good luck on the probe, looks like you made a lot of ground with this one.
I once tried to change the world. But they wouldn't give me the source code. Damned evil cunning.
My level map files in The Probe are just simple 2d arrays of a TEngineObject record, one array for each layer in the map...
Here is my load/save code I am now using in The Probe prototype (levels are binary files):Code:TEngineObject = record Enabled: Boolean; Health: Single; Moving: Byte; OfsX: Single; OfsY: Single; case Integer of 0: (Id,Attrib,Scanned,Stationary: Byte); 1: (Value: LongWord); end;
Maybe this will help you?Code:procedure TTheProbeEngine.SaveToStream(const aStream: TStream); var w,h,L: Word; Layer,x,y: Word; begin w := FWidth; h := FHeight; L := FLayerCount; aStream.Write(w,SizeOf(w)); aStream.Write(h,SizeOf(h)); aStream.Write(L,SizeOf(L)); aStream.Write(FUpdateCount,SizeOf(FUpdateCount)); for Layer := 0 to FLayerCount - 1 do for y := 0 to FHeight - 1 do begin for x := 0 to FWidth - 1 do begin aStream.Write(FLayers[Layer][y,x],SizeOf(TEngineObject)); end; end; end; procedure TTheProbeEngine.LoadFromStream(const aStream: TStream); var w,h,L: Word; Layer,x,y: Word; begin aStream.Read(w,SizeOf(w)); aStream.Read(h,SizeOf(h)); aStream.Read(L,SizeOf(L)); aStream.Read(FUpdateCount,SizeOf(FUpdateCount)); SetBounds(L,w,h); for Layer := 0 to FLayerCount - 1 do for y := 0 to FHeight - 1 do begin for x := 0 to FWidth - 1 do begin aStream.Read(FLayers[Layer][y,x],SizeOf(TEngineObject)); end; end; end; procedure TTheProbeEngine.LoadFromFile(const aFileName: AnsiString); var fs: TFileStream; begin fs := TFileStream.Create(aFileName,fmOpenRead or fmShareDenyWrite); try LoadFromStream(fs); finally fs.Free; end; end; procedure TTheProbeEngine.SaveToFile(const aFileName: AnsiString); var fs: TFileStream; begin fs := TFileStream.Create(aFileName,fmCreate or fmShareDenyWrite); try SaveToStream(fs); finally fs.Free; end; end;
cheers,
Paul
Games:
Seafox
Pages:
Syntax Error Software
itch.io page
Online Chess
http://gameknot.com/#paul_nicholls
Hey all,
I have now started sending updates via my Twitter account (http://twitter.com/theprobegame)
So feel free to follow me there too
cheers,
Paul
Games:
Seafox
Pages:
Syntax Error Software
itch.io page
Online Chess
http://gameknot.com/#paul_nicholls
Bookmarks