16,019,514 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Visual Basic questions
View Javascript questions
View .NET questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by Member 14100511 (Top 6 by date)
Member 14100511
17-Mar-19 9:48am
View
Okay,
I'll leave the code as VB6. From what's been said it would seem that Microsoft in their infinite wisdom have stripped away the common sense from VB.
Instead of just doing the things I want, I have to do something else and then do a bunch of other stuff so I can get on and do the things I want to do, then do another bunch of stuff to effect my changes.
If this site has the equivalent of moderators, please delete my question and remove my membership.
Thank you.
Member 14100511
17-Mar-19 9:17am
View
Thanks for the reply Original Griff. Maciej Los - I have no idea what 5ed! is meant to mean.
So maybe I didn't write my qyestion well. My problem is *not* how to write an array to a file, it's how do I read a string of characters, then reset file pointer and read bytes, then reset file pointer an read an array of floats, read some more bytes, reset the file pointer and read another float array. Once I have managed that I will want to reset the pointer and rewrite the two float arrays, and if I'm going to have to figure out how to convert C#, (which I am not conversant with) to VB.NET, (which I am not conversant with) I can forsee that I will never complete the project.
Member 14100511
17-Jan-19 0:58am
View
Thanks raddevus. I should have said I'm working in VB6 as befits my age.
I don't see how the VB6 solution is going to return a signed value, but will give it a try.
Mostly my question is about where the sign bit is held in a little endian 4 byte number.
Member 14100511
3-Jan-19 5:47am
View
Thanks Maciej. That is really helpful. I shall read it thouroughly.
I have got there for now, by a probably very inefficient algorithm. I was overthinking things and confused by what I was seeing in-game as a result of my tinkerings. I've written a couple of short routines that will convert 4 bytes to long and back again, within the max/min constraints that the terrain interpreter puts on height. Now I can convert any one of the published terrain generators and push the output into the terrain map and see what I get.
Member 14100511
2-Jan-19 17:33pm
View
I'm not working in VBA to process images Maciej.
I'm working in VBA to produce a 513x513 array of numbers which I will insert into the game file which will then be read by the game engine. I'm just hoping someone out there knows how Unity/C# stores heightmap data.
It's 4 bytes, yes, and my first thought was it's a standard long integer, but in the game engine changes to the 1st byte seem insignificant, the 2nd byte minor, the 3rd byte noticeable but the 4th byte!
Values from 0 - &h39 and values above &h3f all result in a zero height in the game map, values in between seem to generate orders of magnitude of height change - and not simple powers of two.
My assumption has been that the data is stored in a standard MS format and it's just my lack of knowledge of MS coding platform internals that is holding me back, but maybe it isn't. I am perplexed.
Member 14100511
2-Jan-19 17:32pm
View
Unhelpful Greg. However do you think I figured out what was height data, what colour data, what asset data?
I am doing it because I want to write a random terrain generator for the game - a feature which the original dev's did not provide - and it'll be a heck of a lot easier if I have an array of integers than an array of bytes.
Show More